Hi,

The difference is the age of the django project you are looking at. {% load
staticfiles %} the {% static %} is the current way to load and use static
files. It also has the option to do other things (like MD5 hashes for
versions) automatically and should be used.

If you create a project in the new way, you will also get all of your
static files nicely copied to a static file directory that you can serve
from your webserver automatically. It's the best way to do it.

Regards,

Andréas

2015-01-06 12:23 GMT+01:00 老张 <paiis...@163.com>:

> hi,guys
> i'm new to django。when I write my first app, there are 2 options to access
> static files,
> 1 using  {{ STATIC_URL}}
> 2 using  {% load staticfiles%} then {% static %}
> what 's different between the 2 options, and ,when I migrate from
> development to production env
> which one is conveniency ?
> Thanks alot
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/31d5812d.1eba0.14abefc5261.Coremail.paiis314%40163.com
> <https://groups.google.com/d/msgid/django-users/31d5812d.1eba0.14abefc5261.Coremail.paiis314%40163.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALXYUbkhxHJnYZ3PS0S2A13ykPW%2BQmbRV%3DVE-S%2Bfo8cDzjJpBQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to