Hi Piyush,

Welcome to community!

Can you please give us your template snipped?

Regards,


On Sat, Aug 13, 2016 at 6:48 AM, Piyush Rungta <piyushrungt...@gmail.com>
wrote:

> Hello this is my first time here.
> So I am trying to create directory index to serve static files uploaded by
> users by using inbuilt view by adding this to my urlpatterns -
>
>
> from django.views.static import serve
>
> url(r'^uploads/(?P<path>.*)', serve, {
>             'document_root': settings.UPLOAD_DIR,
>             'show_indexes': True,
>         },name="index_home"),
> ]
>
>
> this gave me
>
>
> TemplateSyntaxError at /uploads/
> 'i18n' is not a registered tag library. Must be one of:
>
> when trying to access the url with debug=True.
>
> I tried to register the tag library by adding this to my settings.py in in 
> TEMPLATES OPTIONS as described here 
> <https://github.com/pyinstaller/pyinstaller/issues/1717> and here 
> <https://github.com/django/django/pull/4657>.
>
> 'libraries': {
>  'staticfiles' : 'django.templatetags.static',
>  'i18n' : 'django.templatetags.i18n',
>  },
>
>
> but still no luck. Can anyone help me with what is going wrong?
>
> Thanks
>
>
>
>
> --
> 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 https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/f33e8cd8-e59e-42f7-849d-8962e31c66ee%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f33e8cd8-e59e-42f7-849d-8962e31c66ee%40googlegroups.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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK52boXfLQ_R1ay-drut0Us1dC%3DXTzrSEqoZaHQ0yGf66QmdBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to