jakobadam / bootstrap-uploadprogress Goto Github PK
View Code? Open in Web Editor NEWDecorate HTML forms with an upload progressbar
License: MIT License
Decorate HTML forms with an upload progressbar
License: MIT License
Since the response is fetched via XHR and discarded after the upload is successful, any flash messages set by django on a successful upload are never seen by the user.
I think fixing this would require a bunch of stuff that would be complicated and unnecessary. However, I thought it might be helpful to document the behavior and a possible workaround, in case others experience the issue.
To workaround the issue, pass an empty messages list to the view renderer -
status = 200
return render(request, self.template_name, {'messages': []}, status=status)
The discarded response will contain the empty message list, while the messages in message queue will be untouched. Then, after the redirect, any messages in the message queue will be displayed normally.
Change:
$(":file").fileprogress({redirect_url: '/'});
To:
$("#myform").fileprogress({redirect_url: '/'});
Error:
ModelForm without 'fields' or the 'exclude' attribute is deprecated
is given with latest Django.
exclude = []
needed in PackageForm's Meta class.
class PackageForm(forms.ModelForm):
class Meta:
exclude = []
model = Package
widgets = {
'name': _get_widget('Enter package name')
}
How can i post data to a custom url & if response is success then redirect
bootstrap-uploadprogress.js:12 Uncaught TypeError: Cannot read property 'support' of undefined
at bootstrap-uploadprogress.js:12
at bootstrap-uploadprogress.js:192
(anonymous) @ bootstrap-uploadprogress.js:12
(anonymous) @ bootstrap-uploadprogress.js:192
(index):399 Uncaught TypeError: $(...).uploadprogress is not a function
at (index):399
Blog link not working in README.md
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.