Migration file in site-packages
folder for generating a custom API Key model
#250
Unanswered
hr23232323
asked this question in
Q&A
Replies: 1 comment
-
Hello @hr23232323, Seeing this just now as I visit this repo again. There's a I'm not sure what might be making Django generate migrations in |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @florimondmanca
I was following the instructions in the customization section of the user guide docs and getting slightly confused about the model generating migration(s).
Additional Details
As far as I can tell, when creating a custom API key model (which inherits from
AbstractAPIKey
) a migration is generated and stored insite-packages
folder (ex path:/home/django/.local/lib/python3.10/site-packages/rest_framework_api_key/migrations/0005_auto_20220110_1102.py
).This means that no django migration is present in the repository (
site-packages
folder is usually ignored). Is this expected or am I doing something wrong?Issue(s)
sqlite3.OperationalError: no such table: rest_framework_api_key_<custom api key name>
Discussion
site-packages
folder to the local django migrations folder? Will this cause any issues?Beta Was this translation helpful? Give feedback.
All reactions