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
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
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
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
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:
>
>
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
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
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.
* 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
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
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
* 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
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
13 matches
Mail list logo