Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StorageDownloadView how to pass a path "as_view" #133

Open
maxkeogh opened this issue Sep 20, 2016 · 0 comments
Open

StorageDownloadView how to pass a path "as_view" #133

maxkeogh opened this issue Sep 20, 2016 · 0 comments

Comments

@maxkeogh
Copy link

Hi,
I'm trying to implement StorageDownloadView in my Django site for users to download various types of files. I can set the variables for the type of file and filename depending on the user choices however they are located in different directories.
I can define various storage locations and paths each with individual entries in the url file however, this could get a little unmanageable if the number of file types and locations increases.
In the documentation it says "The view accepts a path argument you can setup either in as_view or
via URLconfs".
In my view I can set the storage location and filename depending on the file type but how do I then pass these variable to StorageDownloadView without using a url?
Also, I'd like to know if I can serve the file for download and then, if successful, return a render_to_response to a success page.
If you can let me have any pointers to put me in the right direction I would be grateful.
Many thanks
Max

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant