Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
How to serve staticfiles with full URL for local development?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
lucky  
View profile  
 More options May 5 2012, 3:55 am
From: lucky <e.genera...@gmail.com>
Date: Sat, 5 May 2012 00:55:53 -0700 (PDT)
Local: Sat, May 5 2012 3:55 am
Subject: How to serve staticfiles with full URL for local development?
There was a snippet to display a content of response in browser during
debugging  http://miniblog.glezos.com/post/3388080372/tests-browser .

"One of the first issues you might face is seeing a style-less page.
This happens becuase the test server isn’t really a web server, and
you’re probably serving static files from something relative such as '/
site_media'. The solution is simple: Run a separate Django server and
tweak your development-only static URL to something like:

STATIC_URL = 'http://localhost:8000/site_media/
"

but this doesn't works anymore, because django.contrib.staticfiles
doesn't serve static when STATIC_URL contains full URL.

I found the node at https://docs.djangoproject.com/en/dev/howto/static-files/#serving-sta...
:

"That's because this view is grossly inefficient and probably
insecure. This is only intended for local development, and should
never be used in production.

Additionally, when using staticfiles_urlpatterns your STATIC_URL
setting can't be empty or a full URL, such as http://static.example.com/."

Is there a way to omit this limitation for local development?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karen Tracey  
View profile  
 More options May 5 2012, 7:20 am
From: Karen Tracey <kmtra...@gmail.com>
Date: Sat, 5 May 2012 07:20:51 -0400
Local: Sat, May 5 2012 7:20 am
Subject: Re: How to serve staticfiles with full URL for local development?
Please ask questions about using Django on django-users. The topic of
this list is the development of Django itself.

Karen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »