Re: tutorial --> deploy snag
John Griessen wrote: Next, I'm looking for why in my settings.py TEMPLATE_DIRS = ( "/home/john/djangotemplates" ) is not being used. I found the trouble and fixed already -- That above wasn't a good descr. of the symptom: /home/john/djangotemplates is not on the python path, but is inthe settings.py file as above. Django tried loading these templates, in this order: * Using loader django.template.loaders.filesystem.load_template_source: o /home/john/djangotemplates/polls/poll_list.html (File does not exist) where I can ls -l -rw-rw-r-- 1 john john 191 2010-03-07 18:55 /home/john/djangotemplates/polls/poll_list.html why is the loader stopped? chmod o+x djangotemplates j...@toolbench:~$ chmod o+x djangotemplates/polls/ fixed that. John -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: tutorial --> deploy snag
On Mar 10, 6:11 pm, John Griessen wrote: > Joakim Hove wrote: > >> What have I left out of this Virtualhost configuration? > > Alias /media/ "/usr/local/django/django/contrib/admin/media/" > > HTH - Joakim > > Thanks Joakim, > > I found the corresponding place on my debian system and got admin templates. > > Next, I'm looking for why in my settings.py > > TEMPLATE_DIRS = ( > "/home/john/djangotemplates" > ) > > is not being used. > > Clues? > > John You're confusing templates with assets. Templates are the HTML files which are parsed by Django and determine what markup goes on a page. Assets are the CSS and image files which go alongside. Django doesn't serve assets, so you'll need to configure Apache to serve them directly. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: tutorial --> deploy snag
Joakim Hove wrote: What have I left out of this Virtualhost configuration? Alias /media/ "/usr/local/django/django/contrib/admin/media/" HTH - Joakim Thanks Joakim, I found the corresponding place on my debian system and got admin templates. Next, I'm looking for why in my settings.py TEMPLATE_DIRS = ( "/home/john/djangotemplates" ) is not being used. Clues? John -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: tutorial --> deploy snag
> What have I left out of this Virtualhost configuration? Warning: This is a the very limit of my understanding of Django; but I have the following section in my apache configuration file; I see you have already aliased media to point somewhere else. Alias /media/ "/usr/local/django/django/contrib/admin/media/" Order allow,deny Options Indexes Allow from all IndexOptions FancyIndexing HTH - Joakim -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: tutorial --> deploy snag
Joakim Hove wrote: Hello, I __think__ you must add the path industtromatic_com in your wsgi settings file, i.e. something like: import sys sys.path.append( "/home/john/WEBprojects/industromatic_com" ) Yes, adding the dir above project and project dir to the sys.path let apache2 function to serve the tutorial code. It is without any backgrounds or formatting though. I guess I need to link to or copy some static files used in the tutorial: /var/log/apache2/error.log messages: File does not exist: /home/john/WEBprojects/industromatic_com/media/js File does not exist: /home/john/WEBprojects/industromatic_com/media/css I'll look at the docs for templates and maybe run the devel server and look at the page source it generates for clues about admin page templates. What have I left out of this Virtualhost configuration? ServerAdmin webmas...@industromatic.com ServerName industromatic.com ServerAlias www.industromatic.com WSGIScriptAlias / /home/john/WEBprojects/industromatic_com/industromatic_com.wsgi DocumentRoot /var/www/industromatic.com Alias /media/ /home/john/WEBprojects/industromatic_com/media/ Options FollowSymLinks Indexes MultiViews Order allow,deny Allow from all Order allow,deny Allow from all Thanks, John -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: tutorial --> deploy snag
Hello, I __think__ you must add the path industtromatic_com in your wsgi settings file, > The line > os.environ['DJANGO_SETTINGS_MODULE'] = 'industromatic_com.settings' > refers to a dir I made, /home/john/WEBprojects/industromatic_com, that I > copied the > contents of mysite into. mysite as it was at the end of the tuturial. i.e. something like: import sys sys.path.append( "/home/john/WEBprojects/industromatic_com" ) os.environ["DJANGO_SETTINGS_MODULE"] = 'industromatic_com.settings' HTH - Joakim -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
tutorial --> deploy snag
I've worked through http://docs.djangoproject.com/en/1.1/intro/tutorial01/ to tutorial04 then read up on WSGI, got that to go with a hello world output. Then I decided to copy the tutorial to a name of a site I want to test over the internet -- one with DNS pointing to its name, industromatic.com. I made this directory on my local machine, not over internet yet. The line os.environ['DJANGO_SETTINGS_MODULE'] = 'industromatic_com.settings' refers to a dir I made, /home/john/WEBprojects/industromatic_com, that I copied the contents of mysite into. mysite as it was at the end of the tuturial. I changed mysite to industromatic_com everywhere in the files and the project still runs fine if I do python manage.py runserver and browse http://127.0.0.1:8000/polls/1 but when I use the apache2 setup for industromatic.com I get errors (from the debug = True output), that always contain this that I think is a clue: Exception Value:No module named polls.urls /usr/lib/pymodules/python2.5/django/utils/importlib.py in import_module 35. __import__(name) name 'polls.urls' Does that give anyone a clue? I'm thinking I need more on the python path, or cloning a project by copying and text processing is bad to do... Thanks, John -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.