Profile for dougnc
| Name | dougnc |
|---|---|
| Email Address | Reveal this emailaddress |
| Posts | 3 |
-
- 2010-02-26 21:05:18
- Replacing ./manage.py runserver with Apache.
- Board » General
-
It's been ages since the last time I set up apache, so I'm sure these are stupid questions.
I have a directory /home/doug/django, and underneath that are going to be different websites. Let's say one is called "support". Underneath support I have my module and the sphene directory from communitytools/sphenecoll
What I did here is follow your instructions on setting up a sample website, then moved my module into it. I found this was much simpler than trying to incorporate your stuff into my website.
I configured apache to see /home/doug/django as root, and set up a virtual host 'support'
It seems to see my settings.py, but gives me this error when I try to load http://myserver/bbjsupport/
ImproperlyConfigured: Error importing middleware sphene.community.middleware: "No module named sphene.community.middleware"
I have two goals here. One is to use my development server as also the web server. When someone outside types in support.com I want apache to serve it as a virtual website.
The second is to have everything in one directory so I can host it elsewhere.
-
- 2009-12-13 21:57:36
- Re: Serving static files and using sphene with multiple websites
- Board » General
-
Thanks! I'm new to django, I had no idea I had to change MEDIA_URL. I changed this line in settings.py and somehow it worked.
MEDIA_URL = 'http://localhost:8000/static/'
I can't really risk people on one website accessing the boards on other websites, so I think I'll stick to embedding sphene in each website. It seems easy enough.
Not to abuse your hospitality, but do you know why I'm getting this error when I click on "Notify me by email on new posts." ?
Page not found (404)
Request Method:
GET
Request URL:
http://localhost:8000/board/togglemonitor_group//
Using the URLconf defined in bbjsupport.urls, Django tried these URL patterns, in this order:
^bbjsupport/$
^bbjsupport/(?P<Ranking>\d+)/$
^community/
^board/ ^$
^board/ ^feeds/(?P<url>.+)/$
^board/ ^show/(?P<category_id>\d+)/$
^board/ ^list_threads/(?P<category_id>\d+)/$
^board/ ^latest/(?P<category_id>\d+)/$
^board/ ^thread/(?P<thread_id>\d+)/$
^board/ ^options/(?P<thread_id>\d+)/$
^board/ ^move/(?P<thread_id>\d+)/$
^board/ ^post/(?P<category_id>\d+)/(?P<post_id>\d+)/$
^board/ ^post/(?P<category_id>\d+)/$
^board/ ^reply/(?P<category_id>\d+)/(?P<thread_id>\d+)/$
^board/ ^annotate/(?P<post_id>\d+)/$
^board/ ^vote/(?P<thread_id>\d+)/$
^board/ ^togglemonitor_(?P<monitortype>\w+)/(?P<object_id>\d+)/$
^board/ ^catchup/(?P<category_id>\d+)/$
^board/ ^poll/(?P<poll_id>\d+)/edit/$
^wiki/
^static/sphene/(.*)$
^site_media/(?P<path>.*)$
^admin/(.*)
The current URL, board/togglemonitor_group//, didn't match any of these.
-
- 2009-12-13 19:28:54
- Serving static files and using sphene with multiple websites
- Board » General
-
I've successfully integrated Sphene into a website I'm developing, except I can't get the folder icons to appear.
I've tried this (site_media is where I put my static files), but no luck:
(r'^static/sphene/(.*)$', 'django.views.static.serve', {'document_root': '/home/doug/django/bbjsupport/sct-0.5/communitytools/static/sphene/' }),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/doug/django/bbjsupport/site_media/',
'show_indexes': True}),
On another question, I'm wanting to use Sphene in several completely different websites. I've read here that there's another way of doing this besides integrating sphene directly into your website. I like the way it works now for me, but I was wondering the pros and cons.
Thanks!


