Sai
Can anyones knows how to get this output
ilyas
Can anyones knows how to get this output
Using python or serializer?
Sai
Python
Jor
Hello, can anyone help me, i need to store a file from a filefield to a BytesIO buffer
Alex
Can anyones knows how to get this output
You've messed up brackets in output.
Mohit
Hello
Mohit
Sr anyone know that how to use stripe In django
Shivank
Hi friends, Do anyone have experience with azure stream analytics jobs... Please help me understand how we can automate i.e auto start and stop a azure stream analytics job.....
Rakesh
Hi all, Can we disable password validation in django custom user model,? Or can we remove the password field itself from customer user model?
Doragonsureiyā
Hi friends, Do anyone have experience with azure stream analytics jobs... Please help me understand how we can automate i.e auto start and stop a azure stream analytics job.....
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Pavel
Hi everybody! Do someone knows how can i change current site in middleware (via domain)?
{% Mohammed ALKHAFAJI %}
Hi every one How can i download my database "sqlite3" from Heroku website ?
Panda
Hi, anyone know how to integrate angular with django??
Eric
Hi, anyone know how to integrate angular with django??
The short answer is setup DRF (https://www.django-rest-framework.org/tutorial/quickstart/) and then your Angular frontend will consume that API. You can follow this tutorial (or any that you find on Google): https://www.twilio.com/blog/build-progressive-web-application-django-angular-part-1-backend-api
Abolfazl
i have this custom loginview associated with an athenticatonform but my submit button does not work at all. looking it is just a clickable button that triggers nothing . The front is completely ok!!!! Have anyone encountered such issues???? This is my code: class CustomSignInView(LoginView): form = LoginForm def form_valid(self, form): remember_me = form.cleaned_data.get('remember_me') if not remember_me: self.request.session.set_expiry(0) self.request.session.modified = True return super(CustomSignInView,self).form_valid(form)
Abolfazl
Share template code.
<form id="login-form" action="{% url 'user-sign-in' %}" method="POST"> {% csrf_token %} <label class="labels" for ="username">username</label><br> {{form.username}}<br> {{form.errors.username}} <label class="labels" for="password">password</label><br> <div class="password-wrapper"> {{form.password}} <i class="bi bi-eye-slash" id="togglePassword"></i> <br> {{form.remember_me}} <label > remember_me</label> </div> <input type="submit" name='user-sign-in' id="login" value='submit'> <input type="hidden" name="next" value="{{ next }}"> </form>
Alex
use `` <button type="submit" value="Submit"> Submit</button> in form
Alex
check terminal status
Abolfazl
check terminal status
solved it! That was a fu......! conflict with django template engine!!!!
Abolfazl
check terminal status
Thanks for taking your time !!!
Unkn0wn
help guys
Doragonsureiyā
help guys
Not until you explain your difficulties.
Unkn0wn
I can’t send screenshot
Maxim
I can’t send screenshot
ofc read the rules
Unkn0wn
AttributeError at /'tuple' object has no attribute 'get'
Unkn0wn
i use django
Unkn0wn
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join (BASE_DIR , 'templates')], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ],
Unkn0wn
from django.shortcuts import render from urllib import request # Create your views here def index(request): return render(request,'index.html'),
Unkn0wn
from django.urls import path , include from . import views urlpatterns = [ path('' , views.index , name='index'), ]
Qu35T
I think extra comma at the end causing this error
Jay
Can someone ask me why i should to learn Django? Please...
Mirco
Can someone ask me why i should to learn Django? Please...
Because it's one of the best web framework in python world
Mirco
It's a web framework
cj
Can someone ask me why i should to learn Django? Please...
why should you learn django? you're welcome
Jay
Well, I'm a beginner and i want to learn django, but not found any perfact source to learn can you help me where to i start?
Doragonsureiyā
Well, I'm a beginner and i want to learn django, but not found any perfact source to learn can you help me where to i start?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Deise Freire
Could someone please tell me what I'm doing wrong? Images on my system do not appear, how do I fix it? https://replit.com/@DeiseFreire2022/demo-v1#store/models.py The codes I used for the images were these: photo = models.ImageField(blank=True, null=True, default=None, upload_to='products')
Deise Freire
The images do not appear here on the site when we run https://demo-v1.deisefreire2022.repl.co
Yulian
The images do not appear here on the site when we run https://demo-v1.deisefreire2022.repl.co
instead of src="{{ MEDIA_URL }}{{ product.photo }}" in 'store/product_list.html' try: src="{{ product.photo.url }}"
Naughty
Can anyone send me the code for registration and login in views.py
Qu35T
Can anyone send me the code for registration and login in views.py
https://ordinarycoders.com/blog/article/django-user-register-login-logout
Sสmสn
Hi guys, i save multi date in JSON field . for example : row 1 : [ "2022-10-26", "2022-11-10" , "2022-11-16", , "2022-11-17"] row 2 : [ "2022-09-26", "2022-09-10" , "2022-09-16"] row 3 : [ "2022-12-16" ] How i can filter date bigger than 2022-10-01? in the example i must get row 1 & 3
Hi everyone Suppose we have three migration file 0001 0002 0003 Now I want to migrate migrations until 0002 migration. after that, migrate 0003 migration. I mean changes until 0002 will be applied to the database. Then 0003 should be applied. How can I do this by running manage.py migrate command?
Rami
python manage.py migrate myapp 0002
.
hi there i have a model's atribute and i wanna order it by quantity like if the quantity was bigger i wnat it to show up in the page i want the object that has the largest quantity to be at the top help me and thank you for yout time
.
and then write quantity ?
Vaibhav
Yup
Vaibhav
Would be helpful if it can share the scheme and what is your expected output as well
.
like this? class Meta: ordering = ['quantity']
Vaibhav
like this? class Meta: ordering = ['quantity']
Um are you trying to show it in admin or via api
.
should i write this in models page?
Sสmสn
You need pandas
ty pandas for create CSV data . but i need search date in JSON data in MYSQL __contains its work on json but __gte not work on multi date in JSONfield
.
hi there i have a model's atribute and i wanna order it by quantity like if the quantity was bigger i wnat it to show up in the page i want the object that has the largest quantity to be at the top is there anyway to do this do i need to make an atribute called quantity in my model?
Nasib
can you explain how?
Yourmodelname.objects.annotate(yourcolumnname_count=Count('yourcolumnname' ).order_by('-yourcolumnname_count' )
Maxim
can you explain how?
don't be lazy, read the documentation
Nasib
don't be lazy, read the documentation
And you don't be stingy, Maybe he is beginner he need to understand first
Maxim
And you don't be stingy, Maybe he is beginner he need to understand first
the documentation has everything he need to understand
Nasib
Everyone can't understand to read documentation, Sometimes we have to help