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

2022-03-21 Thread Kayode Oladipo
Hello, I had this exact problem, and I solved it using this package. https://pypi.org/project/django-user-agents/ Cheers. On Sun, Mar 20, 2022 at 7:01 PM Django2021 wrote: > Thanks for your answers. > Rephrasing question in another thread. > > > On Thursday, March 17, 2022 at 8:11:10 AM UTC+1

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

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

2022-03-17 Thread Antonis Christofides
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 mobile or not. Your requirement to know whether you are using "landscape or portrait" is unusual. Normally we are only interested in knowing the

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

2022-03-16 Thread Django2021
If only https://www.w3.org/TR/css3-mediaqueries/ had some practical examples in Python or Django, it could be useful. On Wednesday, March 16, 2022 at 9:34:19 PM UTC+1 Kasper Laudrup wrote: > On 16/03/2022 21.28, Django2021 wrote: > > > > With Django how is it possible to detect > > * if

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

2022-03-16 Thread Django2021
> There are many ways to approach this problem, so it would be best to explain what you are trying to achieve. 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 mobile or not. On Wednesday, March

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

2022-03-16 Thread Kasper Laudrup
On 16/03/2022 21.28, Django2021 wrote: With Django how is it possible to detect * if template is being viewed on mobile device? and/or * if template is being viewed in portrait or landscape mode? Any suggestions appreciated. https://www.w3.org/TR/css3-mediaqueries/ Kind regards, Kasper

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

2022-03-16 Thread Antonis Christofides
Hello, there are many ways to approach this problem, so it would be best to explain what you are trying to achieve. Regards, Antonis Antonis Christofides +30-6979924665 (mobile) On 16/03/2022 22.28, Django2021 wrote: With Django how is it possible to detect * if template is being viewed

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

2022-03-16 Thread Django2021
With Django how is it possible to detect * if template is being viewed on mobile device? and/or * if template is being viewed in portrait or landscape mode? Any suggestions appreciated. -- You received this message because you are subscribed to the Google Groups "Django users" group. To