My first project
Hello everyone, I'm Daniel, a recent college graduate as of July 2023. Since then, I've been actively seeking job opportunities as a Django developer. During my job search, I took the initiative to start my first project in Django. I'm excited to share with you my debut as a full-stack developer: a telehealth app that leverages AI to predict diseases. The app https://telehealthconnex.com is designed to enhance healthcare delivery by integrating advanced AI algorithms. I would greatly appreciate any feedback or suggestions you might have! Thank you for your support! -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CANp4oev4DbNi7cRpvsTVTFhyCq-ozxmfL9gMUpxQGMwfHam1kg%40mail.gmail.com.
Re: logging admin accesses
Just thinking about it again ... you could look at the Admin source to see how it is working now and perhaps find a way to include the missing info in a pre-save signal.Also, I found django-simple-history online but I suppose you have seen that already.M--(Unsigned mail from my phone) Original message From: Mike Dewhirst Date: 16/12/23 12:38 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses You seem to be asking for a full history 'system'. I think the Admin history exists to show a bit of history with a link to go back to the change form where it happened.Full history needs to be specified fairly carefully so it doesn't bog the system down. For example, every write costs a performance hit. Also, how resilient must it be to cope with database schema changes? How is it going to be used in practice? What are the benefits and are they worth the effort. I have worked through some of this in my current project and decided to create separate 'mirror' tables for only the critical information and automate data collection for others in a plain text field for archival.It can be quite open ended and might reward very aggressive specification.CheersMike--(Unsigned mail from my phone) Original message From: Larry Martell Date: 16/12/23 01:47 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote:Top posting because of phone email client.Have you seen the Admin history? Might be already logged for you.Thanks, this is useful, but it does not seem to be logging everything. We have a custom user admin page that updates a few models in addition to User: UserInfo, UserExtendProduct, and UserRole. If I add a new user I see this:+---+-+-+-+-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-+-+-+-+| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |+---+-+-+-+-+-+It shows that a row in User, UserInfo, and UserExtendProdct were added, but it does not show what was added to the latter 2, and it does not show that rows were added to UserRole.When I modify a user and cause UserRole to be updated I see this:+---+-+-++-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-++-+-+| 3 | x | 2 | [] | 4 | 1 |+---+-+-++-+-+No info about that row being added. If I cause a row in UserRole to be deleted I get the exact same entry, so I cannot distinguish between an add and a delete and I can't see what was added or deleted. But if I cause a row in UserInfo or UserExtendProduct to be added I see this:+---+-+-+-+-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-+-+-+-+| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |+---+-+-+-+-+-+Shows an add, but not what was added.So my questions are:-how can I get it to show the details of what was added or changed-why are updates to UserInfo and UserExtendProduct shown, but updates to UserRole are not?Thanks! Original message ---
Re: logging admin accesses
You seem to be asking for a full history 'system'. I think the Admin history exists to show a bit of history with a link to go back to the change form where it happened.Full history needs to be specified fairly carefully so it doesn't bog the system down. For example, every write costs a performance hit. Also, how resilient must it be to cope with database schema changes? How is it going to be used in practice? What are the benefits and are they worth the effort. I have worked through some of this in my current project and decided to create separate 'mirror' tables for only the critical information and automate data collection for others in a plain text field for archival.It can be quite open ended and might reward very aggressive specification.CheersMike--(Unsigned mail from my phone) Original message From: Larry Martell Date: 16/12/23 01:47 (GMT+10:00) To: django-users@googlegroups.com Subject: Re: logging admin accesses On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote:Top posting because of phone email client.Have you seen the Admin history? Might be already logged for you.Thanks, this is useful, but it does not seem to be logging everything. We have a custom user admin page that updates a few models in addition to User: UserInfo, UserExtendProduct, and UserRole. If I add a new user I see this:+---+-+-+-+-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-+-+-+-+| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |+---+-+-+-+-+-+It shows that a row in User, UserInfo, and UserExtendProdct were added, but it does not show what was added to the latter 2, and it does not show that rows were added to UserRole.When I modify a user and cause UserRole to be updated I see this:+---+-+-++-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-++-+-+| 3 | x | 2 | [] | 4 | 1 |+---+-+-++-+-+No info about that row being added. If I cause a row in UserRole to be deleted I get the exact same entry, so I cannot distinguish between an add and a delete and I can't see what was added or deleted. But if I cause a row in UserInfo or UserExtendProduct to be added I see this:+---+-+-+-+-+-+| object_id | object_repr | action_flag | change_message | content_type_id | user_id |+---+-+-+-+-+-+| 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 |+---+-+-+-+-+-+Shows an add, but not what was added.So my questions are:-how can I get it to show the details of what was added or changed-why are updates to UserInfo and UserExtendProduct shown, but updates to UserRole are not?Thanks! Original message From: Larry Martell Date: 15/12/23 06:44 (GMT+10:00) To: django-users@googlegroups.com Subject: logging admin accesses Is there a way to capture all admin changes (add, change, delete). I have some middleware that gets called on any admin add, change, or delete, but I have not figured out a way to capture specifically what was done, something like: model, PK, action, e.g. user, 12, change, first name changeduser, 15, adduser, 24, del
help
hello forks! i need your help. in my codes i see "extend_schema_view" is not defined. so i see that it is not defined but i do not know in which package it is. @extend_schema_view( list=extend_schema( parameters=[ OpenApiParameter( 'assigned_only', OpenApiTypes.INT, enum=[0, 1], description='Filter by items assigned to recipes', ) ] ) ) -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/dc7c29ca-76b4-4bf7-907c-f1db1a1a6bd9n%40googlegroups.com.
[no subject]
send me update all applications Store -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABFejJe%2BC29%2BoTp4mV5StdZ6p2hAkY9O%3D0UYROHRzvLZm-dVaA%40mail.gmail.com.
Re: logging admin accesses
On Thu, Dec 14, 2023 at 5:49 PM Mike Dewhirst wrote: > Top posting because of phone email client. > > Have you seen the Admin history? Might be already logged for you. > Thanks, this is useful, but it does not seem to be logging everything. We have a custom user admin page that updates a few models in addition to User: UserInfo, UserExtendProduct, and UserRole. If I add a new user I see this: +---+-+-+-+-+-+ | object_id | object_repr | action_flag | change_message | content_type_id | user_id | +---+-+-+-+-+-+ | 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 | +---+-+-+-+-+-+ It shows that a row in User, UserInfo, and UserExtendProdct were added, but it does not show what was added to the latter 2, and it does not show that rows were added to UserRole. When I modify a user and cause UserRole to be updated I see this: +---+-+-++-+-+ | object_id | object_repr | action_flag | change_message | content_type_id | user_id | +---+-+-++-+-+ | 3 | x | 2 | [] | 4 | 1 | +---+-+-++-+-+ No info about that row being added. If I cause a row in UserRole to be deleted I get the exact same entry, so I cannot distinguish between an add and a delete and I can't see what was added or deleted. But if I cause a row in UserInfo or UserExtendProduct to be added I see this: +---+-+-+-+-+-+ | object_id | object_repr | action_flag | change_message | content_type_id | user_id | +---+-+-+-+-+-+ | 3 | x | 1 | [{"added": {}}, {"added": {"name": "user info", "object": "x"}}, {"added": {"name": "user extend product", "object": "x"}}] | 4 | 1 | +---+-+-+-+-+-+ Shows an add, but not what was added. So my questions are: -how can I get it to show the details of what was added or changed -why are updates to UserInfo and UserExtendProduct shown, but updates to UserRole are not? Thanks! Original message > From: Larry Martell > Date: 15/12/23 06:44 (GMT+10:00) > To: django-users@googlegroups.com > Subject: logging admin accesses > > Is there a way to capture all admin changes (add, change, delete). I have > some middleware that gets called on any admin add, change, or delete, but I > have not figured out a way to capture specifically what was done, something > like: model, PK, action, e.g. > > user, 12, change, first name changed > user, 15, add > user, 24, delete > > I am looking for something generic that will work for all models under > admin control > > > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY5Es5WtrMc1-WXTHUix-CyZ7G6bRNx5y1Bsv%3DG4btuAmQ%40mail.gmail.com.
Re: logging admin accesses
Is that programically accessible? I want to record it in the database. from django.contrib.admin.models import LogEntry logs = LogEntry.objects.all() #or you can filter, etc. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a8cdb111-6e53-4dc5-b014-510ff07e1187n%40googlegroups.com.