Serving static files with whitenoise

2024-05-13 Thread Richlue King
Hi, I'm trying to upload my project to render.com and I need to set up the static files with whitenoise. However, when I run collectstatic, I keep encountering this error: Post-processing 'assets\css\bootstrap.min.css' failed! raise ValueError( ValueError: The file 'assets/css/bootstrap.min.css

Re: Serving static files in production

2023-04-27 Thread David Nugent
Don't think I ever used alias for this. You could try something like this (works for me - this is a cut and paste of an existing working config) though you may be a little more constrained with names of directories: server { [... elided] location / { location ~ /static/ {

Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
@Prosper, I installed whitenoise at some point, but later removed its configuration. On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia wrote: > Is whitenoise installed and added to MiddleWare? > > On Thu, Apr 27, 2023, 00:37 David Nugent wrote: > >> Ensure that nginx is correctly configured, since

Re: Serving static files in production

2023-04-26 Thread Brian Odhiambo
Thanks for your response @David. Here is my nginx configuration.[image: 1c9b64ec-c74f-4004-8b8d-9a6e7a3d8069.png] Pointed it to staticfiles after running collectstatic files command. On Thu, Apr 27, 2023 at 8:11 AM Prosper Lekia wrote: > Is whitenoise installed and added to MiddleWare? > > On Th

Re: Serving static files in production

2023-04-26 Thread Prosper Lekia
Is whitenoise installed and added to MiddleWare? On Thu, Apr 27, 2023, 00:37 David Nugent wrote: > Ensure that nginx is correctly configured, since from what you have > provided the django configuration looks correct (although I generally use > /static/ as STATIC_URL - with the leading / but sho

Re: Serving static files in production

2023-04-26 Thread David Nugent
Ensure that nginx is correctly configured, since from what you have provided the django configuration looks correct (although I generally use /static/ as STATIC_URL - with the leading / but should work as you have it). Check the nginx error log to try to discover the cause of the 404s. I suspect th

Serving static files in production

2023-04-26 Thread Brian Odhiambo
Hello everyone, I am deploying a django project to a dedicated server. I have set nginx to find static files in this file "staticfiles". This is the setting in settings.py file: STATIC_ROOT = BASE_DIR / 'staticfiles' STATIC_URL = 'static/' After running collectstatic command, my project can't st

403 serving static files

2020-05-24 Thread みやうち`
Hi, I'm trying to serve static files using nginx, but nginx gives following error. - [error] 8202#8202: *10 open() "/home/user/myproject/media/xxx.jpg" failed (13: Permission denied) I've tried giving all users permission to this directory and it didn't change. What is the cause? I'm using mo

Re: Django not serving static files with even after collectstatic

2017-07-02 Thread Antonis Christofides
Hello, Take a look at https://djangodeployment.com/2016/11/21/how-django-static-files-work-in-production/ and if you still have problems show us the related nginx or apache configuration. Regards, Antonis Antonis Christofides http://djangodeployment.com On 2017-07-03 02:25, Dennis Gathagu wro

Re: Django not serving static files with even after collectstatic

2017-07-02 Thread Dylan Reinhold
django does not (should not) serve your static files. You want your web server to serve up those files, so you dont have the overheard of url routing for files that don't need to run any python code to display. Dylan On Sun, Jul 2, 2017 at 4:25 PM, Dennis Gathagu wrote: > i'm having problems wi

Django not serving static files with even after collectstatic

2017-07-02 Thread Dennis Gathagu
i'm having problems with django static files in production.I know django requires that you collectstatic during deployment, which i did. The real problem comes when i try to access my page on the browser and i get a 403 forbidden error on all static files. I tried changing my permissions and

Re: Serving static files

2016-06-28 Thread Ankush Thakur
7:33 AM, Tim Graham wrote: > The concerns about needing a separate server are likely overblown. In > particular, Whitenoise is a popular solution for static file serving using > Python. See its FAQ: > http://whitenoise.evans.io/en/stable/#isn-t-serving-static-files-from-pyt

Re: Serving static files

2016-06-28 Thread Tim Graham
The concerns about needing a separate server are likely overblown. In particular, Whitenoise is a popular solution for static file serving using Python. See its FAQ: http://whitenoise.evans.io/en/stable/#isn-t-serving-static-files-from-python-horribly-inefficient On Tuesday, June 28, 2016 at 9

Re: Serving static files

2016-06-28 Thread Ankush Thakur
d in tutorials that frameworks are horrible > > when it comes to service static files. In production, also, one needs to > set > > up another dedicated server to serve static files. > > > > I'm wondering why. What is so special about serving static files that

Re: Serving static files

2016-06-27 Thread ludovic coues
akur : > I keep hearing in the docs and in tutorials that frameworks are horrible > when it comes to service static files. In production, also, one needs to set > up another dedicated server to serve static files. > > I'm wondering why. What is so special about serving static fil

Serving static files

2016-06-27 Thread Ankush Thakur
I keep hearing in the docs and in tutorials that frameworks are horrible when it comes to service static files. In production, also, one needs to set up another dedicated server to serve static files. I'm wondering why. What is so special about serving static files that a framework comes

Re: Serving static files and media in Django 1.7.1

2015-01-06 Thread Sithembewena Lloyd Dube
Thanks @Vijay! Can't believe that caught me out like that. Regards, Sithu On Wed, Jan 7, 2015 at 1:34 AM, Vijay Khemlani wrote: > the static tag should be > > {% static 'mainsite/bootstrap.css' %} > > according to the layout you said > > On Tue, Jan 6, 2015 at 8:30 PM, Sithembewena Lloyd Dube

Re: Serving static files and media in Django 1.7.1

2015-01-06 Thread Vijay Khemlani
the static tag should be {% static 'mainsite/bootstrap.css' %} according to the layout you said On Tue, Jan 6, 2015 at 8:30 PM, Sithembewena Lloyd Dube wrote: > Hi everyone, > > I have a Django 1.7.1 project structured as per documentation. In it, I > have an app called "mainsite". In mainsite

Serving static files and media in Django 1.7.1

2015-01-06 Thread Sithembewena Lloyd Dube
Hi everyone, I have a Django 1.7.1 project structured as per documentation. In it, I have an app called "mainsite". In mainsite, I have templates/mainsite/index.html and static/mainsite/bootstrap.css. In the index template, I use {% load staticfiles %} and then for css I have the following link:

Re: Serving static files (admin panel and others)

2014-12-13 Thread Muhammed Tüfekyapan
I find the problem. Problem was the file dir nginx looking for static file is different than I used for static file. I changed the files location and it solved. Thanks for response. On Sunday, December 14, 2014 4:31:49 AM UTC+2, Florian Schweikert wrote: > > On 14/12/14 00:55, Muhammed Tüfe

Re: Serving static files (admin panel and others)

2014-12-13 Thread Florian Schweikert
On 14/12/14 00:55, Muhammed Tüfekyapan wrote: > I try many things to serve .css files but I can't do that. How can i > serve .css and .js files in Django 1.7? > > > I typed django manage.py collectstatic but still my admin panel don't > load css. > > What can i do? did you follow the howto in t

Serving static files (admin panel and others)

2014-12-13 Thread Muhammed Tüfekyapan
Hello everyone, I try many things to serve .css files but I can't do that. How can i serve .css and .js files in Django 1.7? I typed django manage.py collectstatic but still my admin panel don't load css. What can i do? Best. -- You received this message because you are subscribed to th

Re: Django server and Apache serving static files

2014-12-09 Thread Collin Anderson
Hi, There's a good Apache example here if you haven't seen it. https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#serving-files Collin On Monday, December 8, 2014 9:32:07 AM UTC-5, pythonista wrote: > > My apache admin is having problems serving static files t

Django server and Apache serving static files

2014-12-08 Thread pythonista
My apache admin is having problems serving static files to the django app. Apache is on its own server. My admin says that he needs a relative path defined in Django in order to get Apache to serve the static files from that server for the Django App Is it possible to define relative paths in

Re: Newbie question on serving static files from apache

2014-11-15 Thread Daniel Roseman
On Saturday, 15 November 2014 03:13:37 UTC, pythonista wrote: > > I am using django 1.7 and apache. > > I do not understand the instructions on the django tutorial. > > The files were delivered as expected in debug mode and locally from the > django web server. > > > Can someone provide me with a

Newbie question on serving static files from apache

2014-11-14 Thread pythonista
I am using django 1.7 and apache. I do not understand the instructions on the django tutorial. The files were delivered as expected in debug mode and locally from the django web server. Can someone provide me with a simple example or link to a site. Thanks -- You received this message becau

Re: Serving static files from another directory rather than "statics"

2014-07-08 Thread mulianto
Hi, Why not generate the new file under static folder. I use compressor but for big js css need time for generate the compress minify file when on production. Sent from my iPhone On 8 Jul 2014, at 10:35, carlos wrote: > Hi, maybe you need use this third party solution > http://django-comp

Re: Serving static files from another directory rather than "statics"

2014-07-07 Thread Chen Xu
django-pipline looks good for me at first, and then I realize it copies both the minified files and the original files (which I dont want). That is why I wrote my own scripts. Thanks On Mon, Jul 7, 2014 at 10:35 PM, carlos wrote: > Hi, maybe you need use this third party solution > http://dja

Re: Serving static files from another directory rather than "statics"

2014-07-07 Thread carlos
Hi, maybe you need use this third party solution http://django-compressor.readthedocs.org/en/latest/ and other is https://django-pipeline.readthedocs.org/en/latest/ Cheers On Mon, Jul 7, 2014 at 5:58 PM, Chen Xu wrote: > Hi Everyone, > I am working on a site, under my project in my local envi

Serving static files from another directory rather than "statics"

2014-07-07 Thread Chen Xu
Hi Everyone, I am working on a site, under my project in my local environment, I have a directory called "static" (generated by django just like everyone else's) to server my js and css. I wrote a script which minify all the js and css files and copy them in a directory called "static_min" which is

Re: Apache with mod_wsgi not serving static files

2014-02-21 Thread Alex Mandel
On 02/21/2014 04:00 PM, Bryan P wrote: > Hello all, > > My Django application is not serving my static files (CSS, JS) and keeps > returning a 404 error. I have set the STATIC_ROOT to the location where I > collected all my static files with manage.py and set an alias in my > VirtualHost. > >

Apache with mod_wsgi not serving static files

2014-02-21 Thread Bryan P
Hello all, My Django application is not serving my static files (CSS, JS) and keeps returning a 404 error. I have set the STATIC_ROOT to the location where I collected all my static files with manage.py and set an alias in my VirtualHost. Here is my Settings.py Here

Re: Serving static files: Tried 3 ways with no luck

2012-12-27 Thread Jani Tiainen
27.12.2012 5:03, warsam...@gmail.com kirjoitti: I am having an unbelievable time getting my new django application to servie static files, i have read the django documentation but it seems as there isn't one consistent way to serve static files while in development using the Django server. In or

Re: Serving static files: Tried 3 ways with no luck

2012-12-27 Thread Dylan Tuominen
Yes make sure your STATICFILES_DIRS setting is pointing to the exact location you want to put them in, and then make sure all of the needed files are indeed being collected by manage.py collectstatic. after that, assuming your static_url is set to /static/, you should have no problems referenci

Re: Serving static files: Tried 3 ways with no luck

2012-12-26 Thread Mike Dewhirst
On 27/12/2012 2:03pm, warsam...@gmail.com wrote: I am having an unbelievable time getting my new django application to servie static files, i have read the django documentation but it seems as there isn't one consistent way to serve static files while in development using the Django server. In o

Serving static files: Tried 3 ways with no luck

2012-12-26 Thread warsameb0
I am having an unbelievable time getting my new django application to servie static files, i have read the django documentation but it seems as there isn't one consistent way to serve static files while in development using the Django server. In order are my settings.py file, my urls.py file an

serving static files

2011-07-27 Thread Shawn Milochik
I want to allow certain users to download files uploaded by other users. I found django-protected-files[1] and django-private-files[2], both of which look like they do the job. The latter is more recent and is on Read The Docs, so it's probably the way to go. Before I start reviewing the code

Re: Serving static files weirdness

2011-07-08 Thread neridaj
Got it working by changing the following: STATIC_ROOT = '' STATIC_URL = '/static/' STATICFILES_DIRS = ( # Put strings here, like "/home/html/static" or "C:/www/django/ static". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths.

Re: Serving static files weirdness

2011-07-08 Thread neridaj
I'm using Django version 1.3 and the Django devserver. My admin media is the default: ADMIN_MEDIA_PREFIX = '/static/admin/' On Jul 8, 1:49 am, bruno desthuilliers wrote: > On Jul 8, 4:40 am, neridaj wrote: > > > > > > > > > > > I had mystaticfiles being served form media i.e., the tree looked >

Re: Serving static files weirdness

2011-07-08 Thread bruno desthuilliers
cument_root': r'static'}), >     (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', > { 'document_root': r'static/js/tiny_mc' }), > ) > > I don't understand why changing media to static has stopped django > from serving stat

Re: Serving static files weirdness

2011-07-07 Thread Xavier Ordoquy
l conf: > if settings.SERVE_MEDIA_FROM_DJANGO: >urlpatterns += patterns('', >(r'^static/(?P.*)$', 'django.views.static.serve', > {'document_root': r'static'}), >(r'^tiny_mce/(?P.*)$', 'django.views.static.serve

Serving static files weirdness

2011-07-07 Thread neridaj
JANGO: urlpatterns += patterns('', (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': r'static'}), (r'^tiny_mce/(?P.*)$', 'django.views.static.serve', { 'document_root': r'static/js/tiny_mc' }

Re: serving static files

2011-02-26 Thread Andre Terra
Are you sure you have that urlpattern in your project's urls.py rather than an app's urls.py? Regards, Andre On Sat, Feb 26, 2011 at 8:14 AM, wrote: > it should work, but it's not clear why you want that. (This regex also > match "notvalidsite_media/image.jpg") > > What did you get ? > > Stefa

Re: serving static files

2011-02-26 Thread s . apostolico
it should work, but it's not clear why you want that. (This regex also match "notvalidsite_media/image.jpg") What did you get ? Stefano 2011/2/26 snippetmaker : > I admit that I am not so sure about how regular expressions work, I > need to spend some time on these. > > I was trying to follow >

serving static files

2011-02-26 Thread snippetmaker
I admit that I am not so sure about how regular expressions work, I need to spend some time on these. I was trying to follow http://docs.djangoproject.com/en/1.2/howto/static-files/ I did everything that the page said to no avail, in the end I changed (r'^site_media/(?P.*)$', 'django.views.stati

Re: Problems with serving static files

2011-02-24 Thread Tom Evans
On Thu, Feb 24, 2011 at 1:39 AM, Roy Smith wrote: > I'm running r15624, OSX-10.6.5, Python-2.6.1 > > In my top-level urls.py, I have: > >    # Serve static > files >    (r'^static/(?P.*)$', >     'django.views.static.serve', >     {'document_root': '/Users/roy/dev/try.django/mysite/static', >    

Problems with serving static files

2011-02-23 Thread Roy Smith
I'm running r15624, OSX-10.6.5, Python-2.6.1 In my top-level urls.py, I have: # Serve static files (r'^static/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/roy/dev/try.django/mysite/static', 'show_indexes': True}), If I go to http://localhost:8000/stati

Re: App engine serving static files?

2011-02-16 Thread Eric Chamberlain
On Feb 15, 2011, at 11:44 PM, Praveen Krishna R wrote: > Hey Guys, > > Does Anyone has experience, serving static content with google app engine? > Does it make a big difference, than serving it with nginx on the same server > as django? > I currently use a shared hosting, and was just thinking

Re: App engine serving static files?

2011-02-16 Thread rafael.nu...@gmail.com
The 'cold start' could be a problem. But if you pay $9/month to 'AlwaysOn' feature, it's ok. I am using without 'AlwaysOn', with a little 'workaround' and with an agressive cache, it's very good. On Wed, Feb 16, 2011 at 9:32 AM, Brian Bouterse wrote: > I've never used it, but I always wanted to

Re: App engine serving static files?

2011-02-16 Thread Brian Bouterse
I've never used it, but I always wanted to use DryDropto push all my static media over to GAE. Brian On Wed, Feb 16, 2011 at 2:44 AM, Praveen Krishna R < rpraveenkris...@gmail.com> wrote: > *Hey Guys,* > * > * > *Does Anyone has experience, serving static content w

App engine serving static files?

2011-02-15 Thread Praveen Krishna R
*Hey Guys,* * * *Does Anyone has experience, serving static content with google app engine?* *Does it make a big difference, than serving it with nginx on the same server as django?* *I currently use a shared hosting, and was just thinking to move the static content to GAE* *I would like to know yo

Serving static files

2010-07-10 Thread shwetanka
Hi Below is my code: settings.py MEDIA_URL = '/static/' STATIC_DOC_ROOT = 'C:/djangotest/codificador/static/' urls.py urlpatterns = patterns(' ', (r'^static/(?P.*)$', 'django.static.views.serve', {'document_root': settings.STATIC_DOC_ROOT}), ) base.html in style tag:

Re: Serving static files from subdomain.

2010-01-17 Thread Malcolm Box
On Mon, Jan 18, 2010 at 12:41 AM, nameless wrote: > Thank you for tips. > Now I want that when an user upload an image ( through forms ), then > it will be saved in media.example.com. > This is the point that I don't understand :-\ > > Does the computer running Django have access to a directory w

Re: Serving static files from subdomain.

2010-01-17 Thread nameless
Thank you for tips. Now I want that when an user upload an image ( through forms ), then it will be saved in media.example.com. This is the point that I don't understand :-\ --- On Jan 18, 1:08 am, Malcolm Box wrote: > On Sat, Jan 16, 2010 at 3:20 PM, nameless wrote: > > I have a site

Re: Serving static files from subdomain.

2010-01-17 Thread Malcolm Box
On Sat, Jan 16, 2010 at 3:20 PM, nameless wrote: > I have a site developed with django at www.example.com > > I want that django insert/serve static files ( images, css, js, ect ) > in/from media.example.com. > > Are these files that Django is managing (e.g. via an upload), or just part of the ou

Serving static files from subdomain.

2010-01-16 Thread nameless
I have a site developed with django at www.example.com I want that django insert/serve static files ( images, css, js, ect ) in/from media.example.com. I have edited settings.py: MEDIA_ROOT = 'http://media.miosito.it' MEDIA_URL = 'http://media.miosito.it' ADMIN_MEDIA_PREFIX = 'http://media.m

Re: apache serving static files

2010-01-07 Thread Mike Dewhirst
On 8/01/2010 2:13am, Stephen Emslie wrote: Looks like the regular expression of the AliasMatch excludes any '/' characters in the pattern, so is only going to match the last part of the path. Or roughly equivalent to doing path.split('/')[-1]. does the following work? AliasMatch /(.*\.js) /

Re: apache serving static files

2010-01-07 Thread Stephen Emslie
Looks like the regular expression of the AliasMatch excludes any '/' characters in the pattern, so is only going to match the last part of the path. Or roughly equivalent to doing path.split('/')[-1]. does the following work? AliasMatch /(.*\.js) /srv/www/ccm/htdocs/static/js/$1 On Thu, Jan

apache serving static files

2010-01-07 Thread Mike Dewhirst
I want to serve development code from SuSE 11.1 using Apache 2.2 with mod_wsgi in parallel with the Django server on WinXP. It works - except I have obviously outsmarted myself configuring Apache to serve javascript. In particular tiny_mce.js. As an example, here is part of my ../templates/

Re: Problem with serving static files

2009-11-18 Thread igor
>>> urls.py: >>> urlpatterns = patterns('', >>> (r'^polls/', include('mysite.polls.urls')), >>> (r'^site_media/(?P.*)$', 'django.views.static.serve', >>> {'document_root': '/mysite/media/'}), >>> ) Since I always start Django in its "root" directory, I put something like:

Re: Problem with serving static files

2009-11-18 Thread Benjamin Wolf
Thanks Jeremy, got it. jeremyrdavis schrieb: > The document root specified in urlpatterns should match the directory > where your files are located. You have "/mysite/media/" in your > urlpatterns and "C:\django_projects\mysite\media" in your post. Make > sure those match. > > > On Nov 18, 6:56

Re: Problem with serving static files

2009-11-18 Thread Denis Bahati
how do you make them similar? because its also a problem to with TinyMCE. On Wed, Nov 18, 2009 at 4:13 PM, jeremyrdavis wrote: > The document root specified in urlpatterns should match the directory > where your files are located. You have "/mysite/media/" in your > urlpatterns and "C:\django_pr

Re: Problem with serving static files

2009-11-18 Thread jeremyrdavis
The document root specified in urlpatterns should match the directory where your files are located. You have "/mysite/media/" in your urlpatterns and "C:\django_projects\mysite\media" in your post. Make sure those match. On Nov 18, 6:56 am, "Benjamin W." wrote: > Hi there, > > I'm new to djang

Problem with serving static files

2009-11-18 Thread Benjamin W.
Hi there, I'm new to django and got my first little problem. I want to use a css file in my template. So I read this: http://docs.djangoproject.com/en/dev/howto/static-files/ I set up everything, but I don't get the file. My config: urls.py: urlpatterns = patterns('', (r'^polls/', includ

unable to render images in development server despite following instructions on serving static files

2009-07-12 Thread djangonoob
hi all, what i am trying to do is as follows (development server ): 1) upload an image to my media/userimage/ directory and save the location in mysql ( this is successful ) 2) retrive the image by showing on a generated html page. But my image is not showing as if the tag src url is wrong. Howev

Serving static files with complex auth permissions

2009-06-14 Thread Todd Gardner
Hello django-users! I'm making a "google docs"-like service for users to create and share documents with other users. I'd like to serve the documents directly from apache authenticating against the django session. I've read http://docs.djangoproject.com/en/dev/howto/apache-auth/ and the excelle

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-17 Thread Anthony
Sure thing: === # Django settings for my project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_em...@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. DATABASE_NAME

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-16 Thread Wayne Koorts
>> Also just another tip: it is a good idea to not use named colour >> values ("green" / "red" etc.) as each CSS rendering engine might >> interpret it differently.  For green you could use: "color: rgb(0, >> 255, 0);" and for red you could use: "color: rgb(255, 0, 0);". > > That is incorrect, the

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-16 Thread Les
You might post your settings.py as a help to other newbies On Apr 15, 7:21 pm, Anthony wrote: > Thanks. > > I was just trying to get the stylesheet to show up.  I have a full CSS > template I got from somewhere else that I'll be using now that it's > being successfully pulled in. > > On Apr 15,

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-16 Thread Tom Evans
On Thu, 2009-04-16 at 11:06 +1200, Wayne Koorts wrote: > Also just another tip: it is a good idea to not use named colour > values ("green" / "red" etc.) as each CSS rendering engine might > interpret it differently. For green you could use: "color: rgb(0, > 255, 0);" and for red you could use: "

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Anthony
Thanks. I was just trying to get the stylesheet to show up. I have a full CSS template I got from somewhere else that I'll be using now that it's being successfully pulled in. On Apr 15, 4:06 pm, Wayne Koorts wrote: > >> > The picture shows up, but the text doesn't turn green like I think it >

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Wayne Koorts
>> > The picture shows up, but the text doesn't turn green like I think it >> > should. See if it helps changing your code and CSS as follows (basically making it XHTML compliant - not sure what you're aiming at specifically with what you've done): Test paragraph. p.baseline { co

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Anthony
That was it! Thanks, I thought "baseline" was just a variable name I could use. I appreciate your time on this. On Apr 15, 4:01 pm, Alex Gaynor wrote: > On Wed, Apr 15, 2009 at 6:59 PM, Anthony wrote: > > > Yes, they are right next to each other in the same folder. > > > On Apr 15, 3:55 pm,

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Alex Gaynor
On Wed, Apr 15, 2009 at 6:59 PM, Anthony wrote: > > Yes, they are right next to each other in the same folder. > > On Apr 15, 3:55 pm, Alex Gaynor wrote: > > On Wed, Apr 15, 2009 at 6:50 PM, Anthony wrote: > > > > > Hello, > > > > > I'm pretty new to CSS as well as Django, so I'm sure I'm doing

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Anthony
Yes, they are right next to each other in the same folder. On Apr 15, 3:55 pm, Alex Gaynor wrote: > On Wed, Apr 15, 2009 at 6:50 PM, Anthony wrote: > > > Hello, > > > I'm pretty new to CSS as well as Django, so I'm sure I'm doing > > something simple wrong.  Anyway, I'm able to serve up a test

Re: Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Alex Gaynor
On Wed, Apr 15, 2009 at 6:50 PM, Anthony wrote: > > Hello, > > I'm pretty new to CSS as well as Django, so I'm sure I'm doing > something simple wrong. Anyway, I'm able to serve up a test pic that > I placed in the media folder, but I can't get the html to use the CSS > template. > > > >

Serving Static Files - Pics work, but CSS doesn't

2009-04-15 Thread Anthony
Hello, I'm pretty new to CSS as well as Django, so I'm sure I'm doing something simple wrong. Anyway, I'm able to serve up a test pic that I placed in the media folder, but I can't get the html to use the CSS template. My Site Test paragraph. My CSS file

Re: serving static files

2009-04-13 Thread amit sethi
hi thanks , well got the point about url-conf the url pattern you have given does not raise the error but i have still not been able to get my css working my urls.py has an entry (r'^sitemedia/?P.*$', 'django.views.static.serve', {'document_root': '/home/amit/analytics/sitemedia', 'show_ind

Re: serving static files

2009-04-13 Thread google torp
Hi. You misunderstood the docs a bit, I c/p'ed the url-conf bit here: (r'^site_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/path/to/media'}), The problem here that is also causing the error is that the file name should be a variable and not hardcoded for every file,

serving static files

2009-04-13 Thread amit sethi
Hi , i am new to django and i am trying to serve my css file . I followed the instruction to serve static files in development server and made a seperate /media directory I copied my css file into it and changed the url pattern to include: (r'^site_media/default.css$', 'django.views.static.serve'

Re: Problems serving static files with Apache and mod_python

2008-10-15 Thread bruno desthuilliers
On 15 oct, 17:42, Javi <[EMAIL PROTECTED]> wrote: > I do tests using development server and everything is OK. But now, the > app must be available to the users. If I musn't match the content > static folder with a url, how must I rewrite the href to static file? The way you should have done it

Re: Problems serving static files with Apache and mod_python

2008-10-15 Thread Javi
I do tests using development server and everything is OK. But now, the app must be available to the users. If I musn't match the content static folder with a url, how must I rewrite the href to static file? I mean, using the development server the href to a css file is as follow: . How must I chan

Re: Problems serving static files with Apache and mod_python

2008-10-14 Thread bruno desthuilliers
On 14 oct, 20:28, Javi <[EMAIL PROTECTED]> wrote: > Dear group, > > sorry for starting another thread on this issue. I've seen loads of > messages with similar but particular problems. > My system: > * apache2 (2.2.9-10) > * libapache2-mod-python (3.3.1-5) > * python-django (1.0-1) > > My proje

Problems serving static files with Apache and mod_python

2008-10-14 Thread Javi
Dear group, sorry for starting another thread on this issue. I've seen loads of messages with similar but particular problems. My system: * apache2 (2.2.9-10) * libapache2-mod-python (3.3.1-5) * python-django (1.0-1) My project is located at: ~/Desktop/csl2-sdocente/src/candidateTool and the a

Re: Serving static files?

2008-09-05 Thread Robert Dailey
On Sep 1, 1:32 am, Davor Lučić <[EMAIL PROTECTED]> wrote: > If you are using Apache you can use mod_rewrite. > > http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html > > On Aug 31, 10:08 pm, Robert <[EMAIL PROTECTED]> wrote: > > > Hi, > > > I just got done reading through the 4 django tutorials a

Re: Serving static files?

2008-08-31 Thread Davor Lučić
If you are using Apache you can use mod_rewrite. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html On Aug 31, 10:08 pm, Robert <[EMAIL PROTECTED]> wrote: > Hi, > > I just got done reading through the 4 django tutorials and they were > very helpful. However, I did not find out through the tut

Re: Serving static files?

2008-08-31 Thread djandrow
You may find this useful: http://groups.google.com/group/django-users/browse_thread/thread/73aae22ae6d20de0/dbfe3a60be00d9bb#dbfe3a60be00d9bb You should have apache serve the static content because its much faster. The link I sent you is when I was having problems with it a few weeks ago, basica

Serving static files?

2008-08-31 Thread Robert
Hi, I just got done reading through the 4 django tutorials and they were very helpful. However, I did not find out through the tutorials alone how to serve CSS files along with my HTML. I was told in IRC that these are not directly handled by django. Basically, my main concern is keeping my webs

Re: serving static files with apache on windows with mod_python

2007-12-07 Thread Empty
> to the apache httpd.conf file > but when i turn off debug in the settings file as well as turning > PythonDebug Off in the httpd.conf, > my media files (css,images,...) disappear. > I have also done > > SetHandler None > > as well as > > SetHandler None > > I have read that my media files sh

Fwd: serving static files with apache on windows with mod_python

2007-12-07 Thread bayo
--- Forwarded message --- From: bayo <[EMAIL PROTECTED]> To: django-users@googlegroups.com Cc: Subject: serving static files with apache on windows with mod_python Date: Fri, 07 Dec 2007 14:42:02 +0100 Hi All, I have been trying to setup django on windowsxp with mod_python. I ha

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread koenb
There already is a ticket: #4783. Just needs volunteers to do the writing... Koen On 3 aug, 10:41, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > On Aug 3, 4:32 pm, koenb <[EMAIL PROTECTED]> wrote: > > > My guess is you are interfering with your admin_media (look at the > > admin_media_prefix se

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi Kai, > If you do not use it, no. > If I use it, how does it affect then? thanks james --~--~-~--~~~---~--~~ 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@go

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, On Aug 3, 4:32 pm, koenb <[EMAIL PROTECTED]> wrote: > My guess is you are interfering with your admin_media (look at the > admin_media_prefix setting). > Try using something like r'^sitemedia/... and src="/sitemedia/...". > Thanks koen, that did it. I think it could be nice if it was mention

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread koenb
My guess is you are interfering with your admin_media (look at the admin_media_prefix setting). Try using something like r'^sitemedia/... and src="/sitemedia/...". Koen On 3 aug, 09:16, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > I already did the > > (r'^media/(?P.*)$', 'django.views.static.

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread Kai Kuehne
Hi, On 8/3/07, james_027 <[EMAIL PROTECTED]> wrote: > does it affect the django.views.static.serve? If you do not use it, no. Greetings Kai --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, are this settings used when running under development mode? MEDIA_ROOT MEDIA_URL does it affect the django.views.static.serve? thanks james --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

help serving static files (css, images, pdf, js)

2007-08-03 Thread james_027
hi, I already did the (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root':'d:/private/james/documents/django/ksk/media'}), in my urls.py and in my template i have something like this but why is it the image still don't appear? Thanks james --~--~-~--~~--

Re: Explain the template for serving static files?

2007-05-21 Thread Malcolm Tredinnick
On Mon, 2007-05-21 at 19:17 +, Val wrote: > > DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ > www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> > > > > > Index of {{ directory|escape }} > > > Index of {{ dire

Explain the template for serving static files?

2007-05-21 Thread Val
DEFAULT_DIRECTORY_INDEX_TEMPLATE = """ http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> Index of {{ directory|escape }} Index of {{ directory|escape }} {% for f in file_list %} {{ f|escape }} {% endfor %} """ What exactly ar

Re: How fix the "feature" of not serving static files?

2006-05-24 Thread [EMAIL PROTECTED]
I think so... In the other hand, maybe I must borrow other concept from dotnetnuke. Leveraging the template system, I have: templates\basetemplateshere.htm templates\blog\blogtemplateshere.html Maybe if I go this way: templates\Site1\customizedbase.html templates\Site1\blog\customizedblogtemp

  1   2   >