godmode
But i think i got the image un the CSS file
godmode
The CSS file is in static in the root
godmode
Man it is so huge
There is two css, one if them got image background, just look for the Word background
Maksim
hi everyone. I need to exclude repeated instances when I post form. I made so: if request.method == 'POST': sub = request.POST.get('email') form = SubscriberForm(data=request.POST) if form.is_valid(): if sub in [sub.email for sub in Subscriber.objects.all()]: messages.error(request, 'Вы уже подписались') else: form.save() messages.success(request, 'Вы успешно подписались') return redirect('/') I think there is more clear way to make it or it's not so bad?
Maksim
Use distinct()
need to use postgress?
Maksim
can you demonstrate me some example
Mirco
Just call . distinct()
Maksim
which arguments should I use
#
can you demonstrate me some example
why don't u looks django query docs?
#
which arguments should I use
Author.objects.distinct()
#
https://docs.djangoproject.com/en/dev/ref/models/querysets/#distinct
Maksim
thanks a lot, it was useful information
Maksim
no, i don't know how it solve
#
no, i don't know how it solve
please screenshoot the errors and text me
Mirco
no, i don't know how it solve
Why don't u make email unique into your model ? So don't u have to check if already exists
cj
https://django-mysql.readthedocs.io/en/latest/model_fields/json_field.html
that's an external package, not Django built-in
Maksim
Why don't u make email unique into your model ? So don't u have to check if already exists
ok I made it, but how can I get a message? it doesnt work if form.is_valid(): if Subscriber.objects.filter(email=sub).exists(): messages.error(request, 'Вы уже подписались') else: form.save() messages.success(request, 'Вы успешно подписались') return redirect('/')
Maksim
can't get error message
Maksim
i set up uniqie = true
Maksim
it works, but I want to get error message "You have already subscribe"
Maksim
if user send form second or more time
Maksim
how
Mirco
how
Take a tutorial and study more , everything's gonna be easier
Anonymous
Please who will be nice enough to teach me how to create a website where I sell shoes, and mostly clothes so the home page should contain the products available so when a customer click any product the next page should ask him for specifications like size, color and others specs then when he is done he proceed to checkout I don't want an online payment setup up now he should be redirected to my WhatsApp chat after he clicks checkout to complete the trade 
Toss
Everything's there to study.
Rounak
For hosting what is the minimum charges I need to pay?
Rounak
For 1yr
Михаил
Rounak
Depends on hoster you choose
If it is a USA server... Then
Михаил
If it is a USA server... Then
Then you shoukd choose the one that provides hosting services in the US
Aleksandr
Hi guys! I have a question: how can create checkbox (from function, that "looking" in another model to exist instance object) at django model, in tabularinline? screens examples: https://ibb.co/crh6kp1 https://ibb.co/DbYqhyB
Nurbek
What's the best practice (method) of internationalization in django? Can someone advice? Thx!
Rounak
I m seeing for hosting a website in python its too expensive
Rounak
But why!!??
Shubham
Hello when I am hitting 'tail -f /var/log/postgresql/postgresql-9.5-main.log' to get the eqivalent sql query for ORM , I am getting nothing on terminal any leads?
Aleksandr
Михаил
I guess it shoud be read only, correct?
Михаил
https://stackoverflow.com/questions/3820182/custom-html-field-in-the-django-admin-changelist-view
Михаил
You display checked checkbox if there is an FK instance and unchecked if there is no, right?
Михаил
Just use standart django fk widget which will allow you create fk model if it does not exists.
Михаил
Reply
What's your budget?
Rounak
What's your budget?
If I am using in word press I m getting hosting at 42 dollars but when I m trying python it goes to 252dollars
Михаил
Amazon lightsail?
Rounak
Amazon lightsail?
No it was go daddy
Михаил
You need a VPS server for django
Julius
MVPS for instance
Михаил
512 Mb ram without docker or 1+Gb for docker
Михаил
For small project
Rounak
Price?
Rounak
For 1yr
Rounak
Can u give the link
Julius
https://www.mvps.net/
Aleksandr
You display checked checkbox if there is an FK instance and unchecked if there is no, right?
I don't see any checkbox, because it's not BooleanField from model. It's result of my function that return queryset .exists() from another model
Rajat
Can anyone help me how to print form fields onto next page by clicking the submit button of the form.
Anonymous
Any one know hot to add namespace on my main urls.py
d3vsh3d
Hello guys!!! Am new in Django. I need advice on how to start learning it. I have a knowledge of Python basics.
Doragonsureiyā
Hello guys!!! Am new in Django. I need advice on how to start learning it. I have a knowledge of Python basics.
Check out PythonRes, a channel for Python resources (links to help you out).
d3vsh3d
@Doragonsureiya_bot Okay thanks. Let me check it out
Shubham
Hello guys Im constantly getting an error and Im not getting its root cause while migrating the model
Shubham
ValueError: invalid literal for int() with base 10: ''
Shubham
https://dpaste.de/O8fq
Shubham
Post the migration
https://dpaste.de/ztfy
Ori
https://dpaste.de/ztfy
Hm, could you post the traceback too?
Shubham
Hm, could you post the traceback too?
just im on it, i will post