Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move relational fields out of abstract base models #1010

Merged
merged 4 commits into from
Oct 6, 2017
Merged

Conversation

gunthercox
Copy link
Owner

ChatterBot's abstract base models for Django are suppose to make it easier for a developer to create a new model, based on the existing ones with their own modifications.

Unfortunately, having related fields like foreign keys will result in errors when trying to create new models because the fields of the abstract parent class are still evaluated by Django and because they can only reference the original models.


This pull request represents one possible solution, before merging these changes I plan to investigate the possibility of referencing the settings file in the model to achieve an effect similar to how Django implements their default User model which can be accessed via settings.AUTH_USER_MODEL.

ChatterBot's abstract base models for Django are suppose to make
it easier for a developer to create a new model, based on the
existing ones with their own modifications.

Unfortunately, having related fields like foregin keys will result
in errors when trying to create new models because the fields of
the abstract parent class are still evaluated by Django and
because they can only reference the origional models.
vkosuri
vkosuri previously approved these changes Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants