Anonymous
Omair
i have an issue with handling staticfiles in production server.... the staticfiles arent coming through with nginx and gunicorn
You need to check your files directive in your nginx config and point it to the static file folder
Holla
Here is a link for the code tha i was following along i haded this little issue https://pasteboard.co/JtZULS2.png
Holla
The code seems fine my condition invalid if its correct
Sai
Hey everyone. Do you know how to add fields to model based on Boolean field? For example, i need to add fieldA if status=True, else add fieldB
One more alternative is there Create a list yes and no and use choices keyword in your model then u can select the option what u want
Agar J
how to handle post to POST request to specific user in Django: So I am making an app that allows users from a flutter app to request for products from a backend API made with Django and Django-rest, to its web-app. How can I make sure that when a client requests a product, the product request goes to the specific user that posted the product instead of just anyone on the backend....I've been stuck on this for the longest time. How can i sort it out and design it best ?
Agar J
any help would reaaaally go a long way
Rids
I downloaded a project from GitHub which is not working
Rids
Can someone help me on this
M
Hi guys I have a query On button click I select data from database and display it in chart. Usually it takes 2-3 sec on select query and display do we have some way in django or any other where I can display something like please wait while select operation ongoing ..as of now just page keep on loading
Doragonsureiyā
Can someone help me on this
Your question is not related to Django. Please move to @PythonOfftopic group and ask there.
Zulfikar
Hi. I want to try django admin. But if i try some django admin templates from github. That is not contipable with django 3.1 Are you have some recommendation for django admin templates? Please suggess me
Sreekumar
Django signals post_save will not work within celery task?
lil meow meow
Hello everyone. I'm struggling with this problem(https://dpaste.org/rOve). Before that, i've changed the name of the folder, where project is located. Somehow runserver works, but migratoins gives error. Where i've done mistake? 2) The name of folder looks: "new_name"[old_name] in pyCharm. Is that ok or there is some problem exists?
Sreekumar
Django signals post_save will not work within celery task?
Hi Can anyone help me on this. I have a periodic task which saves a model occasionally. But post_save signal not triggered by that.
Anonymous
Which Library is good to implement session authentication and social authentication in dhango rest?
The
im using indic nlp library in my django project. Im able to transilerate frok one indian language to another indian language.But not able to transilerate from english to indian languages. Is there anyone thr to help me?
Sander
Anyone here has experience with the Window function of Django ORM and can help with retrieving the cumulative sum of a field grouped by the date https://stackoverflow.com/questions/64183423/cumulative-running-sum-of-field-django-and-mysql
M
Hi, I want to calculate the speed of reading a text in millisecond The page opens, the text comes and when a user clicks, the next text comes, and the time for reading the text until the click is calculated Can omeone give me a clue
TheSingletonDev
Does it give me in milliseconds? And does the sever delay influence it
Yes it can give output in milliseconds.. You can also get output in nanoseconds as well if that much precision is required.. And yes server delay may also add a few milliseconds.
Sunder
I am new, just started learning. Now I am trying in django, but still not able to start django server. Please help me
M
Yes it can give output in milliseconds.. You can also get output in nanoseconds as well if that much precision is required.. And yes server delay may also add a few milliseconds.
So is it possible to load the app completely in django to avoid those delays and just send the time outputs to sever(like a flash app)
Sunder
Sunder
In normal cmd, python command is working, but in vsc python is giving error
Sunder
Python is not recognize
The
what error?
The
type py --version
Sunder
type py --version 3.8.6
The
type py --version 3.8.6
try installing django using pip
The
before that you can create virtualenv
Sunder
Should I try in normal cmd or in vsc terminal
The
had messaged u personally
Sadra
So is it possible to load the app completely in django to avoid those delays and just send the time outputs to sever(like a flash app)
You can use Js and Ajax. Calculate the delay and send it to the views using Ajax. All done.
...
how to add calender for date input in model form?
Doragonsureiyā
how to add calender for date input in model form?
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
Akhil
Is anyone here who can help with me with my problem
Akhil
Regarding an html code
Akhil
???
Doragonsureiyā
Is anyone here who can help with me with my problem
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z" Just ask about your problem directly! With ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Akhil
Hey guys, Can anyone help me with djangi restframework?
Akhil
Hey guys, I am making a blog/photo feed where authenticated users can upload image and description for their posts, with bookmark and LIKE features I have done everything except, counting LIKES of a post. I am using django rest framework for making APi, help me in making the class view and serializer of "Like" functionality?
Slava
Guys, who can tell me how to write the i18n language switch, which works just on click, without this freaky form with select and options? Many thanks in advance!
Bunty chhatri wala..
Sadra
Hey guys, I am making a blog/photo feed where authenticated users can upload image and description for their posts, with bookmark and LIKE features I have done everything except, counting LIKES of a post. I am using django rest framework for making APi, help me in making the class view and serializer of "Like" functionality?
Hey. Add a field name likes to the Post. It's a many2one field which takes users those who like the posts. You can create an endpoint routes post/like/ which submits your username to the like field. (If it's existing, it turns back You've already liked this post or it simply removes the user from the likes which means disliking)
The mint of Linux **
Ok...I want to. Know let's say I have a form.where user submit this form..so how can I stop user by submitting the same form again..??
The mint of Linux **
So 1 user 1 form
Akorede
Who's Familiar with multi tenant application with django
Sadra
So 1 user 1 form
Add a field in your custom user model which takes a boolean value. (default=False -> which means that the user has the chance of filling out the form) Once user submits the form, change the value to True. However, you need to make this function right in a condition. Which is something like this: if user.submitted: message.error('You have already filled out this form.') # ... else: user.submitted = True # Submitting the data # ...
AliReZa
how i set searchbox in my forigenkey field
The mint of Linux **
But . submit is a inbuilt method??
The mint of Linux **
I don't know actually
Sadra
But . submit is a inbuilt method??
You mean user.submitted ?
The mint of Linux **
how i set searchbox in my forigenkey field
I have seen tutorial on u tube... about things..
The mint of Linux **
Yess
Sadra
It's the field name in your model. If the user has submitted something, it flags to True.
The mint of Linux **
Ohh I got it..
Sadra
Good to you :)
The mint of Linux **
U r saying to take the filed and apply the bollean...and then check it wilth if else
The mint of Linux **
Good to you :)
U and some others people are very helpful in this group thanks to all @Anksak @Newusrname @lnxpy
The mint of Linux **
I also try to help...but many topics goes above my head 😅😅