39
create()
will automatically save, so even if you fix your error – you will still have to make sure the arguments to create fulfill the database requirements to save a record.
0
You forgot to put self
in your manager
class FooManager(models.Manager):
def create_foo(self, name):
return self.create(foo_name = name)
- [Django]-Django – How to do tuple unpacking in a template 'for' loop
- [Django]-How to stop gunicorn properly
- [Django]-How can I change the way a boolean prints in a django template?
Source:stackexchange.com