Re: Django multilinguial docs

2021-04-19 Thread Israr Hussain Rao
use this library and make a folder in your application django.mo and django.po django.utils.translation import ugettext use this template tag {% trans 'text need to be translate '%} On Mon, Apr 19, 2021 at 10:56 PM Archana Singh wrote: > Can anyone please guide how the django docs website h

Re: Django multilinguial docs

2021-04-19 Thread RANGA BHARATH JINKA
Hi, You can try using google translate. https://www.geeksforgeeks.org/add-google-translate-button-webpage/ All the best On Tue, Apr 20, 2021 at 1:26 AM Archana Singh wrote: > Can anyone please guide how the django docs website has implemented the > translating the content of the website to di

RE: How Choose Random User from database ?

2021-04-19 Thread mustafa burhani
Thanks ! Sent from Mail for Windows 10 From: Kelvin SajereSent: Tuesday, April 20, 2021 3:58 AMTo: django-users@googlegroups.comSubject: Re: How Choose Random User from database ? If you just want a random user, you could just use random.choice(). You can use it in shell, in a function or wherever

Re: How Choose Random User from database ?

2021-04-19 Thread Kelvin Sajere
If you just want a random user, you could just use random.choice(). You can use it in shell, in a function or wherever you want. Example: import random users = User.objects.all() #a list of all users random_user = random.choice(users) #a random user On Mon, Apr 19, 2021 at 20:45 Mustafa Burhani

Re: How Choose Random User from database ?

2021-04-19 Thread Joel Tanko
if you already have a table with some rows in it, writing a random function would work just fine. # as an example from random import randint def select_random_user(): all_users = User.objects.all() selected = list(all_users)[randint(0, all_users.count())] return selected On Tue, 20 Ap

How Choose Random User from database ?

2021-04-19 Thread Mustafa Burhani
I want to Choose random user from databse is possible with django shell or need to create model ? for random function ? Thanks ! -- 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,

Django multilinguial docs

2021-04-19 Thread Archana Singh
Can anyone please guide how the django docs website has implemented the translating the content of the website to different languages. -- 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

Protect Django media files per user basis and also under NGINX

2021-04-19 Thread Tal Bar-Or
Hello, i have a project that create qrcode per user one to one relation, i discover that this media qr iame can be access if url is known . Can somone please help me with best practice to Protect Django media files per user basis and also under NGINX for later production Please advice Thank

Re: Django Offline

2021-04-19 Thread Abid Mohamed Nadhir
I've found the solution i created the service worker manually and created a URL for it. then I've called it in the main.html template Thanks For replying Le dimanche 18 avril 2021 à 20:22:22 UTC+1, Ryan Nowakowski a écrit : > Typically JavaScript is treated as a static file: > > https://docs.dja

Re: How to embed logo on uploaded images

2021-04-19 Thread RANGA BHARATH JINKA
Hi, Try this. This may be useful for you. https://www.blog.pythonlibrary.org/2017/10/17/how-to-watermark-your-photos-with-python/ All the best On Mon, Apr 19, 2021 at 12:09 PM Ram wrote: > Hi, > > Registered users in web application upload images to sell market place > items and we need to ad