jazzband / django-downloadview

Serve files with Django.
https://django-downloadview.readthedocs.io
Other
374 stars 57 forks source link

Module django-downloadview doesn't work in virtualenv #128

Closed misazr closed 4 years ago

misazr commented 8 years ago

I am using django 1.8 and virtualenv, I have installed django-downloadview from pip install django-downloadview 1.8 and 1.9 and inside my project where I am calling from ... from django_downloadview import ObjectDownloadView

download = ObjectDownloadView.as_view(model=Document, file_field='document') ... urlpatterns = patterns('',

user/document/

                   url(r'^$', views.u_documents, name='u_documents'),
                   # user/document/<slug>/
                   url(r'^(?P<cat_id>[A-Za-z0-9_\-]+)/$', views.u_category, name='u_category'),

                    #user/document/download/<slug>/
                   url('^download/(?P<slug>[A-Za-z0-9_-]+)/$', download ,name='u_download_document'),
                   )

I can't get ObjectDownloadView, there I am getting exception.

Then I installed all modules and this one directly on system without virtualenv and it work like this.

I need to have this inside virtualenv?