Comments (4)
https://github.com/brack3t/django-braces/blob/master/braces/views.py#L546
https://github.com/django/django/blob/master/django/views/generic/edit.py#L204
https://github.com/django/django/blob/master/django/views/generic/edit.py#L163
you need something like
https://docs.djangoproject.com/en/dev/topics/class-based-views/generic-display/#adding-extra-context
and
success_url = reverse_lazy('foos:list')
here is no sense for lazy
from django-braces.
Hmm, so I'm better off not using braces?
I was just trying to make a view that responds to both a normal post request and an ajax post request. The code example I linked to from the django site works well but it's pretty verbose if I want to manually include only a white list of fields.
from django-braces.
post_ajax
, by default, just calls super
on post
. Your example completely overrides what happens in post
in a CreateView
so, yes, it throws an error about self.object
not existing because you haven't instantiated anything.
You're probably best off either duplicating what happens in CreateView.post
or calling super
on post_ajax
so you have an instance hanging around that you can use in your custom view.
We'll create a ticket to expand the documentation on the AJAX Response mixin.
from django-braces.
Can we get a link to some of that Ajax Response documentation?
from django-braces.
Related Issues (20)
- Travis CI - end of a era HOT 2
- django-braces looks old HOT 3
- Test coverage should be higher
- Look at refactoring tests
- Set up GH Action for publishing
- Set up GH action for Interrogate
- Re-evaluate the JSON-related mixins HOT 1
- Move away from semver?
- Django 4 ajax HOT 3
- Remove all Python 2 compatibility
- pyproject.toml for config
- Move mixins to `mixins`
- Update form-related mixins
- DRF mixins? HOT 1
- Alias new paths to old paths
- Autopublish?
- Docs
- Simpler tests
- Upgrade to Django 4.2
- Next release?
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-braces.