Nafiseh
Hi everyone! I'm django beginner I have a question : What should I do to save users in admin page although I use form.save() they don't save in my data! Thanks
Mo
A floatfield is represented as an instance of python float. There's something wrong with your code if you have a str
Yes, there was something wrong with the code. It was one element of a jsonfield and in retrieving the item i should put it in float() then it becomes ok. Thanks
Kenechi
Yess
form.save() should work
Anonymous
How to install django in python
S
How to install django in python
https://docs.djangoproject.com/en/dev/intro/tutorial01/
dคv¡d
How to use filter on foreign?
Alex
How to use filter on foreign?
Less than a min in google https://stackoverflow.com/questions/1981524/django-filtering-on-foreign-key-properties
Alex
Thanks, I saw this too but do you have another ref?
https://docs.djangoproject.com/en/3.2/topics/db/examples/many_to_one/
Alex
Thank you so much...
You asked how to filter on foreign key, I gave you the link on docs. What's wrong?
dคv¡d
You asked how to filter on foreign key, I gave you the link on docs. What's wrong?
Nothing wrong i just check it first maybe my answer is in your link... Then i just respect you.. thank you
dคv¡d
I have 2 model + Car - CarName - CarColor (foreign key) + Color - ColorName - EnableOrDisable In Color.ColorName has some color is enabled and disabled I want to filter CarColor which color is available in Color.ColorName!! So when i insert the Car.CarColor Field it has only color that is available!! How to do it...? Thank you
dคv¡d
You can add an extra field in the color model say is_active which will be a boolean field
Sorry i forgot this field but i didn't mean that... I mean how can i filter only enbale color when i use that modelform?
Braimah
Sorry i forgot this field but i didn't mean that... I mean how can i filter only enbale color when i use that modelform?
So this Color model Color_name Availability boolean field Views context = {} available_color = Color.objects.filter(availability=True) context['available_color'] = available_color
John
Anyone who knows how to effect minor changes in an EXISTING Django app hosted on Pythonanywhere? I'm using this command to deploy 👇 <pa_autoconfigure_django.py https://github.com/username/repo.git>
игорь/igor
Yes
Override queryset in form's init method
игорь/igor
Yes
You know what Queryset is, right?
Saikat
hello everyone, i had posted an error here, may I post the same? Because i am unable to solve the issue.
dคv¡d
You know what Queryset is, right?
I not yet learned that step but if Qeryset is the way that can do that... I'll learn more about it... Thank you for your advice...
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Hi everyone In Model, when we create a "Class", as if we build a Table. My question is that: What happens when we define a "def" or "class Meta" in a Class. Can anyone explain please?
Alex
Hi everyone In Model, when we create a "Class", as if we build a Table. My question is that: What happens when we define a "def" or "class Meta" in a Class. Can anyone explain please?
class Meta is merely data storage about the table and the model itself. Like indexes, default ordering and etc. It's hooked up by underlying logic of models. It actually could be compared with attrdict where you access dict's key by the dot notation instead of braces. Model meta-class, processed and then can be accessed as YourModel._meta https://github.com/django/django/blob/518ce7a51f994fc0585d31c4553e2072bf816f76/django/db/models/base.py#L89 https://docs.djangoproject.com/en/3.2/ref/models/meta/
игорь/igor
Thank you so much..
I might have confused something, I guess you don't actually need init. This link should https://stackoverflow.com/questions/38930901/django-simple-queryset-in-form-field should solve your problem.
Anonymous
There's someone here who wants to build a project
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Ankit
Hello Developers, i am getting an TypeError in login and the error is TypeError: manager_method() missing 1 required positional argument: 'self'
Ankit
Yes
Alex
Ankit rules prohibit writing pm. At least without permission.
Alex
Share your code via pastebin
Ankit
Ok
Anonymous
As a practice?
Yes I started one and got stuck in the middle
James
Hello i need some help about selcom API anyone who have use it before in django project. Please help me on how to get it
Arash
hello i have problem with modal(bootstrap ) when i click on button template just show me the first object
William
hello i have problem with modal(bootstrap ) when i click on button template just show me the first object
In modal Id, you need to pass the corresponding data id. Then only It works
Bart
Hello, Can anyone help me..i want playlists for projects for training
Igor
Hi 👋 You can find a music on YouTube! Write “music for study” or “music for programming”. Good luck 🍀
HamidReza Fekri
hello I want to learn how to create e-commerce with django class base i hope someone recommend me good tutorial
Bláçklêg_Víñ$møkê
Hello guys am having an issue in Django admin page Let me describe it a little... Firstly I created a "page" app and in model created a "Team Class" and added some fields there like f_name, l_name, designation, image, etc and also registered it in admin.py... Now while am going to add a team in admin page it's only showing 2 attributes i.e. f_name and designation only... What to do?
Bláçklêg_Víñ$møkê
Where did I go wrong? Plz help me out
Willian
Does anyone work with apache2 + django websocket?
Willian
Django-channels
J
Yes
Champak Lal
i m trying to register user
Champak Lal
through email and phone
Champak Lal
it shwing error
William
could you give me an example plz 🙏
In modal trigger button you need to pass the data's in data-target like data-target="#updateModal_${data.id}" and in modal class <div class="modal" id="updateModal_${data.id}"></div>
William
Share your code and error message using pastebin.com
Doragonsureiyā
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Doragonsureiyā
3️⃣ Keep the group topic! No SPAM, flood, offtopic, necroposting, crossposting, do not write only "Hello"/"Hi", don't ask for final year projects/exams nor homework solution and/or cheats. All socializing goes to @pythonofftopic
Anonymous
i m trying to register user
Please read the rules and stick to them. Use a paste to share your trace back and source code
Anonymous
I need django rest framework work support I will pay money(telugu) Contact : nareshrajsankineni@gmail.com
Doragonsureiyā
I need django rest framework work support I will pay money(telugu) Contact : nareshrajsankineni@gmail.com
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Mark
!res
Doragonsureiyā
Check out PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.
Dev
Hi y'all, what could be wrong here. I am have an API which used to work and now POST requests are being handled by Django as a GET request, I am running tests using insomnia client
Dev
ok
Dev
i just even added some logs to check the request method and it clearly comes as a GET, so not sure that is an issue
Doragonsureiyā
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Muhammadyor
Hello, How can i integrate django project payment system with Visa Card and Master card. Any docs or tutorial?
Arezoo
Hi .when i use env.dev and env.prod in docker-compose and use os.environ in settings.py I can not runserver in local .how can I resolve this problem