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?


On Thu, Jun 5, 2008 at 6:07 PM, Jeff Anderson <[EMAIL PROTECTED]>
wrote:

> Andre Meyer wrote:
>
>> hi all
>>
>> is it possible to serve static files from the root of a domain name? these
>> files would either be served by apache or runserver from the static
>> directory as defined in the settings.
>>
> Yes this is possible.
>
> You don't want to have django serve static files if its running under
> apache.
> You can make django serve static files.
>
> See: http://www.djangoproject.com/documentation/static_files/
>
> Note the "Big fat disclaimer" near the top
>
>
> Jeff Anderson
>
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to