Not able to make the Navigation Sidebar Quick Filter to function

2022-01-07 Thread Chew Kok Hoor
Hi all, I recently upgraded my project to django 4 and saw the quick filter, a it seems not doing anything no matter what I keyed in, I create da new test app with clean virtual environment to test. Similarly, no matter what I type in the Navigation Sidebar Quick filter, no filtering seem

linebreaksbr doesn't work

2022-01-07 Thread ___Maxim.Nesterov___
Hi, why linebreaksbr might not work {{somevalue | linebreaksbr}} For example, somevalue = ‘Joel\nis a slug’, and linebreaksbr doesn’t change \n → -- {% load static %} {{somevalue | linebreaksbr}} -- You received this message because you are subscribe

How to delete user salary record , but want to keep history till deleted date

2022-01-07 Thread Feroz Ahmed
Hi, How to delete user salary record , but want to keep history till deleted date. ex: 1. Month June 2. Month July 3. Month Aug 4. delete user record from Sep. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: How to delete user salary record , but want to keep history till deleted date

2022-01-07 Thread pankaj palmate
Then simply make that records inactive by adding one flag in table and instead of deleting make It inactive On Fri, 7 Jan, 2022, 7:22 pm Feroz Ahmed, wrote: > Hi, > How to delete user salary record , but want to keep history till deleted > date. > > ex: > >1. Month June >2. Month July >

Re: How to delete user salary record , but want to keep history till deleted date

2022-01-07 Thread Feroz Ahmed
Hi, Pankaj thanks for the tips! i try all the way, it not success , any syntax please. mean time i success to delete the record code as below: (but i just want to inactive the record of particular employee) history might need for audit purpose. def delete(request,id): employee=Employee

Re: How to delete user salary record , but want to keep history till deleted date

2022-01-07 Thread Julio Cojom
As Pankaj mentioned, add a field in your model called status or something like that. On the makemigrations set all status as 'Active' Then, your function will not delete, will update the object. def delete(request,id): employee=Employee.objects.get(id=id) employee.status = 'Inacti

change user creation form shown in Django admin

2022-01-07 Thread Anil Felipe Duggirala
hello, I am using a custom user model. I have created a form that includes an extra field: ## /users/forms.py class CustomUserCreationForm(UserCreationForm): class Meta(UserCreationForm): model = CustomUser fields = UserCreationForm.Meta.fields + ('phoneno',) I am using this

Re: translat using oscar framework

2022-01-07 Thread frank lucky
i make the po file and than install Rosetta and than find django.mo and django .po full translated for the language i want and than replaced it with the file it created with [image: make message.png] but noting change in site and oscar dasbord and add this to site too http://127.0.0.1:8000/ro

Re: linebreaksbr doesn't work

2022-01-07 Thread Muhammad Juwaini Abdul Rahman
Try `linebreaks` instead of `linebreaksbr`. On Fri, 7 Jan 2022 at 21:52, ___Maxim.Nesterov___ wrote: > Hi, why linebreaksbr might not work {{somevalue | linebreaksbr}} > > For example, somevalue = ‘Joel\nis a slug’, and linebreaksbr doesn’t > change \n → > > -- > > {% load s