perfect thanks Javier. 

I guess my question should have been phrased, if debug = False, does the 
runserver serve static files  from the STATIC_ROOT. Clearly that's no.

Thanks again.

 Fred




On Wednesday, January 16, 2013 7:19:01 PM UTC, Javier Guerra wrote:
>
> On Wed, Jan 16, 2013 at 6:54 AM, Fred Kingham 
> <fredk...@gmail.com<javascript:>> 
> wrote: 
> > Can you serve static files like you would in production from the django 
> > runserver? 
>
> it depends on what you mean by "like you would in production": 
>
> if you mean "separate processes for static files and web app" then no, 
> it can't since it's a single server. 
>
> if you mean simply serve static files by whatever mechanisms but 
> keeping the same URLs, then yes.  check 
>
> https://docs.djangoproject.com/en/1.4/ref/contrib/staticfiles/#django.contrib.staticfiles.templatetags.staticfiles.django.contrib.staticfiles.views.serve
>  
>  (almost at the end of the contrib/staticfiles doc page).   in short, 
> it simply adds some a view function to handle STATIC_URL from the 
> files in any directory searchable by collectstatic.  note that that 
> means you don't have to run collectstatic for it to work, it's only 
> needed for deployment. 
>
>
> -- 
> Javier 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7sm3q9QqTUQJ.
To post to this group, send email to django-users@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.

Reply via email to