Bug? django fails to serve static files in Windows 10

2019-10-02 Thread red sky
my system: Windows 10 1903, Python 3.7.4, 64 bit My directory structure %USERPROFILE%/Desktop/myproject/manage.py %USERPROFILE%/Desktop/myproject/some_app/(...) %USERPROFILE%/Desktop/myproject/myproject/sqlite3.db %USERPROFILE%/Desktop/myproject/myproject/static (...)

Re: serve static files

2013-08-27 Thread Wesley Ni
; > If you want to manually add staticfile serving, you have to give > --nostatic parameter to runserver to omit all magic that happena > automatically. > > > On Mon, 26 Aug 2013 07:58:38 -0700 (PDT) > Wesley Ni <wesley...@gmail.com > wrote: > >

Re: serve static files

2013-08-26 Thread Jani Tiainen
. On Mon, 26 Aug 2013 07:58:38 -0700 (PDT) Wesley Ni <wesley.ni...@gmail.com> wrote: > I hit an issue when trying serve static files. > > In settings, debug is True, and with the followinig: > STATIC_ROOT = os.path.join(freelancer_path,"staticfiles") > STATIC_URL

Re: serve static files

2013-08-26 Thread Wesley Ni
ROOT, try 'document_root' : > settings.STATIC_ROOT, > > > On Mon, Aug 26, 2013 at 10:05 AM, Wesley Ni <wesley...@gmail.com > > wrote: > >> Forget to say that I use Django 1.5.2 >> >> 在 2013年8月26日星期一UTC-4上午10时58分38秒,Wesley Ni写道: >> >>> I hit a

Re: serve static files

2013-08-26 Thread Mantas Zilinskis
> I hit an issue when trying serve static files. >> >> In settings, debug is True, and with the followinig: >> STATIC_ROOT = os.path.join(freelancer_path,"**staticfiles") >> STATIC_URL = '/staticfiles/' >> >> urls.py: >> (r'^staticfiles/(?P.*)$'*

serve static files

2013-08-26 Thread Wesley Ni
I hit an issue when trying serve static files. In settings, debug is True, and with the followinig: STATIC_ROOT = os.path.join(freelancer_path,"staticfiles") STATIC_URL = '/staticfiles/' urls.py: (r'^staticfiles/(?P.*)$','django.contrib.staticfiles.views.serve', {'doc

Re: serve static files

2013-08-26 Thread Wesley Ni
Forget to say that I use Django 1.5.2 在 2013年8月26日星期一UTC-4上午10时58分38秒,Wesley Ni写道: > > I hit an issue when trying serve static files. > > In settings, debug is True, and with the followinig: > STATIC_ROOT = os.path.join(freelancer_path,"staticfiles") > STATIC_URL =

Re: Using an external Server to serve Static files - Development Server

2013-08-22 Thread Nikolas Stevenson-Molnar
Try changing the first line to {% load static from staticfiles %} _Nik On 8/21/2013 6:27 PM, Ideo Rex wrote: > {% load staticfiles %} > > > > This is just for my css file (there are other categories under lifestream. > > server: https://my.site.com/DJStatic/static/livestream/css/style.css > >

Re: Using an external Server to serve Static files - Development Server

2013-08-21 Thread Kelvin Wong
This is how I do it. In settings.py: STATIC_ROOT = '/home/user/app/site_media/static/' # Generated files here from 'manage.py collectstatic' STATIC_URL = 'http://static.example.com/static/' In templates: {% load staticfiles %} ... Produces:

Re: Using an external Server to serve Static files - Development Server

2013-08-21 Thread Ideo Rex
{% load staticfiles %} This is just for my css file (there are other categories under lifestream. server: https://my.site.com/DJStatic/static/livestream/css/style.css On Wednesday, August 21, 2013 6:18:37 PM UTC-7, Nikolas Stevenson-Molnar wrote: > > That should work... how are you

Re: Using an external Server to serve Static files - Development Server

2013-08-21 Thread Nikolas Stevenson-Molnar
That should work... how are you referencing your static files from your templates? _Nik On 8/21/2013 6:09 PM, Ideo Rex wrote: > Hello, > I have a different request that I couldn't find anywhere else on the > internet. I'm an intern who has built a Django Web Application for my > project

Using an external Server to serve Static files - Development Server

2013-08-21 Thread Ideo Rex
Hello, I have a different request that I couldn't find anywhere else on the internet. I'm an intern who has built a Django Web Application for my project (basically a large experiment). The cite will never leave development, but I'm holding my static files and templates on another server. I

Re: Serve static files in production server

2013-01-02 Thread Stefano Tranquillini
On Sunday, December 30, 2012 6:01:24 PM UTC+1, Amirouche wrote: > > Héllo Stefano, > > On Sunday, December 30, 2012 1:27:12 PM UTC+1, Stefano Tranquillini wrote: >> >> Hi all. >> in the appfog ML we were fighting again the possibility to serve static >> file in django without using an external

Re: Serve static files in production server

2012-12-30 Thread Amirouche
Héllo Stefano, On Sunday, December 30, 2012 1:27:12 PM UTC+1, Stefano Tranquillini wrote: > > Hi all. > in the appfog ML we were fighting again the possibility to serve static > file in django without using an external server. > So far AF does not provide a setup of the server to split the

Re: How to serve static files on heroku without any cloud storage like Amazon S3

2012-07-08 Thread Rafael Durán Castañeda
El 08/07/12 06:08, surya escribió: My project is on heroku and my website templates has some CSS, JS files. Totally 5 of them. I don't want to get off with amazon s3 for the sake of those 5 files (very small ones). However, I even need to enter my credit -card, which I don't like :P So, as

How to serve static files on heroku without any cloud storage like Amazon S3

2012-07-07 Thread surya
My project is on heroku and my website templates has some CSS, JS files. Totally 5 of them. I don't want to get off with amazon s3 for the sake of those 5 files (very small ones). However, I even need to enter my credit -card, which I don't like :P So, as far as I know, my only option is to

Re: How can I serve static files while requiring Django-based access permissions?

2011-11-09 Thread zak
Thanks for another great suggestion. My really pressing questions have been successfully answered, I now have a high-performance solution for the final version and a purely Python/Django solution for initial testing and demos. Hopefully I can figure out how to make the high-performance solution

Re: How can I serve static files while requiring Django-based access permissions?

2011-11-09 Thread Tom Evans
On Tue, Nov 8, 2011 at 11:12 PM, zak wrote: > Thank you, that is a very helpful suggestion. > > However, I have a followup question. What are my options if: > > 1. It is okay to be slow (low performance), and > 2. The method must work on any webserver, not necessarily or >

Re: How can I serve static files while requiring Django-based access permissions?

2011-11-08 Thread zak
Thank you, that is a very helpful suggestion. However, I have a followup question. What are my options if: 1. It is okay to be slow (low performance), and 2. The method must work on any webserver, not necessarily or specifically Apache or Nginx. In pure Python/Django, how do I open a file on

Re: How can I serve static files while requiring Django-based access permissions?

2011-11-08 Thread Ian Clelland
On Tue, Nov 8, 2011 at 2:11 PM, zak2011 wrote: > Dear Django Users, > > tl;dr: Please tell me what strategies I might use to serve a large > static file from within Django, from views.py. > > If I want to limit access to a particular page in a Django app, I can > do something

How can I serve static files while requiring Django-based access permissions?

2011-11-08 Thread zak2011
Dear Django Users, tl;dr: Please tell me what strategies I might use to serve a large static file from within Django, from views.py. If I want to limit access to a particular page in a Django app, I can do something like this in views.py: (Note: I will use four periods to indent, because spaces

Re: Cannot serve static files

2009-01-22 Thread john
Ok finally got it. David Zhou above, earlier mentioned adding static file directory to css link (ie, ) but when i did that it didn't work. I must have had something wrong somewhere else. Anyway, i made some more changes after reading info here:

Re: Cannot serve static files

2009-01-22 Thread john
ah ok. good catch. My MEDIA_ROOT = C:\dev\proj. But my media directory is actually in my app directory, one directory down. I fixed MEDIA_ROOT to equal C:\dev\proj\app and still not having any luck. my use of -\ in directory structure example is just to indicate a folder in directory tree. Let me

Re: Cannot serve static files

2009-01-22 Thread Dj Gilcrease
Sorry that should be {{MEDIA_URL}} Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Jan 22, 2009 at 9:30 AM, Puneet Madaan wrote: > beside you need to correct settings.py to > > SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__)) > > >

Re: Cannot serve static files

2009-01-22 Thread Puneet Madaan
well at my side it works well on both *nix and windoof platforms... here is what I use on my projects... settings.py -- import platform import os PROJECT_DIR = os.path.dirname( os.path.abspath(__file__)) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'static') --- urls.py

Re: Cannot serve static files

2009-01-22 Thread john
Thanks but no change. On Jan 22, 11:30 am, Puneet Madaan wrote: > beside href="{MEDIA_URL}css/styles.css"> > you need to correct settings.py to > > SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__)) > > > > On Thu, Jan 22, 2009 at 5:26 PM, john

Re: Cannot serve static files

2009-01-22 Thread Puneet Madaan
beside you need to correct settings.py to SETTINGS_FILE_FOLDER = os.path.dirname( os.path.abspath(__file__)) On Thu, Jan 22, 2009 at 5:26 PM, john wrote: > > Thanks but no change. > > On Jan 22, 11:02 am, Dj Gilcrease wrote: > > change > > > >

Re: Cannot serve static files

2009-01-22 Thread john
Thanks but no change. On Jan 22, 11:02 am, Dj Gilcrease wrote: > change > > to > > > Dj Gilcrease > OpenRPG Developer > ~~http://www.openrpg.com > > On Thu, Jan 22, 2009 at 8:53 AM, john wrote: > > > No matter what i do i can't get my css to

Re: Cannot serve static files

2009-01-22 Thread Dj Gilcrease
change to Dj Gilcrease OpenRPG Developer ~~http://www.openrpg.com On Thu, Jan 22, 2009 at 8:53 AM, john wrote: > > No matter what i do i can't get my css to load. 100% Frustrated with > Django. My index page loads when i request http://127.0.0.1:8000/ but > it is

Re: Cannot serve static files

2009-01-22 Thread David Zhou
On Thu, Jan 22, 2009 at 10:53 AM, john wrote: > > No matter what i do i can't get my css to load. 100% Frustrated with > Django. My index page loads when i request http://127.0.0.1:8000/ but > it is not styled. Django dev server returns 404 in console for "GET / >

Cannot serve static files

2009-01-22 Thread john
No matter what i do i can't get my css to load. 100% Frustrated with Django. My index page loads when i request http://127.0.0.1:8000/ but it is not styled. Django dev server returns 404 in console for "GET / css/styles.css HTTP/1.1" In my base template i have: In my urls.py I have:

Re: serve static files

2008-06-17 Thread Molly
I think I may have figured out the problem.. I needed my admin_media folder to be in my media folder Thanks for the help :) I appreciate both of your responses! Molly On Jun 17, 1:37 pm, "Norman Harman" <[EMAIL PROTECTED]> wrote: > Molly wrote: > > How would I call the static file in my

Re: serve static files

2008-06-17 Thread Norman Harman
Molly wrote: > How would I call the static file in my browser?? By typing in the url to the static file directly in the address bar. For example if your server is example.com, root of django app is myapp, and images are in img dir, and image is named myjp.jpg the url would be

Re: serve static files

2008-06-17 Thread Molly
How would I call the static file in my browser?? Sorry, i'm still a beginner! :P Thanks for the response :) Molly On Jun 17, 12:16 pm, chris vigelius <[EMAIL PROTECTED]> wrote: > Am Dienstag, 17. Juni 2008 17:22:46 schrieb Molly: > > > I created a django app and turned it into a stand alone

Re: serve static files

2008-06-17 Thread chris vigelius
Am Dienstag, 17. Juni 2008 17:22:46 schrieb Molly: > I created a django app and turned it into a stand alone app. > > Everything is working, except for the look of the page is all messed > up. what happens if you call one of the static files directly in your browser? Does the path to the static

serve static files

2008-06-17 Thread Molly
I created a django app and turned it into a stand alone app. Everything is working, except for the look of the page is all messed up. I need to serve static files (I think) in urls.py but somehow I am messing up my code

Re: Apache does not serve static files from document root

2007-08-20 Thread Peter Melvyn
On 8/20/07, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Have you read the mod_python documentation on Django site? It gives an > example, which modified for your case would be: > > > SetHandler None > > > The important bit is the SetHandler directive. Have you done that? Yes, I did.

Re: Apache does not serve static files from document root

2007-08-20 Thread Graham Dumpleton
On Aug 21, 3:21 am, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > On 8/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > Not really Django related, so I'll do this briefly... > > Yes, I know. I appreciate your prompt reply. Thanks. > > > In this case you'll probably want to add another

Re: Apache does not serve static files from document root

2007-08-20 Thread Peter Melvyn
On 8/20/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not really Django related, so I'll do this briefly... Yes, I know. I appreciate your prompt reply. Thanks. > In this case you'll probably want to add another Location section before > this one to handle things to WWW-ROOT/bizweb

Re: ANN: New document: How to serve static files

2005-11-27 Thread Adrian Holovaty
On 11/27/05, Christopher Lenz <[EMAIL PROTECTED]> wrote: > > How to serve static files > > http://www.djangoproject.com/documentation/static_files/ > > Can you maybe elaborate on why this approach is considered insecure? Mainly because it hasn't been security-audited

Re: ANN: New document: How to serve static files

2005-11-27 Thread Christopher Lenz
Am 27.11.2005 um 15:48 schrieb Adrian Holovaty: A commonly asked question is how to serve static files with Django. Here's the answer, finally documented. How to serve static files http://www.djangoproject.com/documentation/static_files/ Can you maybe elaborate on why this approach

Re: ANN: New document: How to serve static files

2005-11-27 Thread Fat
it's very useful! good job

ANN: New document: How to serve static files

2005-11-27 Thread Adrian Holovaty
A commonly asked question is how to serve static files with Django. Here's the answer, finally documented. How to serve static files http://www.djangoproject.com/documentation/static_files/ Adrian -- Adrian Holovaty holovaty.com | djangoproject.com | chicagocrime.org