Hi Jamaldin,

Yeah, there is nothing to do with Django, except for a part in the infinite
scrolling.

For infinite scrolling, you'll keep loading more data from the server and
adding it to the DOM when the page position reaches a certain point. Both
of those can be done with jQuery, for example, but you'll need to write
both the checker for position, loading more data and appending to the DOM
using JavaScript. The only difference is that instead of loading all the
page, you'll return only your list, either as a JSON to be "templated" by
JavaScript or returning the piece of HTML you want to add (basically, your
template won't need to `{% extend "base.html" %}`, so to say.)

Going through pages without reloading is, again, a job for JavaScript. You
basically do the same thing you did above, but instead of appending more
stuff to the DOM, you replace it.

For buttons, you can check the user agent (which you can get from
`request.meta['USER-AGENT']` on your views). But you'll need a bunch of
list of browsers and it's not really reliable (people can replace the user
agent at free will, with extensions). One solution would use the viewport
size (the area available for the browser to render) and do that directly in
JS or event CSS -- check Bootstrap "hide-xs" and the likes.

But, again, your questions are more towards JavaScript than Django.

On Mon, Apr 2, 2018 at 10:44 AM, Jamaldin Pro <jamalsema2...@gmail.com>
wrote:

>  Hello.
>
>    How can I make Infinite scrolling html? example: https://www.megacom.
> kg/hype/ru.html#instruction
>    How can I go from first url to another without reloading the website?
>    How can I know if the user is entering my website from phone or pc? If
> user is entering from phone it should show the Whatsapp button and If user
> is entering from PC it should hide it.
>
> " I can't find any place to ask this thing, and this place might be the
> wrong place. SORRY if it is like that. If you can answer even one of this
> answer it plz "
>
> Thank you ♪
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/16c617ca-c229-4056-b0de-8e5f1424dc00%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/16c617ca-c229-4056-b0de-8e5f1424dc00%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
*Julio Biason*, Sofware Engineer
*AZION*  |  Deliver. Accelerate. Protect.
Office: +55 51 3083 8101 <callto:+555130838101>  |  Mobile: +55 51
<callto:+5551996209291>*99907 0554*

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEM7gE10ECahgmb%2BsFLtFRQV6ERaaSqygk1tswssaKRzNh69Ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to