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 [email protected].
To post to this group, send email to [email protected].
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to