Adam, There is another setting in settings.py that needs to be updated to allow for projects that aren't named arches: APP_ROOT = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) is going to result in a path that includes the name of my project.
APP_Root is then used in a number of other paths, resulting in a bunch of 404s, because the files are actually located in an arches folder under ENV/lib/python2.7/site-packages. Rather than copy all the files in the arches folder to a folder with my project name or renaming the arches folder, how would you recommend APP_ROOT be defined? Thanks, Martha On Thursday, May 16, 2019 at 12:36:12 PM UTC-7, Adam Cox wrote: > > Ok, are you using this documentation for setting up Apache? > https://arches.readthedocs.io/en/stable/serving-arches-with-apache/#setup-apache > > Now that I'm looking at it, I think the paths in it should be updated to > use the my_project context that we use in the main installation > instructions. Looks like I originally wrote it as to serve the "core" > arches code, not a separate project. > > If you are getting errors about importing settings, the first thing to > check is that the paths in the python process are correct. > > So, this is what I'll be putting in the docs right now for an update: > > WSGIDaemonProcess arches > python-path=/home/ubuntu/Projects/my_project:/home/ubuntu/Projects/ENV/lib/python2.7/site-packages > WSGIScriptAlias / > /home/ubuntu/Projects/my_project/my_project/wsgi.py process-group=arches > > I think the key difference here is that the first path in the > "python-path" argument is to the directory above my_project/settings.py. > > Let me know if that works. > > Adam > > > > On Thu, May 16, 2019 at 2:00 PM Martha S <[email protected] > <javascript:>> wrote: > >> My development server is running fine, too, Adam, >> >> This problem surfaces when we try to deploy in Apache. >> >> Martha >> >> On Thursday, May 16, 2019 at 11:40:56 AM UTC-7, Adam Cox wrote: >>> >>> Hi Martha, >>> >>> I just unmarked Colin's answer as a duplicate so that I could address >>> the settings question he had. In short, if you are having trouble, I think >>> it must be a different issue; it sounds like his development server was >>> running fine. >>> >>> Cheers, >>> Adam >>> >>> On Thu, May 16, 2019 at 1:25 PM Martha S <[email protected]> wrote: >>> >>>> Since Colin's thread was locked and re-directed, I'm using the same >>>> title to respond to his comment regarding my_project.settings. When we >>>> reached the same point with the same problem, I examined some of the stack >>>> trace. As Colin is doing, I am installing arches on a new machine, not >>>> upgrading a machine with an older version. >>>> >>>> It appears that giving your project a name other than arches results in >>>> some invalid settings in some of the py files. For example, settings.py >>>> loads the arches library, but immediately makes calls to modules in the >>>> projectname library, which doesn't exist: >>>> >>>> import os >>>> import arches >>>> import inspect >>>> >>>> try: >>>> from arches.settings import * >>>> except ImportError: >>>> pass >>>> >>>> APP_ROOT = >>>> os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) >>>> STATICFILES_DIRS = (os.path.join(APP_ROOT, 'media'),) + >>>> STATICFILES_DIRS >>>> >>>> DATATYPE_LOCATIONS.append('hpla.datatypes') >>>> FUNCTION_LOCATIONS.append('hpla.functions') >>>> >>>> >>>> >>>> Similarly, wsgi.py, which is the file that generated the error Colin >>>> mentioned, fails on the following line: >>>> >>>> os.environ['DJANGO_SETTINGS_MODULE'] = "hpla.settings" >>>> >>>> I experimented with changing hpla to arches in wsgi.py and got further, >>>> but I'm about to scrap everything and re-install the project as arches. I >>>> could go through all of the files in the stack trace and replace all >>>> 'hpla.' occurrences with 'arches.', but I think it will be easier for >>>> long-term maintenance to just go with arches. So long as I can call the >>>> production product what I want, I should be fine. >>>> >>>> >>>> -- >>>> -- To post, send email to [email protected]. To unsubscribe, >>>> send email to [email protected]. For more information, visit >>>> https://groups.google.com/d/forum/archesproject?hl=en >>>> --- >>>> You received this message because you are subscribed to the Google >>>> Groups "Arches Project" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/archesproject/e81e3cd8-098a-40fd-bf97-7af64d42b7c2%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/archesproject/e81e3cd8-098a-40fd-bf97-7af64d42b7c2%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> -- To post, send email to [email protected] <javascript:>. To >> unsubscribe, send email to [email protected] <javascript:>. For >> more information, visit >> https://groups.google.com/d/forum/archesproject?hl=en >> --- >> You received this message because you are subscribed to the Google Groups >> "Arches Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/archesproject/864e8eb1-89bd-465d-bc3b-ae3f95258131%40googlegroups.com >> >> <https://groups.google.com/d/msgid/archesproject/864e8eb1-89bd-465d-bc3b-ae3f95258131%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/archesproject/80439e9c-465e-484a-be99-7e02818d3a66%40googlegroups.com.
