So let me clarify:
I have two files that must be accessed using following urls:
/myapp/views/foo.js
/myapp/views/bar.js
foo.js is a static file and can (and should) be served by using static
serving, like webserver.
bar.js instead is a file that contains django template directives and
must be served through django template rendering mechanism.
On Jun 27, 5:14 pm, Shawn Milochik <sh...@milochik.com> wrote:
> This can (and probably should) be handled by your Web server.
>
> For example, in nginx you may be serving the Django app with something
> like this:
>
> location / {
> proxy_passhttp://127.0.0.1:8400;
> }
>
> And for static content nginx may direct the request elsewhere. This
> example directs
> any requests ending in '.html' to a static folder.
>
> location ~ ^/.*\.html{
> root /var/www/my_static_content;
> }
--
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@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment