Alex
I need to create directory input field which accepts the uploading of directory and maintain directory tree structure on output template
Hm, actually I'm wrong - there's experimental support for uploading directories https://stackoverflow.com/a/16774922
Wang
Did anyone use sites framework in Django .
Wang
I want to deploy multiple sites in the same process
Wang
I already read the official document and searched in Google
Wang
I don't know how to split setting file for each site
Wang
Anyone can offer post with full code. Or useful posts? Thanks
Alex
Anyone can offer post with full code. Or useful posts? Thanks
make the application a backend api, connect different front ends
Alex
Could you offer a post I am began er
then this is a too complex project, id recommend working through the official tutorial first
Alex
I already average level tutorial
but you want to be spoonfed?
Wang
I want to resolve problem in my work it is not for studying
Alex
I want to resolve problem in my work it is not for studying
you don't have a problem. you technically have nothing but a vague concept as far as you stated by now. so how about asking for help with actual issues on your way instead of looking for a helping hand to magically enable you to do that
Alex
Maybe you are right
glad to help you when you have actual issues, but until then, see ya
Wang
Thanks your answer
Anonymous
How can I reference the user in a class-based view?
Anonymous
self.request.user
Does not work for me because self is not passed as a parameter on class-based views.
Anonymous
On function-based views, I can just use request.user
Anonymous
Maybe if I create a function within my class and then pass self...
Anonymous
I'll try that
Anonymous
Right👍
Lol I couldn't make it work 🤣
Fredy
Hello group how are you, I am new to Django and I would like to understand very well how the data operates, I have knowledge in Python and what I would like is to understand how I can do a sum or mathematical operations in Django, to understand how the data interacts from the user input and operation with Django.
Fredy
I would appreciate any help in understanding this logic that django works in data operation ...
Felipe
Hey! I’m struggling to switch my Django Channels app server from daphne to Uvicorn... Does anybody know how the Heroku Procfile should look like??
maulik
Hello I am new in django So anyone can send pdf for django learning
Naveen
Hello I am new in django So anyone can send pdf for django learning
If you r new. In my view you should start with coding entrepreneur youtube channel for some rapid development and while doing that keep digging official documentation
appu
how to extend my existing model on django
Doragonsureiyā
how to extend my existing model on django
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
Андрей
how to extend my existing model on django
Just add some fields, then make migrations and apply them with mgrate Or you can extend your models using proxy https://www.benlopatin.com/using-django-proxy-models/
Mirco
how to extend my existing model on django
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html different ways
Anonymous
Hey guys what is the best freelance site for django developers ?
Sunny
Hi Need help guys... I am creating an API that sends push notifications to the Android device. Things are working fine if I do with local server but when i move same code to ec2 instance and test then getting error called error authenticating the sender account. I'm using pyfcm library.
Anvesh
There is a bug in ‘is_safe_url’ logic. I am getting open redirect issue in it.
prasobh S
Hlo. How to calculate amount between two dates. Like we get from-date and to-date we already create few records there is a amount field If we give from date and to-date then we need to get the total amount between these days
prasobh S
In django rest framework
prasobh S
Yeah but I'm a beginner so any please help
Sunny
Intersted
Алексей
Hi What can I use to save string in model?
Alex
Hi What can I use to save string in model?
https://docs.djangoproject.com/en/3.1/ref/models/instances/#saving-objects
Alex
And if there is no http-connection at all? Like in a shell command?
Alex
in which file should I write it
It depends on your needs. Create a view if you have to process an http-request, for example
Alex
Huh?
Anonymous
I want too
Алексей
It depends on your needs. Create a view if you have to process an http-request, for example
I just need to save it and read it back. And then just manipulate them
Alex
I just need to save it and read it back. And then just manipulate them
If you want to simply experiment with django's ORM you can do it in the dev shell python manage.py shell
Akhil
Can anyone help me regarding a django project
Mirco
Absolutely but piracy is not freedom so if you keep posting something like it, you will be banned immediately.
Doragonsureiyā
Can anyone help me regarding a django project
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
Anonymous
am very new to django and my bootstrap works perfectly until i add django-allauth and bootstrap dont work anymore please i need help
Ghorz
am very new to django and my bootstrap works perfectly until i add django-allauth and bootstrap dont work anymore please i need help
Allauth has no bootstrap, you have to manually add it. Go to your python library folder, locate allauth, copy the content of template Paste into your project templates, Start edit👍
Mick
I want to create student, teacher, administrative side signup,login,log out, reset password , delete profile facility with customize template form differently on my project! Please help me ...
Mick
So what do you want from us?
What would be the sample code
Akhil
Lol
Xpyk3rs
anyone using REST Framework?
Xpyk3rs
Doragonsureiyā
anyone using REST Framework?
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
Anonymous
How can I display different form fields in a class-based view depending upon whether or not the user matches certain criteria??
Anonymous
form init
I am declaring the fields = [] variable. But I want to modify this list depending upon user attributes.
Anonymous
And I can't figure out how to do it in a class-based view.
Anonymous
But I've just thought of an idea. Will test it and get back to you.
Alex
How can I display different form fields in a class-based view depending upon whether or not the user matches certain criteria??
Maybe it is place for Strategy pattern. So you define a few forms and then depending on situation pick one you need.
Alex
But I've just thought of an idea. Will test it and get back to you.
You actually can mutate a form's state. Or more precisely - its fields state. Right in a view. But I discorage you to do so.
Anonymous
Maybe it is place for Strategy pattern. So you define a few forms and then depending on situation pick one you need.
Right, thanks for that. I'll look into it. I have no idea how to actually perform the logic required to help choose which form to use in a class-based view, though:(
Alex
Right, thanks for that. I'll look into it. I have no idea how to actually perform the logic required to help choose which form to use in a class-based view, though:(
As I already said - you can choose forms dynamicly https://ccbv.co.uk/projects/Django/3.0/django.views.generic.edit/FormView/#get_form_class https://ccbv.co.uk/projects/Django/3.0/django.views.generic.edit/FormView/#get_form
Anonymous
Ok, I'm just bad at Python 😄. I'll figure it out.