Skip to content

Conversation

@3cp
Copy link
Contributor

@3cp 3cp commented Sep 25, 2022

closes #239

@3cp
Copy link
Contributor Author

3cp commented Sep 25, 2022

A side layman question:
I am quite new to Django plugin development. In order to update the migration files, first I installed the project folder as a depenendy in my venv pip3 install ., then in the easyaudit/tests/ folder, I run python3 manage.py makemigrations easyaudit. That created new migration file in the venv installed site-packages folder.

Then I copied out the new migration file back to the project folder like this:

cp ../../venv/lib/python3.10/site-packages/easyaudit/migrations/0017_alter_requestevent_datetime.py ../migrations/

Is this the expected way to manage django plugin development? Is there a way to directly work on the files instead of jumping through the installed package in venv/lib/pythonxxx/site-packages/?

@jheld
Copy link
Collaborator

jheld commented Sep 30, 2022

Hi,

I usually install the project in editable mode python -m pip install -e . , which would at least get around the issue of where certain things live at all :) but to your question about the migrations creation:

I think I create migrations from the root but I specify the project settings folder e xplicitly (perhaps against the test projects settings). It has been awhile since I've created a migration PR but at least right now in my head that's what I would do. So, correct, no need to copy anything if running it via the way I have pseudo-written out.

@jheld jheld merged commit 2f0798f into soynatan:master Jan 26, 2023
@3cp 3cp deleted the dev-requestevent-datetime-index branch March 8, 2023 08:08
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.

Poor performance due to datetime column is not indexed

2 participants