Re: [Arches] jQuery error on fresh install of 3.0.4 and hip 1.0.3
Amazingly helpful -- thank you! Once I followed these instructions (and chgrp to www-data on the new static dir) the install was golden and I no longer have the jquery error. Looking back, I think I was just missing this step all along and had bungled things by doing the work of collectstatic manually by copying files to my local custom media dir (although not completely, hence the error). Thanks again, Angela On Tue, Sep 15, 2015 at 1:01 PM, Adam Coxwrote: > Hi Angela, you'll need to do a little bit of set up, and then run *(ENV)* > *python > manage.py collectstatic*. What will be happening is > >- Django collects all of the files from all of the STATICFILES_DIRS >and puts them into one new STATIC_ROOT directory >- Django creates a new url prefix every time a static file is requested >- Apache is configured to take that url and point it to the new >directory that is now holding all of the static files > > Here's are steps to accomplish this: > > 1. in settings.py: > (leave STATICFILES_DIRS as it is) > STATIC_ROOT = os.path.join(PACKAGE_ROOT, 'static') > STATIC_URL = "/static/" > > 2. create that directory (inside your app): > *mkdir /srv/crhim/my_hip_app/my_hip_app/static* > > 3. run the collectstatic command (with virtual environment activated!) > *(ENV) cd /srv/crhim/my_hip_app/ && python manage.py collectstatic* > > 4. tell apache where to find the files, and give it access to the directory > > add these lines to your httpd file (or 000-default.conf on ubuntu): > > Alias /static/ /srv/crhim/my_hip_app/my_hip_app/static > > > Options Indexes FollowSymLinks > AllowOverride None > Require all granted > > > 5. restart apache > > Once you've done this, you'll need to run collect static any time you > change a file that resides in your media directory (images, .css, or .js). > It's necessary to set things up like this anyway, because after you've set > DEBUG = False django will no longer serve those static files--it is left up > to apache. > > Good luck! > > On Tuesday, September 15, 2015 at 11:20:57 AM UTC-5, Angela Labrador wrote: >> >> Thanks, Adam. I started over in order to test all this: >> >>- Reinstalled all dependencies using the bash script at >>http://arches3.readthedocs.org/en/latest/installing-dependencies-linux/ >>- Ran through all installation instructions for arches and arches_hip >>- Opened the firewall to allow temp remote access to django >>development server >> >> NO ERRORS when using the django dev server! Hooray! >> >> However, when I host through apache, none of the contents of the arches >> or arches_hip media directories (e.g. css, js, etc.) are being hosted. I'm >> assuming this is related to >> STATICFILES_DIRS = (os.path.join(PACKAGE_ROOT, 'media'),) + >> STATICFILES_DIRS >> in settings.py. >> >> In my apache host conf, I have media successfully aliased to my app's >> specific media directory (the one where I would put my custom files like >> package.css). But, it is not aggregating the other sources for these static >> files. >> >> What is the best way to edit settings.py and/or httpd.conf to make sure >> that the media directories under arches/ and arches_hip/ are also being >> hosted? Are people hardcoding this into settings.py? Using symlinks from >> /var/www? >> >> Many thanks, >> Angela >> >> >> >> >> >> >> On Friday, September 11, 2015 at 3:59:55 PM UTC-4, Adam Cox wrote: >>> >>> Well, to check if it's a problem in your virtual environment, you could >>> just make a new one (called ENV2 or something), install arches-hip there, >>> and use it instead. Activate it, reinstall the package and then run the >>> dev server and see if the problem persists (you'd have to reconfigure the >>> virtual host if you want apache to use the new virtual environment). Make >>> sure that your settings.py points to the defaults in arches-hip, i.e. >>> comment out both the RESOURCE_GRAPH_LOCATIONS and CONCEPT_SCHEME_LOCATIONS >>> variables so your app will use the defaults. >>> >>> >>> On Fri, Sep 11, 2015 at 2:16 PM, Angela Labrador >>> wrote: >>> Great catch, Adam. Good news: I rebuilt the database and reloaded the sample authority files -- now I'm at 1221 concepts (I must have added one while poking around). Not so great news: I disabled apache, edited iptables, ran the django development server on 0.0.0.0:8000, pointed the web browser to the new port, and... still got the error. It sounds like it must be something local to my environment, and likely a path missing in my settings file or local env. I'll comb through the docs again and my logs to see if I can track it down. If any other ideas occur to anyone, I'm all ears! Thanks, Angela On Fri, Sep 11, 2015 at 1:49 PM, Adam Cox wrote: > Hi Angela, you could run the development server just to make sure
Re: [Arches] jQuery error on fresh install of 3.0.4 and hip 1.0.3
Interesting, I didn't have to chgrp to get it to work here, I kinda thought the directory info in the .conf file handled that. Anyway, glad it's working for you! Adam On Tuesday, September 15, 2015 at 12:15:12 PM UTC-5, Angela Labrador wrote: > > Amazingly helpful -- thank you! > > Once I followed these instructions (and chgrp to www-data on the new > static dir) the install was golden and I no longer have the jquery error. > > Looking back, I think I was just missing this step all along and had > bungled things by doing the work of collectstatic manually by copying files > to my local custom media dir (although not completely, hence the error). > > Thanks again, > Angela > > On Tue, Sep 15, 2015 at 1:01 PM, Adam Cox> wrote: > >> Hi Angela, you'll need to do a little bit of set up, and then run *(ENV)* >> *python manage.py collectstatic*. What will be happening is >> >>- Django collects all of the files from all of the STATICFILES_DIRS >>and puts them into one new STATIC_ROOT directory >>- Django creates a new url prefix every time a static file is >>requested >>- Apache is configured to take that url and point it to the new >>directory that is now holding all of the static files >> >> Here's are steps to accomplish this: >> >> 1. in settings.py: >> (leave STATICFILES_DIRS as it is) >> STATIC_ROOT = os.path.join(PACKAGE_ROOT, 'static') >> STATIC_URL = "/static/" >> >> 2. create that directory (inside your app): >> *mkdir /srv/crhim/my_hip_app/my_hip_app/static* >> >> 3. run the collectstatic command (with virtual environment activated!) >> *(ENV) cd /srv/crhim/my_hip_app/ && python manage.py collectstatic* >> >> 4. tell apache where to find the files, and give it access to the >> directory >> >> add these lines to your httpd file (or 000-default.conf on ubuntu): >> >> Alias /static/ /srv/crhim/my_hip_app/my_hip_app/static >> >> >> Options Indexes FollowSymLinks >> AllowOverride None >> Require all granted >> >> >> 5. restart apache >> >> Once you've done this, you'll need to run collect static any time you >> change a file that resides in your media directory (images, .css, or .js). >> It's necessary to set things up like this anyway, because after you've set >> DEBUG = False django will no longer serve those static files--it is left up >> to apache. >> >> Good luck! >> >> On Tuesday, September 15, 2015 at 11:20:57 AM UTC-5, Angela Labrador >> wrote: >>> >>> Thanks, Adam. I started over in order to test all this: >>> >>>- Reinstalled all dependencies using the bash script at >>>http://arches3.readthedocs.org/en/latest/installing-dependencies-linux/ >>>- Ran through all installation instructions for arches and arches_hip >>>- Opened the firewall to allow temp remote access to django >>>development server >>> >>> NO ERRORS when using the django dev server! Hooray! >>> >>> However, when I host through apache, none of the contents of the arches >>> or arches_hip media directories (e.g. css, js, etc.) are being hosted. I'm >>> assuming this is related to >>> STATICFILES_DIRS = (os.path.join(PACKAGE_ROOT, 'media'),) + >>> STATICFILES_DIRS >>> in settings.py. >>> >>> In my apache host conf, I have media successfully aliased to my app's >>> specific media directory (the one where I would put my custom files like >>> package.css). But, it is not aggregating the other sources for these static >>> files. >>> >>> What is the best way to edit settings.py and/or httpd.conf to make sure >>> that the media directories under arches/ and arches_hip/ are also being >>> hosted? Are people hardcoding this into settings.py? Using symlinks from >>> /var/www? >>> >>> Many thanks, >>> Angela >>> >>> >>> >>> >>> >>> >>> On Friday, September 11, 2015 at 3:59:55 PM UTC-4, Adam Cox wrote: Well, to check if it's a problem in your virtual environment, you could just make a new one (called ENV2 or something), install arches-hip there, and use it instead. Activate it, reinstall the package and then run the dev server and see if the problem persists (you'd have to reconfigure the virtual host if you want apache to use the new virtual environment). Make sure that your settings.py points to the defaults in arches-hip, i.e. comment out both the RESOURCE_GRAPH_LOCATIONS and CONCEPT_SCHEME_LOCATIONS variables so your app will use the defaults. On Fri, Sep 11, 2015 at 2:16 PM, Angela Labrador wrote: > Great catch, Adam. > > Good news: I rebuilt the database and reloaded the sample authority > files -- now I'm at 1221 concepts (I must have added one while poking > around). > > Not so great news: I disabled apache, edited iptables, ran the django > development server on 0.0.0.0:8000, pointed the web browser to the > new port, and... still got the error. > > It sounds like
Re: [Arches] jQuery error on fresh install of 3.0.4 and hip 1.0.3
Hi Angela, you'll need to do a little bit of set up, and then run *(ENV)* *python manage.py collectstatic*. What will be happening is - Django collects all of the files from all of the STATICFILES_DIRS and puts them into one new STATIC_ROOT directory - Django creates a new url prefix every time a static file is requested - Apache is configured to take that url and point it to the new directory that is now holding all of the static files Here's are steps to accomplish this: 1. in settings.py: (leave STATICFILES_DIRS as it is) STATIC_ROOT = os.path.join(PACKAGE_ROOT, 'static') STATIC_URL = "/static/" 2. create that directory (inside your app): *mkdir /srv/crhim/my_hip_app/my_hip_app/static* 3. run the collectstatic command (with virtual environment activated!) *(ENV) cd /srv/crhim/my_hip_app/ && python manage.py collectstatic* 4. tell apache where to find the files, and give it access to the directory add these lines to your httpd file (or 000-default.conf on ubuntu): Alias /static/ /srv/crhim/my_hip_app/my_hip_app/static Options Indexes FollowSymLinks AllowOverride None Require all granted 5. restart apache Once you've done this, you'll need to run collect static any time you change a file that resides in your media directory (images, .css, or .js). It's necessary to set things up like this anyway, because after you've set DEBUG = False django will no longer serve those static files--it is left up to apache. Good luck! On Tuesday, September 15, 2015 at 11:20:57 AM UTC-5, Angela Labrador wrote: > > Thanks, Adam. I started over in order to test all this: > >- Reinstalled all dependencies using the bash script at >http://arches3.readthedocs.org/en/latest/installing-dependencies-linux/ >- Ran through all installation instructions for arches and arches_hip >- Opened the firewall to allow temp remote access to django >development server > > NO ERRORS when using the django dev server! Hooray! > > However, when I host through apache, none of the contents of the arches or > arches_hip media directories (e.g. css, js, etc.) are being hosted. I'm > assuming this is related to > STATICFILES_DIRS = (os.path.join(PACKAGE_ROOT, 'media'),) + > STATICFILES_DIRS > in settings.py. > > In my apache host conf, I have media successfully aliased to my app's > specific media directory (the one where I would put my custom files like > package.css). But, it is not aggregating the other sources for these static > files. > > What is the best way to edit settings.py and/or httpd.conf to make sure > that the media directories under arches/ and arches_hip/ are also being > hosted? Are people hardcoding this into settings.py? Using symlinks from > /var/www? > > Many thanks, > Angela > > > > > > > On Friday, September 11, 2015 at 3:59:55 PM UTC-4, Adam Cox wrote: >> >> Well, to check if it's a problem in your virtual environment, you could >> just make a new one (called ENV2 or something), install arches-hip there, >> and use it instead. Activate it, reinstall the package and then run the >> dev server and see if the problem persists (you'd have to reconfigure the >> virtual host if you want apache to use the new virtual environment). Make >> sure that your settings.py points to the defaults in arches-hip, i.e. >> comment out both the RESOURCE_GRAPH_LOCATIONS and CONCEPT_SCHEME_LOCATIONS >> variables so your app will use the defaults. >> >> >> On Fri, Sep 11, 2015 at 2:16 PM, Angela Labrador>> wrote: >> >>> Great catch, Adam. >>> >>> Good news: I rebuilt the database and reloaded the sample authority >>> files -- now I'm at 1221 concepts (I must have added one while poking >>> around). >>> >>> Not so great news: I disabled apache, edited iptables, ran the django >>> development server on 0.0.0.0:8000, pointed the web browser to the new >>> port, and... still got the error. >>> >>> It sounds like it must be something local to my environment, and likely >>> a path missing in my settings file or local env. I'll comb through the docs >>> again and my logs to see if I can track it down. If any other ideas occur >>> to anyone, I'm all ears! >>> >>> Thanks, >>> Angela >>> >>> On Fri, Sep 11, 2015 at 1:49 PM, Adam Cox wrote: >>> Hi Angela, you could run the development server just to make sure that apache isn't giving you trouble (though it doesn't really seem like that kind of error). Just make sure port 8000 is accessible and use *python manage.py runserver 0:8000*. I've tried a fresh install of Arches and didn't encounter the errors you found. I have in the past however, and not having loaded the concept schemes is generally the problem. Have you modified any of them (or the resource graphs)? I noticed that on my fresh install there were 1221 concepts, not 1222. On Friday, September 11, 2015 at 12:12:23 PM UTC-5, Angela
Re: [Arches] jQuery error on fresh install of 3.0.4 and hip 1.0.3
Thanks, Adam. I started over in order to test all this: - Reinstalled all dependencies using the bash script at http://arches3.readthedocs.org/en/latest/installing-dependencies-linux/ - Ran through all installation instructions for arches and arches_hip - Opened the firewall to allow temp remote access to django development server NO ERRORS when using the django dev server! Hooray! However, when I host through apache, none of the contents of the arches or arches_hip media directories (e.g. css, js, etc.) are being hosted. I'm assuming this is related to STATICFILES_DIRS = (os.path.join(PACKAGE_ROOT, 'media'),) + STATICFILES_DIRS in settings.py. In my apache host conf, I have media successfully aliased to my app's specific media directory (the one where I would put my custom files like package.css). But, it is not aggregating the other sources for these static files. What is the best way to edit settings.py and/or httpd.conf to make sure that the media directories under arches/ and arches_hip/ are also being hosted? Are people hardcoding this into settings.py? Using symlinks from /var/www? Many thanks, Angela On Friday, September 11, 2015 at 3:59:55 PM UTC-4, Adam Cox wrote: > > Well, to check if it's a problem in your virtual environment, you could > just make a new one (called ENV2 or something), install arches-hip there, > and use it instead. Activate it, reinstall the package and then run the > dev server and see if the problem persists (you'd have to reconfigure the > virtual host if you want apache to use the new virtual environment). Make > sure that your settings.py points to the defaults in arches-hip, i.e. > comment out both the RESOURCE_GRAPH_LOCATIONS and CONCEPT_SCHEME_LOCATIONS > variables so your app will use the defaults. > > > On Fri, Sep 11, 2015 at 2:16 PM, Angela Labrador> wrote: > >> Great catch, Adam. >> >> Good news: I rebuilt the database and reloaded the sample authority files >> -- now I'm at 1221 concepts (I must have added one while poking around). >> >> Not so great news: I disabled apache, edited iptables, ran the django >> development server on 0.0.0.0:8000, pointed the web browser to the new >> port, and... still got the error. >> >> It sounds like it must be something local to my environment, and likely a >> path missing in my settings file or local env. I'll comb through the docs >> again and my logs to see if I can track it down. If any other ideas occur >> to anyone, I'm all ears! >> >> Thanks, >> Angela >> >> On Fri, Sep 11, 2015 at 1:49 PM, Adam Cox > > wrote: >> >>> Hi Angela, you could run the development server just to make sure that >>> apache isn't giving you trouble (though it doesn't really seem like that >>> kind of error). Just make sure port 8000 is accessible and use *python >>> manage.py runserver 0:8000*. >>> >>> I've tried a fresh install of Arches and didn't encounter the errors you >>> found. I have in the past however, and not having loaded the concept >>> schemes is generally the problem. Have you modified any of them (or the >>> resource graphs)? I noticed that on my fresh install there were 1221 >>> concepts, not 1222. >>> >>> On Friday, September 11, 2015 at 12:12:23 PM UTC-5, Angela Labrador >>> wrote: HI Alexei, Thanks for looking into this. Yes, I did load the sample data with no errors reported while running load_concept_scheme. RDM shows 43 collections, 2 schemes, 136 entity types, and 1222 concepts. I should have mentioned that this is on Ubuntu Trusty 14.04.3 and using Apache2 (I believe I have mod_wsgi set up correctly, but that's another variable to throw in the mix as it could be a path missing in my vhost conf file). Thanks again, Angela On Fri, Sep 11, 2015 at 12:15 PM, Alexei Peters wrote: > Hi Angela, > I'll take a look at this this morning and let you know what I find out. > Did you happen to load the sample data? > Cheers, > Alexei > > Sent from my Windows Phone > -- > From: Angela Labrador > Sent: 9/11/2015 7:25 AM > To: Arches Project > Subject: [Arches] jQuery error on fresh install of 3.0.4 and hip 1.0.3 > > Hello, > > I'm really enjoying learning and working with Arches so far. I have > run into a jQuery error on a clean install of Arches 3.0.4 and Arches-Hip > 1.0.3 that I could use some help with: > > When I go to the Resource Manager form for historic resource or > historic district (resources/HERITAGE_RESOURCE.E18/summary/ > or resources/HERITAGE_RESOURCE_GROUP.E27/summary/) I get the following: > Uncaught TypeError: Cannot read property 'undefined' of undefined > /media/js/views/forms/sections/branch-list.js:20 > and "Date Type" and "Keyword" is in red.
Re: [Arches] Re: Installing Arches-HIP: Creating Database Error: ImportError: No module named resource
Hi Mai, are you on your university servers, or on cloud hosted server? It's possible that whatever port you are trying to use is still blocked by a firewall. Django generally runs on 8000 so I'd recommend using runserver 0:8000 (you don't have to explicitly set your IP), but if it looks like the dev server is running correctly and you can't access it, it may be a firewall issue. If you're using cloud hosting, that should be easy to fix, otherwise you may need to talk with your network administrators. If it turns out for some reason that you will not be able to open up port 8000, you can install apache and use that as your webserver instead of the django dev server. Apache runs on the normal port 80, so that should be open for you. (You'll need to do this eventually to make your app production ready anyway.) After looking around, it looks like your main course of action on Red Hat will be to install apache httpd and then edit the /etc/httpd/conf/httpd.conf file to point to your app. Here are a couple of tutorials I was just looking at that should help you out: http://magazine.redhat.com/2008/06/05/installingconfiguringcaching-django-on-your-linux-server/ (mostly steps 4 and 5) https://pragmaticstartup.wordpress.com/2011/04/02/non-techie-guide-to-setting-up-django-apache-mysql-on-amazon-ec2/ (mostly step 3) On Tue, Sep 15, 2015 at 8:11 AM, 'Mai Abdelaziz El Kady' via Arches Projectwrote: > Hi Alexei, > > Apparently I ended up using the pip installation that was outside the > virtual environment, so arches was installed outside it as well. After > using the proper pip, I've got Arches-hip in the right place and after > troubleshooting some more psql related errors, the command "python > manage.py packages -o install" seems to run fine without any errors. so > Thanks a zillion for your continued help and support!! we really appreciate > it. > Now I think we're almost there, we are running this command: > "python manage.py runserver 12.*.*.*:**" > and it runs fine on a terminal returning zero errors and saying "Starting > development server at http://12.*.*.*:**/;, however when opening " > http://12.*.*.* : **/" in a browser, we get a message that the page is > not available. So do you have any idea what could have gone wrong? > > Thanks a lot > > > > On Mon, Sep 14, 2015 at 6:57 PM, Alexei Peters wrote: > >> Hi Mai, >> Wow this is really baffling! >> >> Just to confirm the steps you took to install arches from a clean machine >> (generally): >> >>1. Install pip >>2. pip install virtualenv >>3. $ virtualenv ENV >>4. $ source ENV/bin/activate >>5. (ENV)$ pip install arches_hip >> >> After doing that, you said that you have arches and arches_hip >> directories in the default python location? Is that true? >> >> -Alexei >> >> >> >> Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 >> >> On Mon, Sep 14, 2015 at 12:32 AM, Mai Abdelaziz El Kady < >> mai.abdela...@aucegypt.edu> wrote: >> >>> Hi Alexei, >>> >>> Actually, I used pip install arches_hip >>> >>> Thanks >>> >>> >>> On Sun, Sep 13, 2015 at 7:54 PM, Alexei Peters >>> wrote: >>> Hi Mai, Did you pip install arches, or arches-hip? From the looks of the error message arches-hip isn't installed. Cheers, Alexei Director of Web Development - Farallon Geographics, Inc. - 971.227.3173 On Sun, Sep 13, 2015 at 1:50 AM, wrote: > Hi Adam and Alexei, > > We have decided to start a clean installation of Arches on a new > sever, we are now installing it on Red Hat Enterprise Linux Server release > 6.7. > There are good news and bad news, the bad news is that we got a brand > new error message when running: python manage.py packages -o install from > the virtual environment, the error is listed below. > The good news is that the error message refers to the python that is > in the virtual environment not outside it and when running which python, > it > refers to the one inside the virtual environment > (/projects/ENV/bin/python). However, arches and arches-hip still have > directories in (/usr/local/lib/python2.7/site-packages/) and what I got > from Alexei's reply is that this is not okay. So should I try uninstalling > it again or not. Should these arches directories be in > (/projects/ENV/lib/python2.7/site-packages/) instead, for it to function > correctly? > > The new error that we get is: > Traceback (most recent call last): > File "manage.py", line 28, in > execute_from_command_line(sys.argv) > File > "/opt/projects/ENV/lib/python2.7/site-packages/django/core/management/__init__.py", > line 338, in execute_from_command_line > utility.execute() > File >