Giter Club home page Giter Club logo

Comments (5)

christianwgd avatar christianwgd commented on August 14, 2024 1

Sent another PR, sorry again for incomplete work...

from django-bootstrap-modal-forms.

trco avatar trco commented on August 14, 2024

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.

christianwgd avatar christianwgd commented on August 14, 2024

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.

christianwgd avatar christianwgd commented on August 14, 2024

Btw, is there any doc on how to run the tests locally? Thanks

from django-bootstrap-modal-forms.

trco avatar trco commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.