I've got a buildout config partially working, but missing ability to find some views. How would you add paths to find cottagematic_bld/cottagematic_com/polls and /home/john/djangotemplates to this buildout config? --------------------------------- [buildout] eggs-directory = /home/john/buildout/eggs extensions = mr.developer sources = sources auto-checkout = django-mptt parts = django eggs = mock django-notification django-page-cms django-haystack [sources] django-mptt = svn http://django-mptt.googlecode.com/svn/trunk/ rev=>0.2.2 path=src-untouched [django] recipe = djangorecipe version = 1.1.1 settings = development urls = http://code.google.com/p/django-messages/source/browse/#svn/branches/message... wsgi = true eggs = ${buildout:eggs} project = cottagematic_com ------------------------------------------------- The django app has info to find things, but somehow the python path doesn't get all of it. From django settings.py: INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', ) TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', ) TEMPLATE_DIRS = ( os.path.join(os.path.dirname(__file__), "templates"), "/home/john/djangotemplates" thanks, John
On 03/17/2010 04:39 PM, John Griessen wrote:
I've got a buildout config partially working, but missing ability to find some views.
How would you add paths to find
cottagematic_bld/cottagematic_com/polls and /home/john/djangotemplates
to this buildout config?
--------------------------------- [buildout] eggs-directory = /home/john/buildout/eggs extensions = mr.developer sources = sources auto-checkout = django-mptt
parts = django
eggs = mock django-notification django-page-cms django-haystack
[sources] django-mptt = svn http://django-mptt.googlecode.com/svn/trunk/ rev=>0.2.2 path=src-untouched
[django] recipe = djangorecipe version = 1.1.1 settings = development urls = http://code.google.com/p/django-messages/source/browse/#svn/branches/message...
Ehm, I don't know that urls parameter? The url points at some django app in svn. If you want to install that one via svn you could look at http://pypi.python.org/pypi/infrae.subversion to install it (and then add it to your eggs list). Not sure I'm looking in the right direction here as your usecase isn't completely clear to me.
The django app has info to find things, but somehow the python path doesn't get all of it. From django settings.py:
First things first: check your bin/django file to see if you miss things from the PYTHON path side of things. If that's the full list you expect, then you can look further in the django settings.
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', )
Apps that aren't listed here aren't searched for templates: is this the full list? You might want to add your "site project" here, too.
TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', )
I'm missing the egg loader template source that's here by default. Perhaps that one helps? Reinout -- Reinout van Rees - reinout@vanrees.org - http://reinout.vanrees.org Programmer at http://www.nelen-schuurmans.nl "Military engineers build missiles. Civil engineers build targets"
Reinout van Rees wrote:
On 03/17/2010 04:39 PM, John Griessen wrote:
I've got a buildout config partially working, but missing ability to find some views.
First things first: check your bin/django file to see if you miss things from the PYTHON path side of things. If that's the full list you expect, then you can look further in the django settings.
INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.admin', )
Apps that aren't listed here aren't searched for templates: is this the full list? You might want to add your "site project" here, too.
TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', )
I'm missing the egg loader template source that's here by default. Perhaps that one helps?
Reinout
My bin/django file does not have a path to admin templates -------------------- #!/usr/bin/python import sys sys.path[0:0] = [ '/home/john/buildout/eggs/mock-0.6.0-py2.5.egg', '/home/john/buildout/eggs/django_notification-0.1.5-py2.5.egg', '/home/john/buildout/eggs/django_page_cms-1.1.2-py2.5.egg', '/home/john/buildout/eggs/django_haystack-1.0.1_final-py2.5.egg', '/home/john/buildout/eggs/djangorecipe-0.20-py2.5.egg', '/home/john/buildout/eggs/zc.recipe.egg-1.2.2-py2.5.egg', '/home/john/buildout/eggs/zc.buildout-1.4.3-py2.5.egg', '/home/john/buildout/eggs/django_staticfiles-0.2.0-py2.5.egg', '/home/john/buildout/eggs/django_authority-0.4-py2.5.egg', '/home/john/WEBprojects/cottagematic_bld/src-untouched/django-mptt', '/home/john/buildout/eggs/django_tagging-0.3.1-py2.5.egg', '/home/john/buildout/eggs/html5lib-0.90-py2.5.egg', '/home/john/WEBprojects/cottagematic_bld/parts/django', '/home/john/buildout/eggs/BeautifulSoup-3.1.0.1-py2.5.egg', '/usr/lib/python2.5/site-packages', '/home/john/WEBprojects/cottagematic_bld/parts/django', '/home/john/WEBprojects/cottagematic_bld', ] import djangorecipe.manage if __name__ == '__main__': djangorecipe.manage.main('cottagematic_com.development') ------------------------------------ the pythonpath when error happens has cottagematic_bld/parts/django' cottagematic_bld/src-untouched/django-mptt' cottagematic_bld cottagematic_bld/bin I think it needs cottagematic_bld/cottagematic_com the project directory.
On 03/17/2010 06:15 PM, John Griessen wrote:
My bin/django file does not have a path to admin templates
The paths in bin/django are locations where python looks for *python code*. So "from django.conf import settings" or so means "search on sys.path for django.conf", basically. The sys.path in bin/django has nothing to do with template locations, apart from one thing: all your django apps need to be findable here for the template loader to be able to find templates in there. I see django in that list, so that's OK:
#!/usr/bin/python
import sys sys.path[0:0] = [ '/home/john/buildout/eggs/mock-0.6.0-py2.5.egg', [...snip...] '/home/john/WEBprojects/cottagematic_bld/parts/django',
Bingo, parts/django. And you've got django.contrib.auth in your INSTALLED_APPS list, so that's OK, too. Weird. Some further brainstorming: - You're missing "cottagematic_com" (your project) in the INSTALLED_APPS list. Is that right? - Your sys.path contains '/usr/lib/python2.5/site-packages', which is not something buildout puts in there by default. Did you modify it by hand? - Your parts/django comes *after* (and also before) that suspicious site-packages: do you perhaps have a different django version installed globally that is thus found earlier than the django you want? - Your cottagematic_bld similarly: that's after site-packages, so you might not be using the settings.py of that '/home/john/WEBprojects/cottagematic_bld', but of an older/different version if that's by chance installed globally in that site-packages. Hm. Probably a good idea to remove the bin/ directory and re-run buildout. Reinout -- Reinout van Rees - reinout@vanrees.org - http://reinout.vanrees.org Programmer at http://www.nelen-schuurmans.nl "Military engineers build missiles. Civil engineers build targets"
participants (2)
-
John Griessen
-
Reinout van Rees