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

add basis for Basemodel #903

Merged
merged 17 commits into from
Jan 9, 2024
Merged

add basis for Basemodel #903

merged 17 commits into from
Jan 9, 2024

Conversation

magsyg
Copy link
Contributor

@magsyg magsyg commented Dec 31, 2023

Added basis for new basemodel
Adds the fields created_at and updated_at to fetch when it was created and updated
Adds created_by and updated_by to track who updated it last
Also just a simple version field, which keeps track of each time it was updated

Added serializser and admin to support this

Wanted only to know if this was desired or not

@magsyg
Copy link
Contributor Author

magsyg commented Dec 31, 2023

Almost the same as done in rekenett, good to keep track of when and who edited, for both frontend and backend

@magsyg magsyg self-assigned this Dec 31, 2023
@magsyg
Copy link
Contributor Author

magsyg commented Dec 31, 2023

Ignores mypyerror for CustombaseAdmin, since it is not explained wtf the inputs are in sourcecode https://github.com/django/django/blob/main/django/contrib/admin/options.py

backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
@magsyg
Copy link
Contributor Author

magsyg commented Jan 2, 2024

Tar dette som dette kan prøves å kjøres inn, nice

backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
backend/root/utils/mixins.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Snorre98 Snorre98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@magsyg magsyg merged commit 3077747 into master Jan 9, 2024
5 checks passed
@magsyg magsyg deleted the feature/versionmodel branch January 9, 2024 19:26
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.

4 participants