༒ROHIT
Tan
https://learndjango.com/tutorials/
https://learndjango.com/tutorials/django-allauth-tutorial
Harshit
IntegrityError at /admin/board/board/add/
duplicate key value violates unique constraint "django_admin_log_pkey"
DETAIL: Key (id)=(311) already exists.
Request Method: POST
Request URL: http://127.0.0.1:8000/admin/board/board/add/
Django Version: 2.2.10
Exception Type: IntegrityError
Exception Value:
duplicate key value violates unique constraint "django_admin_log_pkey"
DETAIL: Key (id)=(311) already exists.
While adding any new instance in a model I am getting this error. Any fixes to this ?
Д
Harry gorilla
I have seen both class based views and function based views in django. I have come to love class based views since they are so easy and also saves time. Unfortunately, most projects that i am learning from are function based views and converting them to class based views is sometimes challenging. What do you guys prefer? Class based or function based views?
Harshit
Д
Д
Sometimes you have to, when working with triggers, I think
Harry gorilla
Д
Harry gorilla
Д
But some things like triggers have to be pulled in as individual functions/decorators or so, and then incorporated into your code
Д
They don't have class-versions
Harry gorilla
Maybe it might come in future django updates
Д
Sorry they are called signals, not triggers.
Д
Signals | Django documentation | Django
https://docs.djangoproject.com/en/4.0/topics/signals/
Д
I've used a signal for creating a Profile model instance when a new User model instance was created.
The User was 1-to-1 with the Profile so it was basically extending the User.
Harry gorilla
Д
Thanks, If i'll get there, i'll understand it now
They're nothing difficult. They just let you catch events and respond to them. The point is that sometimes you're in a situation where you need/want something to happen "magically" and that lets you do that.
Д
You want Django to call a horn whenever a new model is saved? Signals to the rescue.
Harry gorilla
Sure, thanks
Tony
i have (name,code) fields in a model ... and i want to make the login by them
Tony
Polina
Hello!
Can anyone help me with this question please:
https://stackoverflow.com/questions/71675533/break-response-when-client-goes-from-stream-streamhttpresponse-django-google?
Poppu
class Movie(models.Model):
title = models.CharField(max_length=255)
poster = models.ImageField(upload_to=f'movies/{title}/', blank=True)
raise Error(result["error"]["message"])
cloudinary.exceptions.Error: public_id (media/movies/<django.db.models.fields.CharField>/2_qjwglb) is invalid
is anyone know how should i get my movie title here if i do now its simply return title object not a name
..
Could you please suggest some business Intelligence too to integrate with Django.
..
Tool*
..
..
..
Show the other model too. Try using foreign key
Sulton Abirqulov.
There was one question.
Can I send a message to the bot from the Django control panel?
Did anyone do that
Can this be done by adding a "Submit" button to the admin panel? To send messages to message bots on message models
Abdulhamid
Sulton Abirqulov.
Happy days
Does anyone have the experience with django-sms library? Please tell me about it or anyone suggest any good SMS library.
Anonymous
How to add pk in django rest routers
Д
Д
Use nested route package it will add
can you explain — I'm looking at https://github.com/alanjds/drf-nested-routers but I'm not sure why you need something extra to solve this problem
Сергей
Greetings to all! In general, such a problem, when parsing images, incorrect names are displayed (to the right of the images are the names). This is due to the fact that some special font is installed on the site from which the data is taken. For example, you need to parse the name "Orlando M.", but in fact "PQlijdI b." is parsed at the output. How can I fix this nuance so that the output names are correct?
Сергей
Here is my emblem parser. He seemed to work normally before that, downloaded the logos themselves and prescribed links to the file: https://dpaste.org/c53L
Сергей
But now on the site EuroBasket.com they put some kind of protection against parsing.
Сергей
How can I show a screenshot?
Doragonsureiyā
How can I show a screenshot?
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Сергей
I think so, and without screenshots it is clear
Сергей
Alex
Hi Guys do you know a good tutorial for setting up django + Vite cheers
Сергей
No one will help?
Д
No one will help?
I looked at your code. The problem is still unclear to me. There's too much non-sense there; i.e. the problem is not clearly visible. How are you parsing the text?
Д
Сергей
Д
Anonymous
https://stackoverflow.com/questions/70741069/intpk-not-working-inside-router-in-django-rest-framework
Anonymous
Sam
Can we detach a resource (without deleting resource) from stack in cloudformation within AWS console itself..?
anyone help me with this
W3
Hello everybody, I'm currently learning django, I've started a blog project, I'm having problems with templates, can anyone help me? I
(⌐■-■)
hello, can we make a skrible.io clone using django channels ?
Eslam
hi guys How can I add the number of product views?
Anshu
Anonymous
Error: Response has no attribute model
Bazaroph
Hi everyone, I can't get the images that were uploaded when I'm in production. Locally I can get them back but as soon as I switch to DEBUG=False, I get page not found 404.
Django 4.0.3
whitenoise 6.0.0
Pillow 9.0.1
Host PlanetHoster
Дмитрий Борисов
Bazaroph
anuprash
Hi guys how can deploy my django project on digitalocean?
(⌐■-■)
~:$
Д