Mirco
Aneesh
Now iam trying to use django oauth toolkit and python social auth
Mirco
Isotope751
Which docker image is highly used with django deployment ?
Mirco
Ghorz
Anonymous
How can I set an initial value for my django ModelForm using data from the models.
Thanks
Aneesh
Thanks bro .
Anonymous
Thanks bro .
But the question is asked by @pyflare 😅😅 why you thank
Akash
Has anyone used Celery with Heroku under free tier?
I have 1 Heroku app as "Tracker" , can I use celery on same by writing celery worker and beat in its proc file ?
Also, do I need to launch these via terminal or they are activated automatically ?
Anonymous
Hey, im trying to modify the DatePickerInput format of a ModelForm (into dd/mm/yyyy). The problem I get is that I can manage to display the correct format in the datepicker widget, but it cannot pass the data to the model if the day is greater than 12. How can I solve it?
Anonymous
widgets = {
'date': DatePickerInput(attrs={'class': 'form-control', },options={"format": "DD/MM/YYYY"}),
Anonymous
that is what I have in models
JATISH
How to resolve this error in django
mukul
pip install pycryptodome
Ice
question:
How can I show more information in another columns in admin -> app -> model?
[ ] title | title | title |
[ ] content | info | counter|
'''class DevhubURL(models.Model):
url = models.CharField(max_length=220,unique=True)
postedby = models.CharField(max_length=500)
counter = models.Count()
def str(self):
return str(self.url)'''
goku
I am creating a view to delete a meal from my database.Do I need to pass it in a serializer or just write normally?
Sergio
Hi, could anyone please help me with this:
Data.objects.values('meterid').annotate(Sum('energy')).filter(fecha__year=2020, fecha__day=1).order_by('meterid')
I'm trying to do that on the views.py but a I got the next error:
keyError: "Got KeyError when attemting to get a value for field 'energy' on serializer 'dataSerializer'
Anonymous
Ariel
I've written a custom QuerySet with unique filters, based on models.QuerySet and defined the model with objects = ****QuerySet.as_manager(). Now I'm writing the API, using GrapheQL. What will be the best why to create a custom resolver, based on the custom QuerySet?
Mirco
Tobi
Hello,
I am building a very simple website in which the main page allows users to import their contacts via csv or excel files to a postgres database.
I have a page that displays whether or not the import of contacts is finished, I need my frontend to update automatically as soon as the task is finished in the background, basically when the data is fully imported into the database.
I'm thinking of looking for a way to refresh the page every 5 second or something like that, but I don't think this is a good idea.
I am not quite sure how to approach this. I still have some learning to do, but I need some guidance on what approach to take. I am thinking I will need to use JQuery/Ajax? So write my HTML template and then link it to a Javascript script that does the refresh?
I think I can figure out how to refresh the page, but how do I have the model queried, view called, and new data fed to the HTML template each time the page auto-refreshes?
I am also not sure if web sockets are what I need. If ajax is not the answer here, an example of scenario where ajax is useful would be really helpful, I always hear about it but I don't know when it can be useful.
Any help or link to resources is immensely appreciated!!
Thank you.
Molaiea
Anybody who can help wid django forms pls
Mirco
Doragonsureiyā
Anybody who can help wid django forms pls
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
Enes
👋 what do you think guys. Is django rest freamwork useful?
Place
Hello everyone, i searched on google and didn't find the answer, so did everyone know how to make the textarea on the admin panel smaller or bigger ? (by defining number of columns x rows for example?) thank you everyone for your help!
Mirco
Bahar
hey guys I have a problem.
sometimes with no reason my django project doesn't work well!!
the speed of loading is too low and some functionalities become broken.
do you know why?
has my project problem? or my laptop?
հօรรεiռ
հօรรεiռ
Place
did you search about custom templates ?
Yes but sorry i found a solution proposed by a friend of mine, he proposed to change in the admin.py the default form in django by adding in my class in admin the formfield_overrides
հօรรεiռ
Daniya
Any toturial link that teach how we can build and customize own admin panel how we can change the UI
Mirco
Doragonsureiyā
So, why don't you do it yourself first?
When you have an issue with the Python code you wrote (read rule 5️⃣ to show your code), come back here and people will help you.
😉
Jimmies San
@ANGELADIL please speak english
Anonymous
Have a off Topic group?
Anonymous
I want ask some question but not about Django
Charly
Abdurrahman
Please i need help installing my virtual environment
Charly
Arezoo
Hi.what is diffrence between jwt and tokenauthentication in drf?
Bunty chhatri wala..
If there are 2 forms on same page..and both being rendered from same View function..then how do i grab details from specific form..
If doing
if request.method == POST
It capture both forms
Vasu
Vasu
Simply you pass form names to context variable access using same name
Vasu
Then check is valid
Vasu
Boom...boom...it will work
Anonymous
Hi everybody.
I've used https://pypi.org/project/django-resized/ to resize uploaded images. And I also want to limit the size of the images, when uploading, lets say maximum is 2mb. Is there any solution?
Anonymous
Aneesh
When I use Google login with django rest framework social oauth . It shows your credentials aren't allowed . Any one know about this.
My credentials are correct
Astrit
Hello guys hope youre doing well i had some problems regarding filtering multiple json data if someone had this problem before please check this question,because im struggled for a week now.
Astrit
https://stackoverflow.com/questions/65593566/django-how-to-filter-multiple-jsonfield-data
Bahar
hi. I have problem with my js files in django project.
when I run my project, sometimes my js files run and sometimes don't!
can you help me?
Bahar
not all of them.
some of them don't work!
isa
What is a reasonable value for CONN_MAX_AGE ?
isa
what is this ?
Mirco
isa
Mirco
Doragonsureiyā
thnx
You're welcome! 😊
mukul
mukul
âshîsh
Hi all,
I want to create a multiple checkbox form field using models.py & when user check on multiple values, all must be stored in database.
Pls help.
King Phyte 🐍
King Phyte 🐍
Anonymous
Anonymous
If you raise your question in stackoverflow share the link I will answer
Anonymous
âshîsh
Parsa
Hi I have a problem with django-ckeditor. I explained my problems in this link.
How can i solve these problems?
https://stackoverflow.com/questions/65596067/django-ckeditor-wont-show-the-errors
Fred
Can someone please show how to integrate mobile money payment service in Django
Try to use a service called flutterwave
_NH
Sorry for the immediate bump: Got a message that I was muted for 5 minutes, as a new member, so re-posting (not sure how muting works with handling early messages):
—————————————————————————
Hi✋
I am coming from php, so I may be asking something very basic. So please excuse my ignorance - I think I am not searching for the right terms, hence asking here:
In php, this was a form with an input field and a result area below with an API linkage:
- I had a form with submit button, action marked to "" (same page) and method as Post.
- I had linked the submit button to show a <Loading> placeholder in the results div (via inline javascript)
- On submit, the php would reload the input value from POST parameters
- The php script subsequently fired the API which got the results. This API takes a long time, and hence I had kept the placeholder, while the user reads the other material on the page.
- Once the API results came back, it would repopulate the results div with actual values.
With my understanding of the Django flow, the Python views.py calls the HTML templates with all values in one go, so I am unable to think of how to do the two step process of adding the placeholder (Loading) and then later update with the actual values? Any tips, search parameters, tutorials will be much much appreciated.
Mirco
Sorry for the immediate bump: Got a message that I was muted for 5 minutes, as a new member, so re-posting (not sure how muting works with handling early messages):
—————————————————————————
Hi✋
I am coming from php, so I may be asking something very basic. So please excuse my ignorance - I think I am not searching for the right terms, hence asking here:
In php, this was a form with an input field and a result area below with an API linkage:
- I had a form with submit button, action marked to "" (same page) and method as Post.
- I had linked the submit button to show a <Loading> placeholder in the results div (via inline javascript)
- On submit, the php would reload the input value from POST parameters
- The php script subsequently fired the API which got the results. This API takes a long time, and hence I had kept the placeholder, while the user reads the other material on the page.
- Once the API results came back, it would repopulate the results div with actual values.
With my understanding of the Django flow, the Python views.py calls the HTML templates with all values in one go, so I am unable to think of how to do the two step process of adding the placeholder (Loading) and then later update with the actual values? Any tips, search parameters, tutorials will be much much appreciated.
It's the same, the view handle your POST request, you have to make the javascript call to the url that will render that view