ryneeverett / cartridge-downloads Goto Github PK
View Code? Open in Web Editor NEWDigital product support for the Django/Mezzanine/Cartridge stack.
Digital product support for the Django/Mezzanine/Cartridge stack.
For example, if you have 5 files associated with a product they could only be downloaded once each.
From cartridge:
warn("The SHOP_CHECKOUT_FORM_CLASS setting is deprecated - please "
"define your own urlpattern for the checkout_steps view, "
"passing in your own form_class argument.")
The dependency link doesn't resolve in the package I uploaded to pypi. https://pypi.python.org/pypi/cartridge-downloads
It seems like a common pattern to provide a free download when a user fills out a form, such as a whitepaper.
A start would be tacking on a "Promotional Downloads" inline to mezzanine.forms.admin.FormAdmin
, adding a handler in the spirit of order.handler
, and providing a link to the download index in the spirit of templates/shop/complete.html
.
For no apparent reason, the tests sometimes finish without error but the process fails to exit until the job times out.
https://docs.python.org/3/library/secrets.html
Might make more sense than abusing django's crypto functions. New in python3.6 but should be able to copy the module in for backwards compatibility.
In is_download_only
we're figuring out the option_index on a lot of requests now when it doesn't really change. We should either calculate it at init time or make it a cached function.
Hey, thanks for your work here, this is exactly what I need! There were some issues with view importing until I added an __init__.py
into the views folder, just a heads up. Looking forward to using this. I'd be glad to help contribute once the project I'm launching cartridge-downloads with gets deployed.
README.md says to add a SHOP_OPTION_TYPE_CHOICE
called 'Download' in order to get download only type functionality, but utils.py looks for a type choice called 'Downloads'. Perhaps allow both to catch potential typos, or fix in the Readme.
I don't mind making a branch, implementing these, and making a pull request once I get my shop running.
Part of my motivation for choosing django-downloadview over django-sendfile was the multiple options for file storage. (I now believe django-downloadview is better documented and maintained.)
However, by the time I finished the initial alpha release, I realized I'd completely coupled everything to the Download
model's file
field, so it wont be as simple as swapping out the view class. However, I think it can still be done by making Download
an abstract base class, making a subclass for each downloadview view, and choosing them via a config option.
Perhaps this should be optional? The use case for not doing this is if the download product accompanies a real product. For instance, the customer buys a cd and gets to download the content immediately. In fact, perhaps I've already screwed up this use case by setting the order to "processed" for download products. Perhaps these could both be configured by adding a OneToOneField
to each download product with a single boolean digital
.
In order for download products to work, we must be before cartridge.shop
in order to override the shop/complete.html
template.
In order form downloads to work, we must be after mezzanine.forms
because page processors are executed in reverse order.
It should still be accessible as a standalone view when linked from the email confirmation, but it should be an include in the existing confirmation template immediately after the transaction:
/pages/form.html
(in the request.GET.sent
block)/shop/complete.html
(get rid of the link and probably put it at the bottom below the invoice, etc.)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.