Remove the import of Theme
and use the model name as a string instead.
theme = models.ForeignKey('themes.Theme')
More Related Contents:
- Extending the User model with custom fields in Django
- When saving, how can you check if a field has changed?
- How to define two fields “unique” as couple
- How to express a One-To-Many relationship in Django?
- Override default queryset in Django admin
- Setting the selected value on a Django forms.ChoiceField
- Django: Set foreign key using integer?
- How can I have two foreign keys to the same model in Django?
- Django ModelForm: What is save(commit=False) used for?
- Django migrate –fake and –fake-initial explained
- django – get() returned more than one topic
- Django custom managers – how do I return only objects created by the logged-in user?
- Django – how to specify a database for a model?
- “Post Image data using POSTMAN”
- Django: Validate file type of uploaded file
- How to add data into ManyToMany field?
- Raw SQL queries in Django views
- Django data migration when changing a field to ManyToMany
- Django accessing ManyToMany fields from post_save signal
- Dropdown in Django Model
- how to show datepicker calendar on datefield
- How to query Case-insensitive data in Django ORM?
- Django comparing model instances for equality
- Django Order By Date, but have “None” at end?
- How to add a sortable count column to the Django admin of a model with a many-to-one relation?
- Password field in Django model
- Creating Partial Indexes with Django 1.7
- Django: dynamic database file
- conversion of datetime Field to string in django queryset.values_list()
- Django Rest framework, how to include ‘__all__’ fields and a related field in ModelSerializer ?