Re: Runserver/DEBUG only, serve / from static directory

5 views
Skip to first unread message

Bill Freeman

unread,
Apr 21, 2015, 3:53:13 PM4/21/15
to django-users
If I understand your needs, try r'^$', which will catch only the top of the site.  (You might want r'^(?:index.html)?$' in case some old browser you deal with has that fiddle, but the browser really should try what you typed first.)

On Tue, Apr 21, 2015 at 3:02 PM, LiteWait <t...@toogopos.com> wrote:
I have the need in runserver/debug mode to map http://127.0.0.1:8000/ out of a static /client directory.  Django will only serve up pages from /api which a DRF REST services.

I can't seem to find a way to create the URL mapping for this.  It seems https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-during-development describes how to do this but the URL pattern escapes me.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1d9cb2c6-7419-42a9-ad53-74fde9285c5d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages