TonFutures 💎
Pandu
TonFutures 💎
but raise error
Pandu
TonFutures 💎
.
ALLOWED_HOST = ['*']
TonFutures 💎
Pandu
you're using vps on cloud
or locallly installed
TonFutures 💎
TonFutures 💎
Cloud server
Pandu
then may port 80 works
if its not consumed by other service :p
Pandu
or just check whos using 80/8000, terminate its pID, and run django
or learn to set firewall rules in ws
Anonymous
my user model have a m2m relation with vendor and a m2m relation with product
i like to get all of this to relations now i'm getting both by this code:
vendors = rquest.user.vendors.all()
products = rquest.user.products.all()
but I'm sending 2 query to DB
i like to get all vendors relations and all products relations in just one query
Pandu
never tried this but i eas thinking about this function
user = User.objects.get(username='username')
m2m_r = user._meta.get_m2m_fields()
for r in m2m_r:
print(r.name)
Mobin
Hello, guys, do you know about the module that Chat GPT Data recently created for Django Data? How to use it in projects or the codes to use it in projects??
Maxim
@dossigue
offtopic
read only 24 hours
Maxim
@Daniel_khj
rule #1: speak English
read only 1 hour
Professional
I am doing first code in django and I am not getting output can any one help me
Amir
clouded
Bro I am not able to send pictures
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://hastebin.com
- https://nekobin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
clouded
Chocolate has been muted for 1 hours: off-topic
Macara
Good evening everyone, I want to print an html page with python django, please I need help
@venelouis
Hi do you think is a good idea try to learn Django 2, 3, 4 and 5 versions?
Macara
Muflone
Muflone
Macara
Thanks, don't you have the source code?
Ali
Is Mastering django book available for any one here ?
Muflone
Ali
I thought it was a free book, so I asked
Muflone
Google: Mastering Django book
First result Amazon with price, second ebay with price, third the author website with the links where to buy
Ahmed
Hello any tutorial on how to implement django rate limit on railway hostin the postgresql dosen support cache
Jimmies San
Jimmies San
"Django rate limit how-to"
Ahmed
vijay
Hello guys I am learning django best platform in YouTube please suggestions
Jimmies San
What does not work? What did you try to do? Share code/process and we can take a look together
Tejas
Could someone share resources on creating authentication systems for user login, logout, and registration? As a fresher, I find myself confused about some of these topics.
iam
iam
if you add "learndjango authentication system"its first 1 result
Jimmies San
Anonymous
Celery or Daphne which is best for asynchronous task?
Rohan Ekke
i have problem, when i login in my homepage i want to see the lable as 'you are login as username' so in my html i write
<div class="col-4 d-flex justify-content-end align-items-center">
{% if not user.is_authenticate %}
<a class="btn btn-sm btn-warning" href="{% url 'login' %}">Login</a> &nbsp;
<a class="btn btn-sm btn-outline-secondary" href="{% url 'register' %}">Register</a>
{% else %}
<span>You are logged in as {{ user }}</span>
&emsp;
<span><a href="">logout</a></span>
{% endif %}
</div>
but still i that function is not working, in my views.py i written,
def logout(request):
auth.logout(request)
return redirect('home')
Anonymous
HBS
Does anyone send unit test cases in views
iam
so hard to read
AB
Hello is Django good
I mean I am node js developer
What is the difference between node and Django
Jimmies San
Jimmies San
And it is a web framework
AB
Django is based on python language
Yeah I know I am studying AI in university
So I mean I want all my time in one language like python not studying two languages js and python just one so Django or node
AB
Arshiya
Hi guys
How should i set css class for a fields label in forms?
Jimmies San
You should compare js and py
Jimmies San
Not js and Django, makes no sense
Jimmies San
Just Google and search
Jimmies San
Jimmies San
It's a runtime engine
Uzumaki
Can some one help me with my projects deployment In nginix
Uzumaki
And also I want to cross check whether my code is missing some thing or not
Uzumaki
Can any one guide me through this process
Ahmed kamal
hey everyone, I am a computer science graduate and I took Django and made very small projects. I needed a mentor to make a few projects so that I could find a job and have a protofilo look at it and don’t worry. I hope someone can help me because I am still loyal to the army. Thank you in advance.
Maxim
clouded
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://dpaste.org
- https://hastebin.com
- https://nekobin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
H
Shan
Anyone know how to check each of input value compare existing class field value in django script ?
Elisa
[1/25, 4:51 PM] Christy Bipin: https://bin.kv2.dev/~65b243e75de7ed6bfdbc666b
[1/25, 4:52 PM] Christy Bipin: https://bin.kv2.dev/~65b2446a5de7ed6bfdbc6673
Elisa
i have a problem....my project is django python...i have some issues with the project work... can't work sweetalert function... actually..I want.when i click the submit button I want a message box 'successfully'... then when I click the submit button in an empty form i want an message box "please fill the form"... this is my problem...could you help me please.
Stormy
Maxim
Elisa
def personcreateview(request): form = PersonCreationForm() if request.method == 'POST': form = PersonCreationForm(request.POST) if form.is_valid(): form.save() messages.success(request, "order confirmed") return redirect('/') return render(request, 'form.html', { 'form': form})
Elisa
Views.py
Elisa
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js" ></script> <h2>Person Form</h2> <form action="" method="post" id="personForm" data-cities-url="{% url 'ajax_load_cities' %}"> {% csrf_token %} {{ form.as_p }} <button type="button" class="btn btn-primary" onclick="function1()">click me</button> <script > {% for msg in messages %} function function1() { swal("{{ msg }}"); } {% endfor %} </script> </form> <!-- Datepicker -->
New Snippet  Fork 
Memochō