Re: How do detect if template is being viewed on mobile device?

2022-03-20 Thread Django2021
Thanks for your answers. Rephrasing question in another thread. On Thursday, March 17, 2022 at 8:11:10 AM UTC+1 Antonis Christofides wrote: > Inside of a Django function or template we need to know if to display > a landscape or portrait of a form - based on knowing if the viewer is > using a

Re: How do detect if template is being viewed on mobile device?

2022-03-20 Thread Django2021
> This problem has nothing to with Python and Django, it's merely a HTML+CSS issue. While I realize the roots of this issue are in HTML+CSS for me and likely many others it is a Django template issue. I've experimented with Bootstrap, Javascript, HTML and CSS 'solutions' yet find many of t

Adding postman generated code to django

2022-03-20 Thread Lakshya Sharma
Hello everyone, django beginner here. I'm trying to build a whatsapp chatbot using the documentation here: https://api.messengerpeople.dev/docs/authentication I've used postman and generated a token and I also notice there was a python code automatically generated. Would the next step be to cre

Tweak admin 'Action' to avoid Cannot call delete() after .distinct()

2022-03-20 Thread Mike Dewhirst
I am using tweaked querysets to populate the Admin and fully understand why this error occurs. I am using Actions to perform bulk operations on selected records so I do need the Action selector widget. How can I remove the 'Delete selected...' option? Thanks Mike TypeError at /admin/chem

Re: how to split in multiple file class models.py?

2022-03-20 Thread richard...@gmail.com
Sorry for reviving an old topic, but I have a models.py file that is >15,000 lines and would like to chop it up (PyCharm is groaning under the weight!). How would I handle the imports between the chopped-up files in a models module where the referenced foreign key model is in a different file?

Using Admin to manage users that is not in django

2022-03-20 Thread Thiago Luiz Parolin
Hi. I am trying to make a web app to manage samba AD DC. Using python bindings from samba, i can access users/groups/features of our directory. What i want is: - How can i use the django admin to manage AD? Because all the user base is inside samba, not in django. - Or i need to build my own 'adm

Re: Using Admin to manage users that is not in django

2022-03-20 Thread Aldian Fazrihady
Django admin is so coupled to Django models. Django admin is customizable. If you want some "integration" with your existing Django admin that is already linked to your existing models, you can edit the Django admin index page template and put the link to your Samba AD DC management page. Your Sam