Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Force exception on attribute write access only one object
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Thomas Guettler, post: 3742027"] Hi Peter and others, your idea was good, but it does not work with Django ORM Models: Traceback (most recent call last): File "/localhome/modw/django/core/handlers/base.py", line 87, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/localhome/modw/foo/views/filter.py", line 473, in add return edit(request, 'add') File "/localhome/modw/foo/views/filter.py", line 493, in edit filter=form.save() File "/localhome/modw/foo/views/filter.py", line 457, in save action=form.save() File "/localhome/modw/django/forms/models.py", line 315, in save if self.instance.pk is None: File "/localhome/modw/django/db/models/base.py", line 292, in _get_pk_val return getattr(self, meta.pk.attname) AttributeError: 'MyAction' object has no attribute 'filter_action_ptr_id' [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Force exception on attribute write access only one object
Top