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 add our company logo to  pretect from  stealing
> against copy right. Is there any library availlable in Python to handle
> this feature.
>
> Best regards,
> ~Ram
>
> --
> 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/CA%2BOi5F0RkEWTeFP3HUfBM4-VKvuRk4TsJ6vneW_p7D-OZEhVWQ%40mail.gmail.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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/CAK5m314jtyMYLb4OvGpm-Vh6FYndi23jrLsSOtKJ0qyDkQ1aRQ%40mail.gmail.com.


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.djangoproject.com/en/3.2/howto/static-files/
>
>
> On April 18, 2021 11:25:53 AM CDT, Abid Mohamed Nadhir <
> abidmoha...@gmail.com> wrote:
>>
>> Hello, I'm trying to implement a django project with service worker, i'm 
>> wondering where to put my service worker?
>> 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, 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/21114ae4-70e3-4bc5-a0b9-cc36c183d064n%40googlegroups.com.


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

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, 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/cac7d1c4-f2df-4b94-9fa5-01260634afbbn%40googlegroups.com.


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 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/8557448a-6306-4c79-bb46-484b44360440n%40googlegroups.com.


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, 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/055d5a55-ad28-4a97-b1ec-1d16369cc2a2n%40googlegroups.com.


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 Apr 2021 at 01:45, Mustafa Burhani 
wrote:

> 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, 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/055d5a55-ad28-4a97-b1ec-1d16369cc2a2n%40googlegroups.com
> 
> .
>

-- 
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/CAJ4Kmg6nF1%2B027oUJ-L6jWbM_XGy_3vj9n%2BvkZM42P3BBbLREA%40mail.gmail.com.


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 
wrote:

> 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, 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/055d5a55-ad28-4a97-b1ec-1d16369cc2a2n%40googlegroups.com
> 
> .
>
-- 
KeLLs

-- 
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/CADYqDX1275VyPJcTfnX7%2B%3DtbmMSaFTYxph0m0t%2B-PH3bTLK9Ow%40mail.gmail.com.


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 you want. Example: import randomusers = User.objects.all() #a list of all usersrandom_user = random.choice(users) #a random user On Mon, Apr 19, 2021 at 20:45 Mustafa Burhani  wrote: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, 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/055d5a55-ad28-4a97-b1ec-1d16369cc2a2n%40googlegroups.com.-- KeLLs-- 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/CADYqDX1275VyPJcTfnX7%2B%3DtbmMSaFTYxph0m0t%2B-PH3bTLK9Ow%40mail.gmail.com. 



-- 
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/980871E3-E49B-4C96-8A6E-AECA0B93179D%40hxcore.ol.


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 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 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/8557448a-6306-4c79-bb46-484b44360440n%40googlegroups.com
> 
> .
>


-- 
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

-- 
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/CAK5m315tk98RKt_JH-kiKE2zszWMwxcjdPP6Bpp2D8gaxQANhg%40mail.gmail.com.


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 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 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/8557448a-6306-4c79-bb46-484b44360440n%40googlegroups.com
> 
> .
>

-- 
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/CAP%2B6t02kOCyCXjmKOpmi9WEQZPQwFvFQq3YT6QR%2BOwQrpF76aQ%40mail.gmail.com.