Re: How to get username in django_requestlogging

2021-01-03 Thread Shailesh Yadav
Hi RyuCoder, Thanks Actually later I have found that this module is very old (2011) and it seems that the middleware no longer works with recent versions of Django. I am trying to implement 1st Answer by passing an extra parameter but not sure Filter where I need to define it and also it is comp

how to validate empty field value in django 'import_export' at db level

2021-01-03 Thread Shailesh Yadav
Hello everyone I have created one webpage where I am using Django *'import_export'* Resource for .xlsfile upload. I am having below fields name in the .xls file as shown below image. [image: shift.png] Now here *id* is my primary key and upload functionality is working fine. Now I want that wh

How to Use CRUD Operation in Any Page

2021-01-03 Thread Dhruvil Shah
Basically i want to do CRUD operation in one specific table Id for example if i am in 'http://127.0.0.1:8000/view/1' this page i want to do crud operation for this specific id and have small table below it. 2 tables class Allinvoice(models.Model): class Invoicedetails(models.Model) invoice =

Re: How to get username in django_requestlogging

2021-01-03 Thread Chetan Ganji
However, use sentry for logging on prod servers, it will make your life easier. Its free to get started 😉 On Sun, Jan 3, 2021, 11:08 PM Chetan Ganji wrote: > Hey, > > On that link it is mentioned as below. > > If any of this information cannot be extracted from the current request > (or there

Re: How to get username in django_requestlogging

2021-01-03 Thread Chetan Ganji
Hey, On that link it is mentioned as below. If any of this information cannot be extracted from the current request (or there is no current request), a hyphen '-' is substituted as a placeholder. Maybe you are trying with anonymous user? 😅 On Sat, Jan 2, 2021, 8:42 PM Shailesh Yadav wrote: