Kene
Oh! I just realised your question is tailored for the admin panel. I'm not sure how to handle this. I'd leave it to the experts in the house.
Ali Hasan
https://linggar.asia/?p=616
IDK
How to do status of filling form which separated to parts(steps), without saving it on localstorage and cookie
HD
i have this error: no such table: src_bill
HD
how to solve it?
Vishal
i have this error: no such table: src_bill
If you have bill table in models. Don't forget to apply migrations
Syed
Can anyone tell me free sources to learn Django
You can download any pdf book of django
Samuel
Hi everyone. I'm trying to deploy my Django application with AWS but I'm encountering the invalid header error despite the fact that I've copied the URL and pasted it in my allowed host in settings.py. Any suggestions guys
Rebellion
Friends, In 'UserProfile' model, I have set 'email' field to 'null=True, blank=True". But, when in django admin page, if I try to leave 'email' field blank, it shows me following error. " Exception Value: NOT NULL constraint failed: auth_user.email " What could be the reason..? Any solution for this..? Thank You..!
Rebellion
Did u set USERNAME field to email?
No, I did not change 'User' model. I created, separate 'UserProfile' model and connected it to 'User' model.
Rebellion
In 'UserProfile' model I'm having 'username' and 'email' fields.
H.G.
In 'UserProfile' model I'm having 'username' and 'email' fields.
Well then why would u have username and email field inside profile model...the user model has that...if u want to override some behavior of the fields included inside the user model, override AbstractBaseUser or AbstractUser.
Rebellion
Well then why would u have username and email field inside profile model...the user model has that...if u want to override some behavior of the fields included inside the user model, override AbstractBaseUser or AbstractUser.
ohh... I used Django Signals to reflect changes between 'User' and 'UserProfile' model. Everything works fine but, while saving 'UserProfile' data, 'email' field can not left empty. Otherwise it generates that error. May be should try making 'email' field required by setting 'blank=False'
Anonymous
imgs = Image.open(Images.img.path) Help me
Doragonsureiyā
ㅤ
I have a Foreign Keyfield inside a model called platform, I am using Modelserializers to map the key and value,by default when I sent a post Request on the API link I use to send the Id of the platform, but now I have modified the platform field , which now displays the name of the platform instead of ID, so when I am sending a POST request I m passing the ID of the platform but it still doesn't work and says Integrity Error why?
Vlad
how to get data in RetrieveAPIView by slug but not by pk ?
Mirco
how to get data in RetrieveAPIView by slug but not by pk ?
Just use the slug and not pk inside URL pattern
Vlad
Just use the slug and not pk inside URL pattern
I got this - View expected URL argument named "pk". Fix your URL or set the "lookup_field"
Mirco
I got this - View expected URL argument named "pk". Fix your URL or set the "lookup_field"
As the message suggests, you can use the lookup field to specify which field to use inside the get_object of the view
Vlad
As the message suggests, you can use the lookup field to specify which field to use inside the get_object of the view
I'll add to my question .. how to get multiple entries that have the same slug?
Vlad
The slug must be unique
ok, if instead slug - field category? How can i get all posts witch have the same category?
Vlad
in simple django i did it like this: Posts.objects.filter(category='category'). But how to do in RetrieveAPIView?
Mirco
Django Rest Framework is still what you call simple Django It's "just" an app Take a tutorial and keep studying to learn how to write APIs quickly
Vlad
Django Rest Framework is still what you call simple Django It's "just" an app Take a tutorial and keep studying to learn how to write APIs quickly
path('breeds_list/<str:breed>/', CatsView.as_view()), ---- class PostDetail(generics.RetrieveAPIView): lookup_field = 'breed' queryset = Cats.objects.all() serializer_class = CatsList def get_queryset(self): slug = self.kwargs["breed"] # print('$$$$$$$$$$$$$',item) return Cats.objects.filter(breed=slug) ---- i got error Field 'id' expected a number but got 'Burmese'
Anonymous
https://pastebin.com/ApgEK2zZ why is the image not shrinking?
Anonymous
Anybody knows pythonanywhere hosting?
Doragonsureiyā
Anybody knows pythonanywhere hosting?
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
Kevin Mitnick
what is best, create a crud with functions or class.
amirHosseinZibaei
Hi, my django program runs on the Internet with a desktop without any problems But in phone platform, when I try to logging or submitting some form in the site, it gives an error 403, which is for csrf what is wrong here
Vxvek
How to declare a variable in django template other than using {with} ??
Vxvek
Is there any way ?
Vxvek
Why do you want to do that?
I need to declare a variable in template and then inside loop when condition statisfy I need to get that value in Javascript
Charly
Can I change the value ??
Which value? Better to show the code that is problematic right now instead if giving use useless chunks of infortation so we can help you better/
ADI
def run_test(): m = matrix('CE802_P2_Data.csv’) for k in range(2,5): for beta in range(11,25): S = get_groups(m, k, beta/10) print(str(k)+‘-’+str(beta)+‘=’+str(S.get_count_frequency()))
Doragonsureiyā
def run_test(): m = matrix('CE802_P2_Data.csv’) for k in range(2,5): for beta in range(11,25): S = get_groups(m, k, beta/10) print(str(k)+‘-’+str(beta)+‘=’+str(S.get_count_frequency()))
Rule 5️⃣: Never post walls of text or screen photos. Use paste bins like https://linkode.org, https://nekobin.com (or your favorite one)
ADI
anybody know
Charly
anybody know
know what?
Edge
Good morning good people
Edge
Hope your well, Got an issue that can be tackeled but i personally fail to. Has anyone had experience with Multipart form data serialization? With OnetoMany relationship? For fetching data it works but when we override the create method it doesn’t.
Edge
Alright, but currently i can't yet since im out of office but just wanted to get some clarification on what are the best techniques to handle multipart serialization
Shukurillo
what is the best tutorial to learn django rest?
Shukurillo
the officlal docs
anything else?
shiva
How to add celery to existing function
shiva
For Asynchronous job
Charly
How to add celery to existing function
you don't add celery to exsiting function, you need to create a task and call it from where needed
Helsinky
In my django app , whenever there's entry and model is updated with new entry , I want to send a WhatsApp notification or just track the changes on model.. Like whenever chnges made to server need to send notification to client. Can anyone please guide me how can I achieve this..
Charly
Task.py enough?
No, read django celery documentation
JustAnotherOne
Hello everyone
Helsinky
JustAnotherOne
does anyone has dealt with jquery datatable in the front-end with python? I have a table in the front-end, viewing only 4-7 columns, and I need to build a filter model in the front-end, and the searched-by columns may not be visible to the client. any idea?
shiva
What all needed to run background task using celery, celery beat
shiva
I have an api with some functionality i need it asynchronous job
Charly
What all needed to run background task using celery, celery beat
have you checked the celery documentation regarding that?
shiva
shiva
First steps with Django — Celery 5.2.3 documentation https://docs.celeryproject.org/en/stable/django/first-steps-with-django.html