sim
if yes then PLZ pm
Uday
i have a method in serializer class for validating data
im raising some validation error, how do i pass and show the validation errors on template?
Uday
if username_qs.exists() and registerUser.exists():
raise serializers.ValidationError("Account with number already exists.")
return value
so i need to show the validation error which is raised here
Aya
Aya
Uday
Uday
Uday
isnt there anything like the validationforms we raise in forms in normal django?
Uday
could there be any way around without using js?
Mirco
Mirco
Aya
Mohammad
Hello guys, I'm fine, I just came from Windows, Linux, and when I run the rap project, the login.html page doesn't work, thank you for your help.
Mirco
thenils
how to make filter form multiselected dropdown
thenils
where i have list of country and i want to let user select multiple country together
tanish
Django.db.utils.IntegrityError
tanish
Can anyone help me solve this
faran
Hey, add the things to the settings.py file as the database as said in (https://devcenter.heroku.com/articles/deploying-python) and add the
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '<database_name>',
'USER': '<user_name>',
'PASSWORD': '<password>',
'HOST': 'localhost',
'PORT': '',
}
in the part of name, user, port, hosti, password I leave it by default or should I do something man
hi you should put the heoku database information. its provided in :
https://dashboard.heroku.com/apps/<app-name>/settings
then scroll and push the button :
Reavel Config Vars
there you can find DATABASE_URL
you see a value for it :
postgres://<user>:<password>@<host>:<port>/<name>
the url there is like this you should put the following in your settings.py
Mustafa
thenils
def search(request):
query = request.GET['search']
data = labels.objects.filter(Q(name__icontains=query) | Q(label_est_year__icontains=query) | Q(country__country__icontains=query) | Q(category__category__icontains=query))
# f = label_filter(request.GET, queryset = data)
data2 = []
for label in data:
if label not in data2:
data2.append(label)
f = label_filter(request.GET, queryset=data2)
ctx = {'filter': f}
return render(request, 'labels/filter.html', ctx)
thenils
getting error 'list' object has no attribute 'model'
Anonymous
while trying to deploy a django site using heroku,i am geeting these errors when i try to 'git push heroku master' ::
?: (staticfiles.E001) The STATICFILES_DIRS setting is not a tuple or list.
-and-
Error while running '$ python manage.py collectstatic --noinput'.
Mirco
faran
Anonymous
Anonymous
wait i will DM you some screenshots
faran
Mirco
ok
Don't allow them to bother you
They can share the code here without screenshots
Rahul
Hey guys!!!
I am trying to build a project that contain multiple user types i.e. Seller, Customer, Admin.
I am very confused about how I would implement the signup and signin processes for the different user types.
So far, I have my User model and the Customer model extended by a OneToOneField to the User model for extra fields.
Rahul
عــمــر
Hi , i want to delete all model objects on friday
How can i do that with django ?
faran
hi which one is the best option for dynamic fields in django model ? JsonField or use EAV . I want to keep it as simple as possible . and if any other option please mention it. thanks
Anonymous
Hello everybody! Can you teach me how to set up a django?
Anonymous
Pranav
Hello everybody! Can you teach me how to create view for check mail opt and entered input field is same then verify equal to true
Cacio Lucas
Guys, how can I annotate values on a queryset with information from another queryset?
Cacio Lucas
I have a products queryset, but the price is stored on another model, so, in another queryset
Cacio Lucas
I want to annotate on my products queryset the price, from this productsprice queryset
Anonymous
Ak
Hey Everyone! So, I am developing a blog and i intend to use djangocms for the same. My question is that how can i show all the pages created in the home page in DJangoCMS.
IND_
guys does someone use mongodb
IND_
in django i want to know how to integrate ir
cj
IND_
thanks
cj
I hope you understand that and stop being stubborn trying to use Django with MongoDB
IND_
yep which db is good then
IND_
for best peformange
cj
for best peformange
read that article... it looks like you didn't read it, did you?
there's exactly one entry there: The 5% Reason: Performance
but... I see you didn't read it
Nani
When we need sessions and cookies
IND_
yes but i am asking you
cj
also PostgreSQL is the *must use* RDBMS
Raja
Does any one know how to get visitor ip address and location from mobile in django
Mirco
Hikmet
Hey everyone. I want to upload image for my model. Through postman and browsable API it is working fine. But using angular from client side it shows 400 error. Is it problem with angular? Or I should make changes in my side of code?
cj
Hikmet
Hikmet
From django it is working fine as I say. I can easily add image to my product and it returns an object
cj
Hikmet
I just want to know, is the problem in django?
cj
debugging involves everything... but if you know your Django code works, then debug JS code
Hikmet
cj
Hikmet
cj