Adzmely
there is a discussion about this 10 years ago …
abhishek
Yes but for me I was getting stuck in logic but now I got it I need to fetch the previous integer from db and need to give an single increment for that
abhishek
Like id it will increase
For empid it should start from 100
abhishek
Like that
Adzmely
id= autofield
empid = id + 100
abhishek
Ohh ok
Adzmely
u can add a save func in your model class , that take the value of self.id and set self.empid = self.id + 100
Adzmely
overide save method in order to set the empid value ..
abhishek
Super save?
Adzmely
Super save?
google for overide save method in django model, u will understand …
abhishek
Ok
Smile
hello
is the delete method safe to use? Or POST is the most reliable and why?
Google
I have a postgresql database. How can I use django-dbbackup?
S
Anyone know Django loggers concept
S
Anybody Please help me to excecute django logger
Vishal
Can we edit the model data in a list view ??
Smile
with what it is connected that the given request without the distinct() will return duplicates?
tags = Tag.objects.filter(name__icontains=q)
object_list = self.model.objects.distinct().filter(
Q(title__icontains=q) |
Q(project_owner__name__icontains=q) |
Q(tags__in=tags))
ssff
opencv(4.6.0) d:\a\opencv-python\opencv-python\opencv\modules\imgproc\src\color.cpp:182: error: (-215:assertion failed) !_src.empty() in function 'cv::cvtcolor'
ssff
ssff
ssff
I know that this group for django
ssff
OneRepublic
Hello All,
is it a good idea to create different table (i.e model) to store 2 different type of users?
I want them to signup with different fields in form. I've created a custom user model.
Max
class Youtube:
def analyze(self, request):
if 'url' in request.GET:
self.url = request.GET['url']
url = self.url
url = url.split('=', 1)[1]
url = url.split('&', 1)[0]
url = 'https://i.ytimg.com/vi_webp/{}/maxresdefault.webp'.format(url)
context = {
'url': url
}
return render(request, 'main/index.html', context)
Hi gues, why it says that I have to put 2 arguments, anybody knows?
taofyboy
ssff
Software Engineer
https://nekobin.com/bixonufuga
Software Engineer
Is this correct?
Oxytocin
Hi
Im new to django and have a question now. Thanks for help
Actually I have 5 models: ls-bl, list, block, question, answer
Ls-bl connects one list with one block
Each list has some questions
And each question must have one answer
Now I want to create an obj of answer for each question of the list in ls_bl
Would you please explain that how I can do this?
navid
hello everyone
i need help understanding how django ORMs work through many to many relationships
consider a PRODUCTS and a CATEGORY model and a third table for making a relationship between these two and some other details
having the id of the category how can i access the products related to it?
kenton
navid
Thayrone
Good afternoon guys, somebody know handle with Django tenants? How can i use autocomplete Fields with shared apps and tenants apps?
Hunter
In what sequence the django files are executed ???
navid
data = Products.objects.filter(productscategory__category=category_id)
navid
here's what i tryed and the result
navid
this returns none although there is data matching the conditions
Charly
navid
category__category=category_id?
navid
Cannot resolve keyword 'category' into field. Choices are: created_on, description, main_image, name, pictures, price, product_id, productscategory, userproduct_cart
Nityananda
How to connect react js with django??
Hunter
Anyone
Charly
Mirco
Doragonsureiyā
Anyone
Maybe anyone is here, yes, but they are not obliged to read everyone's message here neither to reply to everyone's message, if someone wants to reply to your message, they will do that, just don't try to draw attention to your message writing "anyone?" every 5 minutes, that will lead you to be warned for SPAM/Flood, just be patient or use Google/DuckDuckGo to research about your question instead of wasting time here waiting for people to do your work.
Have a nice day 😊
Stealth
hi, i need help. i have django project and nginx in docker. but i have dont working video. static work, image work but video dont work dont load player. help please me
Tadiwos
m
Stealth
Nityananda
Nityananda
Suppose I have to use components of reacts then how should I do.
Beki
Hi there i was starting with django and peoples refer me to use node .... any suggestion here
Mirco
👑 Dharmzeey
Please i have reoccurring issues with my django model , migrations and database.
Summary, today i changed my default id to uuid and then after migration, i wanted to run migrate command but have been getting error (django.db.utils.IntegrityError: could not create unique index)
I know if i delete database table, the problem will be solved but i already have a lot of information
Please how can i solve the problem without dropping my table
👑 Dharmzeey
I have checked the internet, and tried several methods, but none worked
👑 Dharmzeey
And also, not only for uuid, in the past I have run into such error whereby I later end up deleting the migration and the table, but I don't want to delete the fable
It is even always worse in production
asymtrc
hey folks ! how do I set data when initializing model automated ? I have model Country and City , co city has ForeignKey=Country . And I want another model Hotel that has ForeignKey fields for City and Country , how do I make Hotel to override "country" field from City ?
MuhammadAmin
MuhammadAmin
OneRepublic
Shrenika
I got an error template does not found error
Shrenika
Anyone know how to solve that
Favas
Django 2.2 relatedobjectdoesnot exist error for onetoone field
Ramesh
Hii all I'm creating a survey app with survey model questions models and responses. Now I'm getting the problem representing the respective survey questions as headers and the responses in a tabular format, could anyone please help me
Favas
Any ideas about this error anyone??
Amaljith Chacko