Comments (5)
Sent another PR, sorry again for incomplete work...
from django-bootstrap-modal-forms.
Good catch. Definitely should be as you suggested. The same as it is in LoginAjaxMixin and DeleteMessageMixin. Tnx for the #219. Patch version coming right away.
from django-bootstrap-modal-forms.
Sorry for any inconvenience, seems that was not the whole story. I have problems in some situations when there is no get_success_url method provided but the class attribute success_message is set. I get the exception
File "/Users/christianwiegand/.virtualenvs/medic/lib/python3.10/site-packages/django_bootstrap_modal_forms-3.0.1-py3.10.egg/bootstrap_modal_forms/mixins.py", line 95, in form_valid return HttpResponseRedirect(self.get_success_url()) File "/Users/christianwiegand/.virtualenvs/medic/lib/python3.10/site-packages/django_bootstrap_modal_forms-3.0.1-py3.10.egg/bootstrap_modal_forms/mixins.py", line 82, in get_success_url return super().get_success_url() File "/Users/christianwiegand/.virtualenvs/medic/lib/python3.10/site-packages/django/views/generic/edit.py", line 123, in get_success_url url = self.success_url.format(**self.object.__dict__) AttributeError: 'NoneType' object has no attribute '__dict__'. Did you mean: '__dir__'?
I have to work out what the reason is. As long there's no solution the workaround would be to give the view class an appropriate get_success_url method and return the url value.
from django-bootstrap-modal-forms.
Btw, is there any doc on how to run the tests locally? Thanks
from django-bootstrap-modal-forms.
No need to apologise @christianwgd. You are doing amazing job with your contributions. I should be more careful when releasing such limited mixin in the first place.
I didn't manage to run tests within docker container yet, thus I'm creating virtualenv with pyenv and run tests within it. I'm using Chrome and chromedriver. Check this comments that were added recently by @aDramaQueen https://github.com/trco/django-bootstrap-modal-forms/blob/master/tests/base.py#L14.
I have to add this to the docs.
from django-bootstrap-modal-forms.
Related Issues (20)
- missing "database" folder
- Allow to send extra parameters in the POST request.
- Multiple submit buttons in modal
- Maintenance of the project HOT 9
- Automate JS Minify Process
- How to make a nested modal
- Undesired GET request when using a BSModalCreateView HOT 4
- Incorrect errorClass in documentation HOT 1
- Delete view success message is shown although object not deleted HOT 1
- form validation object already exist error does not shown in modal after modal form submissin with crispy form within modal HOT 3
- Django Internal server error - widget_tweaks failed to parse render_field HOT 1
- Checkbox does not render correctly. HOT 3
- btnSubmit fails detection after html minification
- Double post when submitting modal form HOT 5
- Restrict users from directly accessing the form url HOT 1
- How to remove Click listener HOT 1
- Open a new modal with the current modal form's results
- Event listeners disappear after the form is invalid. HOT 1
- FormValidationMixin shadows setting of self.object (defined in BaseCreateView) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-bootstrap-modal-forms.