Caesar
how can i get slug of categories if my category model related ManytoMany with my product model. I want to get slug from product model?
Mohammad
first of all u abuse the using of vars() that it's not required into your code
According to what I read, vars provides a dictionary of object items. I used it to send initial values ​​that needed an item dictionary. Do I have to set the values ​​one by one in a separate dictionary? Is it a problem?
learner
I have a refresh button. When I hit it, it takes almost 30-40 sec to refresh status and after that it redirects to home page. I want to temporarily redirect to another page which says 'Refreshing' and after it's done, it should redirect to home page. How can I add that 'Redirecting' page?
learner
are u using Ajax or Fetch APIs ?
Just a basic django app without API
Mirco
Just a basic django app without API
u need Javascript, it's the same concept of showing a loading gif
learner
ok.. Thanks
Doragonsureiyā
ok.. Thanks
You're welcome! 😊
Fady samy
What do you use as a host?
Arezoo
How to have google form submit event trigger be caught by django to update site?
Anonymous
Anyone using ubuntu ? Just wanna ask about fixing second screen flinch
Artem
Anyone using ubuntu ? Just wanna ask about fixing second screen flinch
I am using Ubuntu I have usually screen flinch too.
Anonymous
Anonymous
Cuz the first one, just changed the display and it worked for me
Anonymous
I want to build a community website can I get help
Doragonsureiyā
I want to build a community website can I get help
Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain: - what you're doing - what you're expecting - what you're using - where you're running the script - what Python version you're using - what packages and their versions you're using - and the most important thing: show the code YOU wrote (read rule 5️⃣ for that) and more details, that way your chances to get help will increase
Vishnu
How I use duration field in my model ??? And set the default value 25 day??
Hello
DateTimeField(default=datetime.now()+ datetime.timedelta(days=25))
Sopan
How connect smtp in 127.0.0.1:8000
did you try smstplib? SMTP.connect(host='localhost', port=8000) But then you should be running mails server on that port. But are you crazy to run mail on that port? What exactly you are looking for?
Abdukakhkharov Yorkin
DateTimeField has the field like auto_add_now) works automatically @icantcode
J
Hello everyone can some one pls help me on this. I've a requirement. I've submitted_at = models.DateTimeField (timezone.now) Already existing in models.py file inside a class. Now i need to find the difference between current time and submitted_at as a filed in models in the same class. If i directly perform - operation it throws me unsupported operand type.
No Name 😎🙍‍♂
(Anyway I'd be happy to share some setup later, but this is a Django channel).
I've server and I want to auto deploy how can I do?
Anonymous
Hello everyone,anyone can give me callback url for fb and twitter i wants to login with fb and Twitter but getting error please help me
Mirco
did u active your virtualenv ?
Mirco
!rules
âshîsh
I am working with calling a asynchronous function from a python file using views. But I don't know how to call a asynchronous function from the view. I called a normal function from python using view previously.
Talha
hey when i fixed that header and its side bar but content does not render perfectly here is the link of this bootstrap tempalate https://startbootstrap.com/previews/sb-admin-2
Doragonsureiyā
hey when i fixed that header and its side bar but content does not render perfectly here is the link of this bootstrap tempalate https://startbootstrap.com/previews/sb-admin-2
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
𒂵𒐊𒍝𒊏
i make tag in html to my text when i refer it as charfild but the page of html didnot show it
Doragonsureiyā
🚫 ‎Vipendra [1108844485] is already banned.
Rahul
How to check a 10 question quiz in django and store its result in dB??
Hikmet
Does it matter where to override create or validate methods, in serializers or in viewsets? For example I want to validate password matching or custom creation method. I can do it either in serializers or in viewsets, right? It doesn't matter?
Droll55
Hello. I am new to django and doing my first project right now. I stucked with a problem. I'm trying to make possible for user attend to the event, but something does not work. There is no traceback and when i am trying to attend, the only thing i see is a white screen. The code is https://dpaste.org/uMKR. Thanks for help and sorry for my bad English :)
Fabian
how to set up ssl for a django api? i have a subdomain and django served by uwsgi
Doragonsureiyā
how to set up ssl for a django api? i have a subdomain and django served by uwsgi
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box, write down the same words you asked here Step 4: Read the first results
Iyanu
Good day... I am trying to create a timetable generator using Django...i can't seem to get my models well.. Anyone with a similar or good model to share on this?
Jerome
How connect smtp in 127.0.0.1:8000
You just have to define the email backend then you're able to monitor emails sent on console EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
Mo
Hello People) --- The task is to create an Alias class in Django, 4 fields (alias, key, creation date, completion date). The problem is how to impose restrictions so that, for example, you cannot create an instance with the same key and alias if the previous one (has completion date set to None) still exists. And how to use the lifetime and key for searching aliases? (I was sitting on the internet for a couple of days but I couldn't find anything: /)
Anonymous
Can anyone help me with rest API for registration and reset password by mobile OTP using django rest
Doragonsureiyā
Can anyone help me with rest API for registration and reset password by mobile OTP using django rest
What have you tried to do so far to solve that issue? Please show your code and explain where and why you're stuck on solving your issue. (read rule 5️⃣ to learn how show your code)
Vishnu
Please any one give me idea how can I do this:- It's like a monthly food subscription app Customer modal have fields (name, contact,plan, starting date, duration and duration count) I want to create django a model of my customer which contains a field of plan "starting date"and duration of plan (ex:25day) And a field 'durationCount' which start with 0day. everyday (except sunday) the value of 'durationCount' field increase by one and show customer info Until the customer duration count =< duration
Anonymous
How can I share the code
Doragonsureiyā
How can I share the code
To share code or error tracebacks, be considerate and use an online pasting service - here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you post a wall of text message (many lines), delete it quick or you may get a warn strike.
Anonymous
Ok
cj
How can I share the code
the bot told you what to do in its last line so you'll know how to share code, didn't you read?
Akash
Is there a better way to handle form fields other than using crispy in django templates. Like I want to handle special cases like... Onchange() event and custom form field validation
Akash
use JS
Do you know any other library like crispy ? It makes form UI much better with certain out of box validation
cj
Do you know any other library like crispy ? It makes form UI much better with certain out of box validation
but if you want to do something else on some specific input DOM functions (like onchange()) in the front-end, use JS, you have no other choice
հօรรεiռ
Is there a better way to handle form fields other than using crispy in django templates. Like I want to handle special cases like... Onchange() event and custom form field validation
you can add cusotm attributes or classes then handle them on javascript for example add a custom class to a field called "my-input" then in template use this this script $(".my-inpu").change(function (e){ ... } )
հօรรεiռ
Akash
Alright ! Looks like time to call the big guy - JS !
Mo
Does anyone know, how to write a restriction for Alias model, so none could be created with the same (name, key) in the same time range (start, end)???? Please, I need help :3
Mo
class Alias(models.Model): alias = models.CharField(max_length=25) target = models.CharField(max_length=24) start = models.DateTimeField(auto_now_add=True) end = None def __str__(self): return self.alias class Meta: constraints = [ models.CheckConstraint( ) ]
Anonymous
When user pay me it shows payment successful but It not save it on database as pro user what I need to learn
Timur
Anyone
I can give you a book. May be you will find something there
Gangadhar
Any solution for how to validate if else condition based formula in excel.
Vj
Login and logout token api??
Savan
Which programming languages use minimum cpu usage for image reading operation to transformation to text For millions of image processing
احمد الغامدي
i am using graphene and getting 'name' is an invalid keyword argument for GuestMutation error what is it related to?
Rahkmanuly
Hello DJANGO community!
Rahkmanuly
THE question is : 'Have you ever used QR generator in DJANGO?'.
Rahkmanuly
I found this one -> https://django-qr-code.readthedocs.io/en/latest/pages/README.html What can you say?
Dhanush
How can we open webcam of the end user and process the live video feed with the opencv?
A
can anyone help with this issue: https://stackoverflow.com/questions/66257246/multiply-every-form-value-in-django-template?noredirect=1#66257246