Database audit fields in Django

53 views
Skip to first unread message

Sujata Aghor

unread,
May 22, 2020, 5:40:02 PM5/22/20
to Django users
I am looking to create a database audit fields such as 'created by' , ' modified by', 'created on time', ' modified on time' and Archive table where i can see the changes over the time about perticular row.

this was possible in web2py automatically. Does anyone knows any such thing exist in Django?
Any idea will be a gr8 help.
Thanks

Gabriel Araya Garcia

unread,
May 22, 2020, 7:58:49 PM5/22/20
to django...@googlegroups.com
You can see it in ADMIN tables of Django 

Gabriel Araya Garcia
GMI - Desarrollo de Sistemas Informáticos
99.7721.15.70



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/05b8bddb-d2b3-4c97-a2ef-f02ad4311e3c%40googlegroups.com.

Sebastian Jung

unread,
May 22, 2020, 8:50:27 PM5/22/20
to django...@googlegroups.com
Hello,

You must create it over models.py. please Take a Look Here https://stackoverflow.com/questions/2771676/django-datetime-issues-default-datetime-now

Another field Like Lastchangefromuser you must created it AS onetoone field in models.py and in Views you can Insert requests.user to fill current User...

When you have further questions please wrote me

Regards

--

Derek

unread,
May 25, 2020, 2:04:48 AM5/25/20
to Django users
There are many things available "by default" in other frameworks; but Django has chose to keep the core focused on doing key things well (I won't say "simple").  For everything else, the plugin/app approach can be used to support your project's specific needs.

So "auditing" is actually a complex issue and no one person or organisation will define this the same way.  However, there are some good apps out there that might support at least some of what you need; for example:



I'd look at those before considering writing any code yourself.
Reply all
Reply to author
Forward
0 new messages