AutoOneToOne doesn't work
See original GitHub issueSystem
OS: Linux Python: 3.5.1 Django: 1.9.5 Annoying: 0.9.0
Example
From README.md.
from annoying.fields import AutoOneToOneField
class MyProfile(models.Model):
user = AutoOneToOneField(User, primary_key=True)
home_page = models.URLField(max_length=255, blank=True)
icq = models.IntegerField(blank=True, null=True)
Description
I have try your example but it doesnt’t work. I have no error messages. The field works lika a regular OneToOne field.
Issue Analytics
- State:
- Created 7 years ago
- Comments:14 (1 by maintainers)
Top Results From Across the Web
Django AutoOneToOneField migration and existing entries
You need to do this in three stages. Firstly, add the one-to-one with null=True and create a migration. Then, create a data migration...
Read more >Using Django OneToOneFields to Create UserProfiles
The Django OneToOneField raises exceptions if the related model doesn't exist. ... This of course won't work if your related model has fields...
Read more >django-annoying - PyPI
AutoOneToOne field - Creates related object on first call if it doesn't exist yet. ... You can also run “python setup.py install”, ...
Read more >T4 Models | Linq To DB (aka linq2db)
Configuring schema load process. Use the following initialization before you call the LoadMetadata() method. All schema load functionality configured using ...
Read more >debian-watch-does-not-check-gpg-signature
This watch file does not specify a means to verify the upstream tarball using a cryptographic signature. ... bioperl-run ... django-auto-one-to-one.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@pymarco I’m just seing this but
AutoOneToOneField
won’t create a related object unless you try to access it.@albrnick You want to put the
AutoOneToOneField
on theCrmCategoryStatsList
model instead: