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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com.


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 16, 2022 at 9:34:09 PM UTC+1 Antonis Christofides wrote:

> 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 <+30%20697%20992%204665> (mobile)
>
>
> On 16/03/2022 22.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.
>
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/83a4a51d-6913-47ce-a5da-f49f4b3d72abn%40googlegroups.com.


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 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 Laudrup
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ce7d8581-56f3-4fef-b864-139c62db0f06n%40googlegroups.com.


What methods are available to determining display type & screen dimensions for dynamic formatting of Django templates.

2022-03-17 Thread Django2021
Increasingly we are finding the need to have reactive Django templates, in 
order to present cross platform Django forms and pages to not only desktop 
users buy also tablet, and mobile phone users.

We realize Bootstrap offers breakpoints as a means to control columns, 
still we are looking for more direct ways of getting essential display 
information including width, height, device type, and OS for taking control 
of our own breakpoints where further customization is needed.

Is there a best practice, mature or fully cross platform method recognized 
by Django users for gathering essential display information as required for 
reactive Django templates?

And if not what are the most promising techniques other than Bootstrap for 
Django developers in use for building reactive templates?






-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cd9dd5f6-9b0e-430b-b458-20c969abd3d7n%40googlegroups.com.


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 mobile or not.
>
> Your requirement to know whether you are using "landscape or portrait" is 
> unusual. Normally we are only interested in knowing the width of the 
> screen. If the screen is wide enough, we show the wide version, without 
> caring about what the height of the screen is (it could be a large screen 
> in portrait, for example).
>
> In any case, I think you can solve it with CSS (even if you really want to 
> take the height of the screen into account). This problem has nothing to 
> with Python and Django, it's merely a HTML+CSS issue. If you don't want to 
> learn much CSS, using a CSS framework like Bootstrap can help.
>
> Regards,
>
> Antonis
>
> Antonis Christofides
>
>
>
>
> On 16/03/2022 22.42, Django2021 wrote:
>
> > 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 16, 2022 at 9:34:09 PM UTC+1 Antonis Christofides 
> wrote:
>
>> 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 <+30%20697%20992%204665> (mobile)
>>
>>
>> On 16/03/2022 22.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.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/83a4a51d-6913-47ce-a5da-f49f4b3d72abn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/83a4a51d-6913-47ce-a5da-f49f4b3d72abn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/886527f7-3750-4d93-b119-1b75bce8609cn%40googlegroups.com.


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 these solutions 
lacking in the areas of cross platform compatibility, and portability. 

I'll rephrase my question on another thread hoping it will draw some 
comparative discussion
in the area of what methods others are using for determining screen 
dimensions as it 
relates to formatting of of Django templates.


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 mobile or not.
>
> Your requirement to know whether you are using "landscape or portrait" is 
> unusual. Normally we are only interested in knowing the width of the 
> screen. If the screen is wide enough, we show the wide version, without 
> caring about what the height of the screen is (it could be a large screen 
> in portrait, for example).
>
> In any case, I think you can solve it with CSS (even if you really want to 
> take the height of the screen into account). This problem has nothing to 
> with Python and Django, it's merely a HTML+CSS issue. If you don't want to 
> learn much CSS, using a CSS framework like Bootstrap can help.
>
> Regards,
>
> Antonis
>
> Antonis Christofides
>
>
>
>
> On 16/03/2022 22.42, Django2021 wrote:
>
> > 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 16, 2022 at 9:34:09 PM UTC+1 Antonis Christofides 
> wrote:
>
>> 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 <+30%20697%20992%204665> (mobile)
>>
>>
>> On 16/03/2022 22.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.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/7be1145e-662e-4d57-afa6-b9d178f7fb0fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/83a4a51d-6913-47ce-a5da-f49f4b3d72abn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/83a4a51d-6913-47ce-a5da-f49f4b3d72abn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9ec977ef-09f4-4691-908c-d2a789e8759an%40googlegroups.com.