thanks a lot, Colin, i will contact the WebFaction guys for the apache setup. they are always very helpful ;-)
HOWEVER: for testing purposes only, using only runserver and sqlite, how to preceed for making this work? *http://localhost:8000/ <http://mysite.com/> --> static/index.html (NOT a template) *http:// <http://mysite.com/myapp1>localhost:8000 <http://mysite.com/>myapp1<http://mysite.com/myapp1> --> myapp1/index.html (a template) http:// <http://mysite.com/myapp2>localhost:8000 <http://mysite.com/>/myapp2<http://mysite.com/myapp2> --> myapp2/index.html (a template) http:// <http://mysite.com/myapp2>localhost:8000 <http://mysite.com/>/admin<http://mysite.com/myapp2> --> the admin interface how to get the first url work with runserver? i can only get it to render a template, but not server up an html file from the static directory. thanks again André On Tue, Jun 10, 2008 at 1:34 AM, Colin Bean <[EMAIL PROTECTED]> wrote: > > On Mon, Jun 9, 2008 at 3:25 PM, Andre Meyer <[EMAIL PROTECTED]> > wrote: > > thanks Jeff > > > > yes, i had found this method of having django serve static content, too, > and > > know it is not ideal. > > > > what i want is different: use apache for serving the static content at > the > > root of the site (defind in settings.py and urls.py) and have a couple of > > django apps which are accessible just with simple paths. the urls are > what > > disturbs me, because i cannot get anything from just http://mysite.org/, > but > > instead need to access http://mysite.org/myproject. > > > > again, the non-functional code (raises "TemplateDoesNotExist at > > /static/index.html" in views): > > > > urls.py > > > > urlpatterns = patterns('myproject.views', > > (r'^$', 'home') > > > > views.py > > > > def home(request): > > return render_to_response('static/index.html') > > > > maybe use something like > > return HttpResponse('/static/index.html') > > but how? > > > > > > Hi Andre, > > You'll need to set this up in your apache configuration, and the part > that deals with serving static files is going to be independent of any > django code or settings. > > You just need to change the DocumentRoot of your site to the "static" > directory where your index.html is located. It sounds like you've > already got django set up to serve the "myproject" directories, so > you're pretty close. Don't know how apache setup works at WebFaction, > but if you're having trouble you should post the relevant sections > from your apache configuration (if possible). > > A quick read over the apache docs will explain this much more > thourghly than I did :) If there's one concept to take away, remember > that if apache's serving a static file, apache handles absolutely > every step of the process, and if python/django got involved in any > way you'd lose the performance benefit of serving directly from from > apache. > > Colin > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---