Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread cootetom
If you are using the django development server whilst developing then you can use django.views.static.serve to download static or media files. You should not use this method in production however as it is not considered stable. Just place this in your url.py file: from settings import DEBUG, STAT

Re: MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Xiong Chiamiov
On Jul 30, 3:38 am, Salvatore Leone wrote: > I can't download the files, probably I don't understand the MEDIA_URL > parameter. Here it is: > MEDIA_URL = 'http://localhost:8000/wiz/uploads/' > > but trying to access the files returns me a 404 error. You shouldn't have to use MEDIA_URL at all for

MEDIA_URL MEDIA_ROOT

2009-07-30 Thread Salvatore Leone
Hi again, I have configured MEDIA_ROOT = '/home/testpec/public_html/pecwizard/uploads/' and the file uploads works fine, so in the 'uploads' directory there are all my uploaded files. Two questions: 1. in models.py I have the following: class Attach(models.Model): attached_file = models.F

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-18 Thread Dmitriy Sodrianov
Thanks to all for help. With your suggestions and links I've found out how to serve static files with Django. Now everything works just fine! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-17 Thread Nathan Ostgard
You can also refer to this page in the documentation for more information: http://www.djangoproject.com/documentation/static_files/ Nathan Ostgard On Jul 17, 11:35 am, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > Hello everyone! > > Let me ask for help with the following problem: > >

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-17 Thread Collin Grady
The key here is that django does not automatically map your media - you have to do it manually. --~--~-~--~~~---~--~~ 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

Re: MEDIA_URL MEDIA_ROOT problem.

2007-07-17 Thread Martin Kaffanke
Am Dienstag, den 17.07.2007, 18:35 + schrieb Dmitriy Sodrianov: > MEDIA_ROOT = '/home/sodrian/versatility/static/' > > MEDIA_URL = 'http://127.0.0.1:8000/static/' In this case /static/ is handled by django, so you need to set it in your urls.py: (r'^static/(?P.*)$', 'django.views.static.ser

MEDIA_URL MEDIA_ROOT problem.

2007-07-17 Thread Dmitriy Sodrianov
Hello everyone! Let me ask for help with the following problem: I want to attach css file to my template and I'm doing it in this steps. 1) First edited setting.py file, MEDIA_URL and MEDIA_ROOT variables in this way: MEDIA_ROOT = '/home/sodrian/versatility/static/' MEDIA_URL = 'http://127.0.

Re: newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-15 Thread Nebojša Đorđević
* Jeremy Dunck wrote, On 14.02.2007 19:33: > On 2/14/07, Joseph Heck <[EMAIL PROTECTED]> wrote: >> It's worth noting that to use the MEDIA_URL settings in your template, >> you'll need to either pass it down through the views into the Template >> context, or write a quick little middleware that al

Re: newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-14 Thread Jeremy Dunck
On 2/14/07, Joseph Heck <[EMAIL PROTECTED]> wrote: > It's worth noting that to use the MEDIA_URL settings in your template, > you'll need to either pass it down through the views into the Template > context, or write a quick little middleware that always pushes it into the > context (which is what

Re: newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-14 Thread Joseph Heck
It's worth noting that to use the MEDIA_URL settings in your template, you'll need to either pass it down through the views into the Template context, or write a quick little middleware that always pushes it into the context (which is what I did). Then you can use: wrote: > > > * johnny wrote, O

Re: newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-12 Thread Nebojša Đorđević
* johnny wrote, On 12.02.2007 04:37: > Do you keep your frontend related css,js file in separate folder other > than admin (My assumption is admin, is the BACKEND)? Admin is just another application, don't mix your media files with admins. > > I am confused with: > > ADMIN_MEDIA_PREFIX This is

newb question: Kind of confused MEDIA_URL, MEDIA_ROOT, SITE_MEDIA and so on.

2007-02-11 Thread johnny
Do you keep your frontend related css,js file in separate folder other than admin (My assumption is admin, is the BACKEND)? I am confused with: ADMIN_MEDIA_PREFIX SITE_MEDIA MEDIA_ROOT MEDIA_URL --~--~-~--~~~---~--~~ You received this message because you are sub