This is what I currently have
# here() gives us file paths from the root of the system to the directory
# holding the current file.
here = lambda * x: os.path.join(os.path.abspath(os.path.dirname(__file__)), *x)
PROJECT_ROOT = here("..")
# root() gives us file paths from the root of the system to whatever
# folder(s) we pass it starting at the parent directory of the current file.
root = lambda * x: os.path.join(os.path.abspath(PROJECT_ROOT), *x)
XML_PATH = root("..", "XML")
It doesn't look like you are modifying sys.path though
On Friday, 19 April 2013 14:18:29 UTC-4, Felipe wrote:
-- On Friday, 19 April 2013 14:18:29 UTC-4, Felipe wrote:
You can try to use that! that's works for me!import os# Make filepaths relative to settings.ROOT = os.path.dirname(os.path.abspath(__file__)) path = lambda *a: os.path.join(ROOT, *a)STATIC_ROOT = path('static')MEDIA_ROOT = path('media')
----------------------------------- Felipe Brunelli de Andrade Universidade de São Paulo Bacharelado em Informática - 08 http://www.fandrade.com.br/ ------------------------------ ----- Cel: (16) 8121-5290 / 9718-3939 Tel: (16) 3371-7274 Skype: fbruandrade MSN: felipean...@hotmail.com ICQ: 15909761 ------------------------------ ----- 2013/4/19 Cody Scott <cody.j....@gmail.com>I am trying to use apache to serve my development site locally.I am trying to implement download functionality and figured since it was best done through a web server that I would just serve the with apache from now on.Is this recommended to start using your django site with a web server early?Anyways I installed mod_wsgi and it seemed to work.I am just trying to use http://localhostbut when I go there I get the error[Fri Apr 19 13:29:35 2013] [error] [client 127.0.0.1] ImportError: Could not import settings 'PLP.settings' (Is it on sys.path?): No module named PLP.settingsI am linking to wsgi.py which contains.import osos.environ["DJANGO_SETTINGS_MODULE"] = "PLP.settings" os.environ.setdefault("DJANGO_SETTINGS_MODULE", "PLP.settings") from django.core.wsgi import get_wsgi_applicationapplication = get_wsgi_application()I tried:>>> import sys>>> sys,path.append(PATH_TO_DJANGO_PROJECT) but if I close the interpreter and open it again, it is not in sys.path anymore.--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com .
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en .
For more options, visit https://groups.google.com/groups/opt_out .
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment