Re: I need orientation on what to do and how to do it (procedure)

2021-12-16 Thread Vishesh Mangla
https://stackoverflow.com/a/2218134/4213362

On Thu, Dec 16, 2021 at 9:56 PM addani Raghavender <
addaniraghaven...@gmail.com> wrote:

> No not that much
>
> On Thu, 16 Dec, 2021, 7:43 am Amor Zamora,  wrote:
>
>>
>> Can you help me?
>> I need to obtain the country of where the users access from the IP and
>> insert that information into the sqlite3 database.
>>
>> Little description.
>> I have an application that I have to do the statistics and insert into
>> the sqlite3 database, the IP information, the country from which it is
>> accessed, who generates the information and how many times has clicked on
>> the application.
>> Question 1 is that I cannot find any suitable module in DJango that
>> allows me to combine the information described above.
>> I am using. IP_address, os, daemonize and socket and I don't quite
>> realize how to get the country from where it is accessed.
>> 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/CAKMTbHVU%2BkJQw%2B8wnA7U__x7zCnrd%3DyvA%2BwmwFta2cPDwS6%2BMg%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/CANkif0SpKD87nqicdfpgG97jstgnefphDqLUA9L_vyBwcgb5aA%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/CACaE8x5VZG8tbVUD-qAoHQNfuBDwrxSvH8QPxhYOpGtuQbOuAw%40mail.gmail.com.


Re: Django works with PDF

2022-01-20 Thread Vishesh Mangla
PyPDF2

On Thu, 20 Jan 2022, 19:46 Amor Zamora,  wrote:

> I have 2 problems working with pdf in django.
> 1. I need a tool, function or library that allows me to open a pdf and
> read the metadata, to get its 'creator and producer' there, but I have to
> do this, not with python, because to show it on the frontend.
> 2. How can I get the country from an Ip address (I use the ipaddress
> module in my project). But I don't know how I can get the country,
> because the IPs are assigned by ranges not by regions and the ipaddress
> module that I know of does not bring anything incorporated to be able to
> obtain the country.
> At this point, I can't use GeoIP, in any of its variants.
> please help
>
> --
> Amor Zamora
> Behind the distance,
> your mouth and mine hide,
> complices of a kiss, caresses, fantasies,
> distance as close as the sky and the sea,
> my piece is in your bed, in mine, is your love.
> Behind the distance hide love, memories,
> encounters, experiences, circumstances, pain and good times,
> it is after her, the distant ones,
> that we leave feelings,
> but if we really miss,
> distance,
> it is only your time.
>
> --
> 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/CAKMTbHWtN%3D5Pzm2yj2kR3erDLkiArAhJZVmxE0X0hvbjFu6eTA%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/CACaE8x4kmUsBCD6JZ8rHo8wS0gsqx1CTX5%2BVV%3DGH%3DR3LW-e3AQ%40mail.gmail.com.


Re: Download html pages as pdf using headless Chrome

2022-01-29 Thread Vishesh Mangla
Use requests for that .

On Sat, 29 Jan 2022, 21:28 Aadil Rashid,  wrote:

> Hello Django Family, I came across the problem of downloading HTML pages
> as pdf using headless chrome, Can anybody here who could please let me know
> how can I do it or any good resource to follow, it would be appreciable. I
> am using Django python,
> Thank you very much.
>
> --
> 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/CAAYXZx-Ar-PeKeOLA27TgTwQoct3e9Y1E%2BAPtWyPQMq78EaTNg%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/CACaE8x4R2oyqJGjDPM7t_%2Be4mF52bO%3DZB82AiQd11iYDzDTDQg%40mail.gmail.com.


Re: Download html pages as pdf using headless Chrome

2022-01-29 Thread Vishesh Mangla
Get the link and cookies from the webdriver and put that in requests.get
using request library to download the html on the page.

On Sat, 29 Jan 2022, 21:29 Vishesh Mangla, 
wrote:

> Use requests for that .
>
> On Sat, 29 Jan 2022, 21:28 Aadil Rashid,  wrote:
>
>> Hello Django Family, I came across the problem of downloading HTML pages
>> as pdf using headless chrome, Can anybody here who could please let me know
>> how can I do it or any good resource to follow, it would be appreciable. I
>> am using Django python,
>> Thank you very much.
>>
>> --
>> 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/CAAYXZx-Ar-PeKeOLA27TgTwQoct3e9Y1E%2BAPtWyPQMq78EaTNg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAAYXZx-Ar-PeKeOLA27TgTwQoct3e9Y1E%2BAPtWyPQMq78EaTNg%40mail.gmail.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/CACaE8x5C2dihUH4iapMvu8aqMZFWFfpF6VRPHA%2BEkF5PhDQDJA%40mail.gmail.com.


Re: Download html pages as pdf using headless Chrome

2022-01-29 Thread Vishesh Mangla
If it's a pdf then u can download the bytes.
So search Google/stackoverflow for "requests download bytes".

On Sat, 29 Jan 2022, 21:44 Aadil Rashid,  wrote:

>
> from request.get("https://---";) i am getting instance
> of requests.models.Response, how can i convert it to pdf
>
> On Sat, Jan 29, 2022 at 9:31 PM Vishesh Mangla 
> wrote:
>
>> Get the link and cookies from the webdriver and put that in requests.get
>> using request library to download the html on the page.
>>
>> On Sat, 29 Jan 2022, 21:29 Vishesh Mangla, 
>> wrote:
>>
>>> Use requests for that .
>>>
>>> On Sat, 29 Jan 2022, 21:28 Aadil Rashid, 
>>> wrote:
>>>
>>>> Hello Django Family, I came across the problem of downloading HTML
>>>> pages as pdf using headless chrome, Can anybody here who could please let
>>>> me know how can I do it or any good resource to follow, it would be
>>>> appreciable. I am using Django python,
>>>> Thank you very much.
>>>>
>>>> --
>>>> 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/CAAYXZx-Ar-PeKeOLA27TgTwQoct3e9Y1E%2BAPtWyPQMq78EaTNg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAAYXZx-Ar-PeKeOLA27TgTwQoct3e9Y1E%2BAPtWyPQMq78EaTNg%40mail.gmail.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/CACaE8x5C2dihUH4iapMvu8aqMZFWFfpF6VRPHA%2BEkF5PhDQDJA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACaE8x5C2dihUH4iapMvu8aqMZFWFfpF6VRPHA%2BEkF5PhDQDJA%40mail.gmail.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/CAAYXZx-1w-U-LrNM2fG3WzMohXY-PayNCdw53rR2osKM7BNyhw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAAYXZx-1w-U-LrNM2fG3WzMohXY-PayNCdw53rR2osKM7BNyhw%40mail.gmail.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/CACaE8x7u4-7eMbnJyy0etYywcaoWYCWo%3Dwu5h9QVLkW28VfGgg%40mail.gmail.com.


Re: SMTP Authentification error

2022-04-27 Thread Vishesh Mangla
Use Google api.

On Thu, 28 Apr 2022, 10:29 'Delvin Alexander' via Django users, <
django-users@googlegroups.com> wrote:

> okay i did both but now i am getting this error. Any clue on why?
>
> *SMTPSenderRefused at /password-reset/*
>
>
> *(530, b'5.7.0 Authentication Required. Learn more at\n5.7.0
> https://support.google.com/mail/?p=WantAuthError
> 
> w137-20020a62828f00b0050d2f9c3409sm14545822pfd.199 - gsmtp',
> 'webmaster@localhost')*
> On Wednesday, April 27, 2022 at 12:27:02 AM UTC-7 dashlaksh...@gmail.com
> wrote:
>
>> Check whether you have turned on less secure apps or not.
>>
>> On Wed, Apr 27, 2022, 11:07 'Delvin Alexander' via Django users <
>> django...@googlegroups.com> wrote:
>>
>>> Hello everyone,
>>>
>>> May you please assist in informing me on what i need to do to resolve
>>> this issue.
>>>
>>> - *SMTPAuthenticationError at /password-reset/*
>>> *- (535, b'5.7.8 Username and Password not accepted. Learn more
>>> at\n5.7.8 https://support.google.com/mail/?p=BadCredentials
>>> 
>>> j64-20020a62c54300b0050d260c0ea8sm13366402pfg.110 - gsmtp')*
>>>
>>>
>>> I included the 16 character code to my environment variable and called
>>> it in my settings.pymfile,  but still the error occurs. Also here is my
>>> settings.py file:
>>>
>>> - *EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'*
>>> *EMAIL_HOST = 'smtp.gmail.com '*
>>> *EMAIL_PORT = 587*
>>> *EMAIL_USE_TLS = True*
>>> *EMAIL_HOST_USER = os.environ.get('DB_USER')*
>>> *EMAIL_HOST_PASSWORD = os.environ.get('DB_PASSWORD')*
>>>
>>> --
>>>
>> 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/c18935a8-43bf-4a15-a5ba-95209009498dn%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/a6f92133-32db-4f4a-ae46-bb1f7644b431n%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/CACaE8x6hsZFb8%3DzReCcFyx0eKgjvfTgqLEUu_USBz5D1ppsxKQ%40mail.gmail.com.


Re: SMTP Authentification error

2022-04-27 Thread Vishesh Mangla
On Thu, 28 Apr 2022, 11:02 Vishesh Mangla, 
wrote:

> Use Google api.
>
> On Thu, 28 Apr 2022, 10:29 'Delvin Alexander' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> okay i did both but now i am getting this error. Any clue on why?
>>
>> *SMTPSenderRefused at /password-reset/*
>>
>>
>> *(530, b'5.7.0 Authentication Required. Learn more at\n5.7.0
>> https://support.google.com/mail/?p=WantAuthError
>> <https://support.google.com/mail/?p=WantAuthError>
>> w137-20020a62828f00b0050d2f9c3409sm14545822pfd.199 - gsmtp',
>> 'webmaster@localhost')*
>> On Wednesday, April 27, 2022 at 12:27:02 AM UTC-7 dashlaksh...@gmail.com
>> wrote:
>>
>>> Check whether you have turned on less secure apps or not.
>>>
>>> On Wed, Apr 27, 2022, 11:07 'Delvin Alexander' via Django users <
>>> django...@googlegroups.com> wrote:
>>>
>>>> Hello everyone,
>>>>
>>>> May you please assist in informing me on what i need to do to resolve
>>>> this issue.
>>>>
>>>> - *SMTPAuthenticationError at /password-reset/*
>>>> *- (535, b'5.7.8 Username and Password not accepted. Learn more
>>>> at\n5.7.8 https://support.google.com/mail/?p=BadCredentials
>>>> <https://support.google.com/mail/?p=BadCredentials>
>>>> j64-20020a62c54300b0050d260c0ea8sm13366402pfg.110 - gsmtp')*
>>>>
>>>>
>>>> I included the 16 character code to my environment variable and called
>>>> it in my settings.pymfile,  but still the error occurs. Also here is my
>>>> settings.py file:
>>>>
>>>> - *EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'*
>>>> *EMAIL_HOST = 'smtp.gmail.com <http://smtp.gmail.com>'*
>>>> *EMAIL_PORT = 587*
>>>> *EMAIL_USE_TLS = True*
>>>> *EMAIL_HOST_USER = os.environ.get('DB_USER')*
>>>> *EMAIL_HOST_PASSWORD = os.environ.get('DB_PASSWORD')*
>>>>
>>>> --
>>>>
>>> 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/c18935a8-43bf-4a15-a5ba-95209009498dn%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/c18935a8-43bf-4a15-a5ba-95209009498dn%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/a6f92133-32db-4f4a-ae46-bb1f7644b431n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/a6f92133-32db-4f4a-ae46-bb1f7644b431n%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/CACaE8x5%3DhYst21QVxiMuTX%2Bi2zGnURGgkzjQ0dafP_MpTRT1MA%40mail.gmail.com.


Re: SMTP Authentification error

2022-04-27 Thread Vishesh Mangla
I meant Gmail api.I was also stuck with Gmail.Also may 31 onwards Gmail
will block all third party apps which simply login with email and password.

On Thu, 28 Apr 2022, 11:02 Vishesh Mangla, 
wrote:

>
> On Thu, 28 Apr 2022, 11:02 Vishesh Mangla, 
> wrote:
>
>> Use Google api.
>>
>> On Thu, 28 Apr 2022, 10:29 'Delvin Alexander' via Django users, <
>> django-users@googlegroups.com> wrote:
>>
>>> okay i did both but now i am getting this error. Any clue on why?
>>>
>>> *SMTPSenderRefused at /password-reset/*
>>>
>>>
>>> *(530, b'5.7.0 Authentication Required. Learn more at\n5.7.0
>>> https://support.google.com/mail/?p=WantAuthError
>>> <https://support.google.com/mail/?p=WantAuthError>
>>> w137-20020a62828f00b0050d2f9c3409sm14545822pfd.199 - gsmtp',
>>> 'webmaster@localhost')*
>>> On Wednesday, April 27, 2022 at 12:27:02 AM UTC-7 dashlaksh...@gmail.com
>>> wrote:
>>>
>>>> Check whether you have turned on less secure apps or not.
>>>>
>>>> On Wed, Apr 27, 2022, 11:07 'Delvin Alexander' via Django users <
>>>> django...@googlegroups.com> wrote:
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> May you please assist in informing me on what i need to do to resolve
>>>>> this issue.
>>>>>
>>>>> - *SMTPAuthenticationError at /password-reset/*
>>>>> *- (535, b'5.7.8 Username and Password not accepted. Learn more
>>>>> at\n5.7.8 https://support.google.com/mail/?p=BadCredentials
>>>>> <https://support.google.com/mail/?p=BadCredentials>
>>>>> j64-20020a62c54300b0050d260c0ea8sm13366402pfg.110 - gsmtp')*
>>>>>
>>>>>
>>>>> I included the 16 character code to my environment variable and called
>>>>> it in my settings.pymfile,  but still the error occurs. Also here is my
>>>>> settings.py file:
>>>>>
>>>>> - *EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'*
>>>>> *EMAIL_HOST = 'smtp.gmail.com <http://smtp.gmail.com>'*
>>>>> *EMAIL_PORT = 587*
>>>>> *EMAIL_USE_TLS = True*
>>>>> *EMAIL_HOST_USER = os.environ.get('DB_USER')*
>>>>> *EMAIL_HOST_PASSWORD = os.environ.get('DB_PASSWORD')*
>>>>>
>>>>> --
>>>>>
>>>> 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/c18935a8-43bf-4a15-a5ba-95209009498dn%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/c18935a8-43bf-4a15-a5ba-95209009498dn%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/a6f92133-32db-4f4a-ae46-bb1f7644b431n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/a6f92133-32db-4f4a-ae46-bb1f7644b431n%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/CACaE8x6OC7Uquk%2BYMoAWvwcUTRAgQnHPG513Ao%3DgzE4V6RPnfw%40mail.gmail.com.


Re: Class based views with forms

2022-04-28 Thread Vishesh Mangla
Iommi forms

On Thu, 28 Apr 2022, 23:00 Ryan Nowakowski,  wrote:

> You're right, it's not very clear how to have a single class-based view
> handle both displaying details and submitting a form.  This is a
> fantastic site that shows how each class based view is set up
> inheritance-wise: https://ccbv.co.uk/
>
> Take a look the ancestors for DetailView:
>
> https://ccbv.co.uk/projects/Django/4.0/django.views.generic.detail/DetailView/
>
> ... and the ancestors for FormView:
> https://ccbv.co.uk/projects/Django/4.0/django.views.generic.edit/FormView/
>
>
> Maybe you can just add the FormMixin as an ancestor to your DetailView.
>
>
> As another option, maybe you can create a separate FormView that you can
> POST to from your DetailView.
>
>
> - Ryan N
>
> On 4/26/22 5:25 AM, alex smolyakov wrote:
> > Can anyone explain me how to make send email form on page.
> >
> > So my forms.py
> >
> > class ContactForm(forms.Form):
> > name = forms.CharField(required=True)
> > last_name = forms.CharField()
> > adults = forms.IntegerField() children = forms.IntegerField()
> > email = forms.EmailField(required=True)
> > message = forms.CharField(widget=forms.Textarea)
> >
> > views.py
> >
> > class TourDetailView(DetailView):
> > model = models.Tour
> > template_name = 'tours/tour-detail.html'
> > form_class = forms.ContactForm
> > success_url = 'tours.html'
> >
> > As far as i understand i need to get data from request , but i dont
> > know how to do it. There are a lot of information in function based
> > views, but i didnt get how to do it in class based views.
> >
> > And it would be nice of you to explain where should i put send_mail
> > function. Any help will be 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/235da153-a9d7-2582-ace4-3dbf147d17f8%40fattuba.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/CACaE8x55P%2BBLgpyoSfJtwmB%3DKp9YpQ-ndYyYTMb6BM8BboTv0Q%40mail.gmail.com.


Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
I think it's good, function based views offer you more flexibility. If you
are not liking your code it's because your function should be split up into
smaller functions, or use a class without it being a view.

On Fri, 27 May 2022, 01:07 'dtdave' via Django users, <
django-users@googlegroups.com> wrote:

> I have this function based view which works perfectly but I would like to
> convert to a class based view but am stuck on how to do this:
> This is my fbv:
>
> def loginView(request):
> if request.method == 'POST':
> form = LoginForm(request.POST)
> if form.is_valid():
> cd = form.cleaned_data
> user = authenticate(request,
>email=cd['email'],
>password=cd['password'])
>
> if user is not None:
> login(request, user)
> if user.is_authenticated and user.is_client:
> return redirect('clients:detail') # Go to client
> dashboard
> elif user.is_authenticated and user.is_account_manager:
> return redirect('accountmanagers:detail') #Go to
> account manager dashboard
> else:
>return HttpResponse('Invalid login')
> else:
> # Invalid email or password. Handle as you wish
> form = LoginForm()
>
> return render(request, 'registration/login.html', {'form': form})
>
> I would appreciate any help.
>
> --
> 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/ea6c54f2-ecc0-407d-a296-e168d509a299n%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/CACaE8x5iCrx496xhUCw5wZ3hgXe2cmFRy2k2iPNub%3DxJdC4V5g%40mail.gmail.com.


Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
Sorry, on looking again I realized that CBV already does this.
https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/
https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views

Btw,

On Fri, May 27, 2022 at 2:26 AM Vishesh Mangla 
wrote:

> I think it's good, function based views offer you more flexibility. If you
> are not liking your code it's because your function should be split up into
> smaller functions, or use a class without it being a view.
>
> On Fri, 27 May 2022, 01:07 'dtdave' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> I have this function based view which works perfectly but I would like to
>> convert to a class based view but am stuck on how to do this:
>> This is my fbv:
>>
>> def loginView(request):
>> if request.method == 'POST':
>> form = LoginForm(request.POST)
>> if form.is_valid():
>> cd = form.cleaned_data
>> user = authenticate(request,
>>email=cd['email'],
>>password=cd['password'])
>>
>> if user is not None:
>> login(request, user)
>> if user.is_authenticated and user.is_client:
>> return redirect('clients:detail') # Go to client
>> dashboard
>> elif user.is_authenticated and user.is_account_manager:
>> return redirect('accountmanagers:detail') #Go to
>> account manager dashboard
>> else:
>>return HttpResponse('Invalid login')
>> else:
>> # Invalid email or password. Handle as you wish
>> form = LoginForm()
>>
>> return render(request, 'registration/login.html', {'form': form})
>>
>> I would appreciate any help.
>>
>> --
>> 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/ea6c54f2-ecc0-407d-a296-e168d509a299n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/ea6c54f2-ecc0-407d-a296-e168d509a299n%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/CACaE8x4RTf0k3DKcKfxhiFcXckGFKp8tifQGVF_FpxXBQcAkdg%40mail.gmail.com.


Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
 Sorry, on looking again I realized that CBV already does this.
https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/
https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views

https://stackoverflow.com/questions/56761409/how-to-make-a-login-view-for-django-custom-user

On Fri, May 27, 2022 at 1:07 AM 'dtdave' via Django users <
django-users@googlegroups.com> wrote:

> I have this function based view which works perfectly but I would like to
> convert to a class based view but am stuck on how to do this:
> This is my fbv:
>
> def loginView(request):
> if request.method == 'POST':
> form = LoginForm(request.POST)
> if form.is_valid():
> cd = form.cleaned_data
> user = authenticate(request,
>email=cd['email'],
>password=cd['password'])
>
> if user is not None:
> login(request, user)
> if user.is_authenticated and user.is_client:
> return redirect('clients:detail') # Go to client
> dashboard
> elif user.is_authenticated and user.is_account_manager:
> return redirect('accountmanagers:detail') #Go to
> account manager dashboard
> else:
>return HttpResponse('Invalid login')
> else:
> # Invalid email or password. Handle as you wish
> form = LoginForm()
>
> return render(request, 'registration/login.html', {'form': form})
>
> I would appreciate any help.
>
> --
> 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/ea6c54f2-ecc0-407d-a296-e168d509a299n%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/CACaE8x7xCs634EU-QO%3D%2BhYNsU8z-3s3xyNExufAdkQpscJUgog%40mail.gmail.com.


Re: LogIn Class Based View

2022-05-26 Thread Vishesh Mangla
https://ccbv.co.uk/projects/Django/4.0/django.contrib.auth.views/LoginView/
https://openclassrooms.com/en/courses/7107341-intermediate-django/7263527-create-a-login-page-with-class-based-views

https://stackoverflow.com/questions/56761409/how-to-make-a-login-view-for-django-custom-user

On Fri, May 27, 2022 at 1:07 AM 'dtdave' via Django users <
django-users@googlegroups.com> wrote:

> I have this function based view which works perfectly but I would like to
> convert to a class based view but am stuck on how to do this:
> This is my fbv:
>
> def loginView(request):
> if request.method == 'POST':
> form = LoginForm(request.POST)
> if form.is_valid():
> cd = form.cleaned_data
> user = authenticate(request,
>email=cd['email'],
>password=cd['password'])
>
> if user is not None:
> login(request, user)
> if user.is_authenticated and user.is_client:
> return redirect('clients:detail') # Go to client
> dashboard
> elif user.is_authenticated and user.is_account_manager:
> return redirect('accountmanagers:detail') #Go to
> account manager dashboard
> else:
>return HttpResponse('Invalid login')
> else:
> # Invalid email or password. Handle as you wish
> form = LoginForm()
>
> return render(request, 'registration/login.html', {'form': form})
>
> I would appreciate any help.
>
> --
> 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/ea6c54f2-ecc0-407d-a296-e168d509a299n%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/CACaE8x6gGXLJ_6kdBAbmjc0xYc%2BnQTgMpgNFn-YqkgmUFGz2PA%40mail.gmail.com.


Re: Invite to join WhatsApp group

2022-08-05 Thread Vishesh Mangla
This group is not for promoting your paid service. It's where volunteers
help each other.So stop advertising your classes here.

On Sat, 6 Aug, 2022, 02:38 Dylan Reinhold,  wrote:

> In the past 2 weeks, I have seen this same message sent over 4 times.
>
> We get it, you have a whatsapp group.
>
> Dylan
>
> On Fri, Aug 5, 2022, 10:32 Satyajit Barik 
> wrote:
>
>> Hey Dylan,
>>
>> We do not spam anything, We try our best to help others.
>>
>>
>> Thanks.
>>
>> On Fri, Aug 5, 2022 at 9:32 PM Dylan Reinhold 
>> wrote:
>>
>>> Please stop spaming this list.
>>>
>>> Thanks.
>>>
>>> On Fri, Aug 5, 2022, 08:47 Satyajit Barik 
>>> wrote:
>>>
 Hey,

 Join in Whatsapp python group using the below link to get solve your
 Python and Django related problems.

 https://chat.whatsapp.com/Bq2jcxLJVG50v9Wbkvz6Vy

 [Membership benefits] Here are some great perks you get for becoming a
 member:
 * Ask your python & django related problems: get quick possible answer.
 * Friendly environment: you can learn python & django from core.
 * Daily Python Assignment exercise.


 --
 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/CANd-%2BoCUxfPQCK2eUPM2_ioKZUoN4UV6ziLThxJYwHHARf%3D3pw%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/CAHtg44Ar6QoZ35wRGk%3DxMO4SqntfUqP5vjWL-yuKkk8Ca5vLNA%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/CANd-%2BoCjv9Wbc4rpecy%2BEvazsgE8h%2BFkt0wGG8Th9qVjxHe-mw%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/CAHtg44ChoL%3DiJ2fnLyn98MV3ON2ef4GsTzdn_2hfL1a9%2BAosGA%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/CACaE8x5EBf3yG1RYJvFHD_G2FL0FcULmERpZ%3DqVP_Xy6qdu8uw%40mail.gmail.com.


Re: How to link different apps into one main app

2023-03-24 Thread Vishesh Mangla
Add your app name in settings.py in INSTALLED_APPS

On Fri, 24 Mar, 2023, 18:58 Chandresh . T,  wrote:

> I'm a new learner of Django, and I want to do a project, In the main app a
> form will be given and if the person tells that he belongs to the frontend
> or backend developing group he will be moved to that room respectively.
>
> So I thought that I can create 2 different apps one frontend and another
> backend then once logged in to the main app the user will be sent to the
> respective apps room.
>
> I searched for how to do this on google, but there was no solution. So if
> you guys have any ideas please help me with this.
>
> Thank you in advance!
>
> --
> 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/1a056e9a-82c7-4267-a070-eb1119e3eceen%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/CACaE8x7mEP6Srk3vG61Oa%2BiTqw4knQvfgNCvCS7dy3qpxQbdsw%40mail.gmail.com.


Re: I have a problem with visual studio code

2023-05-02 Thread Vishesh Mangla
Looks like issue is with pillow

On Tue, 2 May, 2023, 22:17 Byansi Samuel,  wrote:

> Which version of python do you use?
>
> It's because of python.  Change the version of your python from anyone you
> have been using and install
>
> Python 3.10, it will work fine and successful
>
> On Tue, May 2, 2023, 7:41 PM Stan Hiebah  wrote:
>
>> Can i have a solution for this?
>>
>> --
>> 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/CAFYQPdJHma18zUctajwjfBRi6gYKQkz2MF%2BWSVsfifa9m%3DEzdA%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/CAGQoQ3xZBAKH2%2BrASDGQWQ0scfvHvOfS%3Do%3DTCMbzgHjXt4%2BNfg%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/CACaE8x6LCt9gTDtEfnipaeusnYdZR3aBVFwjXWV31rvjgSAPqg%40mail.gmail.com.


Re: I have a problem with visual studio code

2023-05-02 Thread Vishesh Mangla
Oh looks like you are using visual studio python. Dont use that and remove
the python path and download python from official website

On Tue, 2 May, 2023, 22:27 Stan Hiebah,  wrote:

> i tried so many different versions of python and still getting this error
> please help cause i have project should be delivered
>
> On Tue, 2 May 2023, 7:55 pm Vishesh Mangla, 
> wrote:
>
>> Looks like issue is with pillow
>>
>> On Tue, 2 May, 2023, 22:17 Byansi Samuel, 
>> wrote:
>>
>>> Which version of python do you use?
>>>
>>> It's because of python.  Change the version of your python from anyone
>>> you have been using and install
>>>
>>> Python 3.10, it will work fine and successful
>>>
>>> On Tue, May 2, 2023, 7:41 PM Stan Hiebah  wrote:
>>>
>>>> Can i have a solution for this?
>>>>
>>>> --
>>>> 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/CAFYQPdJHma18zUctajwjfBRi6gYKQkz2MF%2BWSVsfifa9m%3DEzdA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAFYQPdJHma18zUctajwjfBRi6gYKQkz2MF%2BWSVsfifa9m%3DEzdA%40mail.gmail.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/CAGQoQ3xZBAKH2%2BrASDGQWQ0scfvHvOfS%3Do%3DTCMbzgHjXt4%2BNfg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAGQoQ3xZBAKH2%2BrASDGQWQ0scfvHvOfS%3Do%3DTCMbzgHjXt4%2BNfg%40mail.gmail.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/CACaE8x6LCt9gTDtEfnipaeusnYdZR3aBVFwjXWV31rvjgSAPqg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACaE8x6LCt9gTDtEfnipaeusnYdZR3aBVFwjXWV31rvjgSAPqg%40mail.gmail.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/CAFYQPdKrxri_OeaYq6Vh0h%3Dm_Ca%3DQmYvQwZHTDieVbHEb9_uog%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFYQPdKrxri_OeaYq6Vh0h%3Dm_Ca%3DQmYvQwZHTDieVbHEb9_uog%40mail.gmail.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/CACaE8x5FMSTh_B4CBz5XdjLmWNSQSpMdz5ifWb7xASuCsp6QmQ%40mail.gmail.com.


Re: I have a problem with visual studio code

2023-05-02 Thread Vishesh Mangla
Also ask for help on web.libera.chat website.there is a python channel

On Tue, 2 May, 2023, 22:29 Vishesh Mangla, 
wrote:

> Oh looks like you are using visual studio python. Dont use that and remove
> the python path and download python from official website
>
> On Tue, 2 May, 2023, 22:27 Stan Hiebah,  wrote:
>
>> i tried so many different versions of python and still getting this error
>> please help cause i have project should be delivered
>>
>> On Tue, 2 May 2023, 7:55 pm Vishesh Mangla, 
>> wrote:
>>
>>> Looks like issue is with pillow
>>>
>>> On Tue, 2 May, 2023, 22:17 Byansi Samuel, 
>>> wrote:
>>>
>>>> Which version of python do you use?
>>>>
>>>> It's because of python.  Change the version of your python from anyone
>>>> you have been using and install
>>>>
>>>> Python 3.10, it will work fine and successful
>>>>
>>>> On Tue, May 2, 2023, 7:41 PM Stan Hiebah  wrote:
>>>>
>>>>> Can i have a solution for this?
>>>>>
>>>>> --
>>>>> 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/CAFYQPdJHma18zUctajwjfBRi6gYKQkz2MF%2BWSVsfifa9m%3DEzdA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAFYQPdJHma18zUctajwjfBRi6gYKQkz2MF%2BWSVsfifa9m%3DEzdA%40mail.gmail.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/CAGQoQ3xZBAKH2%2BrASDGQWQ0scfvHvOfS%3Do%3DTCMbzgHjXt4%2BNfg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAGQoQ3xZBAKH2%2BrASDGQWQ0scfvHvOfS%3Do%3DTCMbzgHjXt4%2BNfg%40mail.gmail.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/CACaE8x6LCt9gTDtEfnipaeusnYdZR3aBVFwjXWV31rvjgSAPqg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CACaE8x6LCt9gTDtEfnipaeusnYdZR3aBVFwjXWV31rvjgSAPqg%40mail.gmail.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/CAFYQPdKrxri_OeaYq6Vh0h%3Dm_Ca%3DQmYvQwZHTDieVbHEb9_uog%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAFYQPdKrxri_OeaYq6Vh0h%3Dm_Ca%3DQmYvQwZHTDieVbHEb9_uog%40mail.gmail.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/CACaE8x5MsYJ1qLeH_jOdje%2BTcNeownMn1mGAfK5sbgQbq45c_w%40mail.gmail.com.


Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
It looks like you are passing a null but null=False is not set

On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
django-users@googlegroups.com> wrote:

> I'm trying to test a django-admin command and don't understand why the
> tests give errors on the code while the code works as expected.
>
> I'm under the impression that the *raise CommandError* is ignored by the
> test, but don't understand why this would be.
>
> Please help.
>
> Running the code shows:
>
> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
> populate_source 0
>
> *CommandError: Alleen hele getallen > 0 toegestaan*
>
> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
> populate_source 1
>
> *Teksten zijn gegenereerd voor tekstlengte 1*
>
> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
> populate_source 1
>
> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd*
>
> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
> populate_source 7
>
> *CommandError: Opgegeven sleutel 7 niet gevonden*
>
> Running the tests shows
>
> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test
> tests.test_sources_app_command_populate
>
> Found 3 test(s).
>
> Creating test database for alias 'default'...
>
> System check identified no issues (0 silenced).
>
> EEE
>
> ==
>
> ERROR: test_command_output_been_there
> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there)
>
> Test for failure: in_use = True.
>
> --
>
> Traceback (most recent call last):
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
> line 89, in _execute
>
> return self.cursor.execute(sql, params)
>
>
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py",
> line 328, in execute
>
> return super().execute(query, params)
>
>^^
>
> sqlite3.IntegrityError: NOT NULL constraint failed:
> domain_sources_app_characternumber.number_of_combinations
>
>
> The above exception was the direct cause of the following exception:
>
>
> Traceback (most recent call last):
>
>   File
> "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py",
> line 30, in test_command_output_been_there
>
> thingy.save()
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
> line 814, in save
>
> self.save_base(
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
> line 877, in save_base
>
> updated = self._save_table(
>
>   ^
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
> line 1020, in _save_table
>
> results = self._do_insert(
>
>   
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
> line 1061, in _do_insert
>
> return manager._insert(
>
>
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/manager.py",
> line 87, in manager_method
>
> return getattr(self.get_queryset(), name)(*args, **kwargs)
>
>^^^
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/query.py",
> line 1805, in _insert
>
> return query.get_compiler(using=using).execute_sql(returning_fields)
>
>^
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py",
> line 1820, in execute_sql
>
> cursor.execute(sql, params)
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
> line 67, in execute
>
> return self._execute_with_wrappers(
>
>
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
> line 80, in _execute_with_wrappers
>
> return executor(sql, params, many, context)
>
>
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
> line 84, in _execute
>
> with self.db.wrap_database_errors:
>
>   File
> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/utils.py",
> line 91, in __exit__
>
> raise dj_exc_value.with_traceback(traceback) from exc_value
>
>   File
> "/Users/werker/P

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
False or True check for yourself.

On Wed, 10 May, 2023, 17:29 Vishesh Mangla, 
wrote:

> It looks like you are passing a null but null=False is not set
>
> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> I'm trying to test a django-admin command and don't understand why the
>> tests give errors on the code while the code works as expected.
>>
>> I'm under the impression that the *raise CommandError* is ignored by the
>> test, but don't understand why this would be.
>>
>> Please help.
>>
>> Running the code shows:
>>
>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>> populate_source 0
>>
>> *CommandError: Alleen hele getallen > 0 toegestaan*
>>
>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>> populate_source 1
>>
>> *Teksten zijn gegenereerd voor tekstlengte 1*
>>
>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>> populate_source 1
>>
>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd*
>>
>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>> populate_source 7
>>
>> *CommandError: Opgegeven sleutel 7 niet gevonden*
>>
>> Running the tests shows
>>
>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test
>> tests.test_sources_app_command_populate
>>
>> Found 3 test(s).
>>
>> Creating test database for alias 'default'...
>>
>> System check identified no issues (0 silenced).
>>
>> EEE
>>
>> ==
>>
>> ERROR: test_command_output_been_there
>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there)
>>
>> Test for failure: in_use = True.
>>
>> --
>>
>> Traceback (most recent call last):
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
>> line 89, in _execute
>>
>> return self.cursor.execute(sql, params)
>>
>>
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py",
>> line 328, in execute
>>
>> return super().execute(query, params)
>>
>>^^
>>
>> sqlite3.IntegrityError: NOT NULL constraint failed:
>> domain_sources_app_characternumber.number_of_combinations
>>
>>
>> The above exception was the direct cause of the following exception:
>>
>>
>> Traceback (most recent call last):
>>
>>   File
>> "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py",
>> line 30, in test_command_output_been_there
>>
>> thingy.save()
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>> line 814, in save
>>
>> self.save_base(
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>> line 877, in save_base
>>
>> updated = self._save_table(
>>
>>   ^
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>> line 1020, in _save_table
>>
>> results = self._do_insert(
>>
>>   
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>> line 1061, in _do_insert
>>
>> return manager._insert(
>>
>>
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/manager.py",
>> line 87, in manager_method
>>
>> return getattr(self.get_queryset(), name)(*args, **kwargs)
>>
>>^^^
>>
>>   File
>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/query.py",
>> line 1805, in _insert
>>
>> return query.get_compiler(using=using).execute_sql(returning_fields)
>

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
Probably this would help:
https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django

On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
django-users@googlegroups.com> wrote:

> Sorry Vishesh, thanks for the quick answer but I have no idea what you
> mean.
>
> On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote:
>
>> False or True check for yourself.
>>
>> On Wed, 10 May, 2023, 17:29 Vishesh Mangla,  wrote:
>>
>>> It looks like you are passing a null but null=False is not set
>>>
>>> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
>>> django...@googlegroups.com> wrote:
>>>
>>>> I'm trying to test a django-admin command and don't understand why the
>>>> tests give errors on the code while the code works as expected.
>>>>
>>>> I'm under the impression that the *raise CommandError* is ignored by
>>>> the test, but don't understand why this would be.
>>>>
>>>> Please help.
>>>>
>>>> Running the code shows:
>>>>
>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>> populate_source 0
>>>>
>>>> *CommandError: Alleen hele getallen > 0 toegestaan*
>>>>
>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>> populate_source 1
>>>>
>>>> *Teksten zijn gegenereerd voor tekstlengte 1*
>>>>
>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>> populate_source 1
>>>>
>>>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd*
>>>>
>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>> populate_source 7
>>>>
>>>> *CommandError: Opgegeven sleutel 7 niet gevonden*
>>>>
>>>> Running the tests shows
>>>>
>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py test
>>>> tests.test_sources_app_command_populate
>>>>
>>>> Found 3 test(s).
>>>>
>>>> Creating test database for alias 'default'...
>>>>
>>>> System check identified no issues (0 silenced).
>>>>
>>>> EEE
>>>>
>>>> ==
>>>>
>>>> ERROR: test_command_output_been_there
>>>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there)
>>>>
>>>> Test for failure: in_use = True.
>>>>
>>>> --
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>>   File
>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
>>>> line 89, in _execute
>>>>
>>>> return self.cursor.execute(sql, params)
>>>>
>>>>
>>>>
>>>>   File
>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py",
>>>> line 328, in execute
>>>>
>>>> return super().execute(query, params)
>>>>
>>>>^^
>>>>
>>>> sqlite3.IntegrityError: NOT NULL constraint failed:
>>>> domain_sources_app_characternumber.number_of_combinations
>>>>
>>>>
>>>> The above exception was the direct cause of the following exception:
>>>>
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>>   File
>>>> "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py",
>>>> line 30, in test_command_output_been_there
>>>>
>>>> thingy.save()
>>>>
>>>>   File
>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>>>> line 814, in save
>>>>
>>>> self.save_base(
>>>>
>>>>   File
>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/models/base.py",
>>>> line 877, in save_base

Re: testing newbie - help requested: app works, tests give errors

2023-05-10 Thread Vishesh Mangla
If I understood the error right.

On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla 
wrote:

> Probably this would help:
> https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django
>
> On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
> django-users@googlegroups.com> wrote:
>
>> Sorry Vishesh, thanks for the quick answer but I have no idea what you
>> mean.
>>
>> On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote:
>>
>>> False or True check for yourself.
>>>
>>> On Wed, 10 May, 2023, 17:29 Vishesh Mangla, 
>>> wrote:
>>>
>>>> It looks like you are passing a null but null=False is not set
>>>>
>>>> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
>>>> django...@googlegroups.com> wrote:
>>>>
>>>>> I'm trying to test a django-admin command and don't understand why the
>>>>> tests give errors on the code while the code works as expected.
>>>>>
>>>>> I'm under the impression that the *raise CommandError* is ignored by
>>>>> the test, but don't understand why this would be.
>>>>>
>>>>> Please help.
>>>>>
>>>>> Running the code shows:
>>>>>
>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>>> populate_source 0
>>>>>
>>>>> *CommandError: Alleen hele getallen > 0 toegestaan*
>>>>>
>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>>> populate_source 1
>>>>>
>>>>> *Teksten zijn gegenereerd voor tekstlengte 1*
>>>>>
>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>>> populate_source 1
>>>>>
>>>>> *CommandError: Teksten voor nummer 1 zijn al eerder gegenereerd*
>>>>>
>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>>> populate_source 7
>>>>>
>>>>> *CommandError: Opgegeven sleutel 7 niet gevonden*
>>>>>
>>>>> Running the tests shows
>>>>>
>>>>> (.venv) werker@Werkers-Mac-mini domain_reader % python3 manage.py
>>>>> test tests.test_sources_app_command_populate
>>>>>
>>>>> Found 3 test(s).
>>>>>
>>>>> Creating test database for alias 'default'...
>>>>>
>>>>> System check identified no issues (0 silenced).
>>>>>
>>>>> EEE
>>>>>
>>>>> ==
>>>>>
>>>>> ERROR: test_command_output_been_there
>>>>> (tests.test_sources_app_command_populate.PopulateSourceTests.test_command_output_been_there)
>>>>>
>>>>> Test for failure: in_use = True.
>>>>>
>>>>> --
>>>>>
>>>>> Traceback (most recent call last):
>>>>>
>>>>>   File
>>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/utils.py",
>>>>> line 89, in _execute
>>>>>
>>>>> return self.cursor.execute(sql, params)
>>>>>
>>>>>
>>>>>
>>>>>   File
>>>>> "/Users/werker/Projects/domain_reader/.venv/lib/python3.11/site-packages/django/db/backends/sqlite3/base.py",
>>>>> line 328, in execute
>>>>>
>>>>> return super().execute(query, params)
>>>>>
>>>>>^^
>>>>>
>>>>> sqlite3.IntegrityError: NOT NULL constraint failed:
>>>>> domain_sources_app_characternumber.number_of_combinations
>>>>>
>>>>>
>>>>> The above exception was the direct cause of the following exception:
>>>>>
>>>>>
>>>>> Traceback (most recent call last):
>>>>>
>>>>>   File
>>>>> "/Users/werker/Projects/domain_reader/tests/test_sources_app_command_populate.py",
>>>>> line 30, in test_command_output_been_there
>>

Re: PDF generation with xhtml2Pdf in Django

2023-05-11 Thread Vishesh Mangla
Try weasyprint

On Thu, 11 May, 2023, 18:38 Oduwa Imade,  wrote:

> Hello Guys! I am trying to generate a Pdf doc(reading data from a
> database) on Django with xhtml2pdf library. but i encounter this error when
> i hit the 'Create PDF' button:
>
> ValueError at /RecruitmentApp/createcvpdf
>  with cell(0,0) containing
> ' size=x' data error - 23 rows in data
> but 22 row heights .
>  ..am not sure what the error is saying or what am doing wrong. Can
> anyone assist please with ideas on how to tackle this issue?
>
> This is the method in the views.py that handles the pdf creation:
>
> def createPdf(requst):
>   #jobseekerID = request.session['rec_ID']
>   jobseekerID = 2
>
>   cv = CV.objects.select_related('f_key_REC').get(f_key_REC =
> jobseekerID)
>   skill = Skill.objects.select_related('fk_sCV').get(fk_sCV = cv
> .id)
>   qualification = Qualification.objects.select_related('fk_qCV').
> get(fk_qCV=cv.id)
>   certification = Certification.objects.select_related('fk_cCV').
> get(fk_cCV = cv.id)
>   experience = Experience.objects.select_related('fk_eCV').filter(
> fk_eCV = cv.id)
>
>   template_path = 'Recruitment_App/createpdf_cv.html'
>   context = {
>"cv": cv,
>"skills" : skill,
>"qualifications": qualification,
>"certification": certification,
>"experience": experience
>   }
>   print (cv)
>   print(skill)
>   print(experience)
>   response = HttpResponse(content_type='application/pdf')
>   response['Content-Disposition'] = 'filename="cv001.pdf"'
>   template = get_template(template_path)
>   html = template.render(context)
>
>   pisa_status = pisa.CreatePDF(html, dest=response)
>   print(template)
>   if pisa_status.err:
>return HttpResponse('We had some errors ' + html +
> '')
>   return response
>
>
> --
> 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/42a1e5d3-718b-4a09-8dbd-b035756765c9n%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/CACaE8x6rJ6ie3dAZPaJYcaJLn7P1Mu%3D7Q%2B6eWxvo%3D6KuSCAxEw%40mail.gmail.com.


Re: PDF generation with xhtml2Pdf in Django

2023-05-11 Thread Vishesh Mangla
why don't you just use weasyprint?

On Thu, May 11, 2023 at 11:48 PM Oduwa Imade  wrote:

> Hello everyone, I would like to thank you for your concern and support
> regarding the issue I faced earlier. I am happy to inform you that I was
> able to resolve the error. I discovered that the xhtml2pdf library was
> unable to process or parse an HTML file that contained a table. I'm not
> exactly sure why this was causing an error:
> ValueError at /RecruitmentApp/createcvpdf
>  with cell(0,0) containing
> ' size=x' data error - 23 rows in data
> but 22 row heights
>
> To fix the problem, I removed the table element from my HTML file and used
>  and  elements instead, while also utilizing Django tags for a
> structured layout. I was then able to successfully render the PDF.
>
> On Thursday, May 11, 2023 at 6:54:04 PM UTC+1 Abdulrahman Abbas wrote:
>
>> Send the error details
>>
>> On Thu, May 11, 2023, 14:41 Michael Edet  wrote:
>>
>>> How???
>>>
>>> On Thu, 11 May 2023, 14:25 Vishesh Mangla,  wrote:
>>>
>>>> Try weasyprint
>>>>
>>>> On Thu, 11 May, 2023, 18:38 Oduwa Imade,  wrote:
>>>>
>>>>> Hello Guys! I am trying to generate a Pdf doc(reading data from a
>>>>> database) on Django with xhtml2pdf library. but i encounter this error 
>>>>> when
>>>>> i hit the 'Create PDF' button:
>>>>>
>>>>> ValueError at /RecruitmentApp/createcvpdf
>>>>>  with cell(0,0) containing
>>>>> ' size=x' data error - 23 rows in
>>>>> data but 22 row heights .
>>>>>  ..am not sure what the error is saying or what am doing wrong.
>>>>> Can anyone assist please with ideas on how to tackle this issue?
>>>>>
>>>>> This is the method in the views.py that handles the pdf creation:
>>>>>
>>>>> def createPdf(requst):
>>>>>   #jobseekerID = request.session['rec_ID']
>>>>>   jobseekerID = 2
>>>>>
>>>>>   cv = CV.objects.select_related('f_key_REC').get(f_key_REC =
>>>>> jobseekerID)
>>>>>   skill = Skill.objects.select_related('fk_sCV').get(fk_sCV =
>>>>> cv.id)
>>>>>   qualification = Qualification.objects.select_related(
>>>>> 'fk_qCV').get(fk_qCV=cv.id)
>>>>>   certification = Certification.objects.select_related(
>>>>> 'fk_cCV').get(fk_cCV = cv.id)
>>>>>   experience = Experience.objects.select_related('fk_eCV').
>>>>> filter(fk_eCV = cv.id)
>>>>>
>>>>>   template_path = 'Recruitment_App/createpdf_cv.html'
>>>>>   context = {
>>>>>"cv": cv,
>>>>>"skills" : skill,
>>>>>"qualifications": qualification,
>>>>>"certification": certification,
>>>>>"experience": experience
>>>>>   }
>>>>>   print (cv)
>>>>>   print(skill)
>>>>>   print(experience)
>>>>>   response = HttpResponse(content_type='application/pdf')
>>>>>   response['Content-Disposition'] = 'filename="cv001.pdf"'
>>>>>   template = get_template(template_path)
>>>>>   html = template.render(context)
>>>>>
>>>>>   pisa_status = pisa.CreatePDF(html, dest=response)
>>>>>   print(template)
>>>>>   if pisa_status.err:
>>>>>return HttpResponse('We had some errors ' + html +
>>>>> '')
>>>>>   return response
>>>>>
>>>>>
>>>>> --
>>>>> 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/42a1e5d3-718b-4a09-8dbd-b035756765c9n%40googlegroups.com
>>>>> <https://groups.google.com/

Re:

2023-05-11 Thread Vishesh Mangla
Use request module to make a request from django if you meant that
otherwise your question is unclear

On Fri, 12 May, 2023, 10:21 Karthik V A,  wrote:

> Hello friends, Is there any inbuilt function in django for API. Without
> using REST framework and request.
>
> --
> 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/CAHjRVdSmDv28sXqf1FkPLXBooUKWpOGtSR6LZFxLVuU8w3c_PA%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/CACaE8x57rYB4MGAWb95R9zS9MpcFmvZBT47qQ2FX2F9vLB%2B7LQ%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
Are you logging through Gmail?

On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
wrote:

> I deleted all passwords and thhen created new password but nothig was
> happen
>
> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
> dashlakshyaraj2...@gmail.com> wrote:
>
>> First verify if the email through which the app password was created is
>> same or different. If different then it will not work.
>> OR
>> Please recreate a new app and copy the password again and enter.
>>
>> Thanks and Regards
>> Lakshyaraj Dash
>>
>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>> wrote:
>>
>>> how can I solve this? I enabled 2fa then created app password but it
>>> does not work.
>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not
>>> accepted. Learn more at\n5.7.8
>>> https://support.google.com/mail/?p=BadCredentials
>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>
>>> --
>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%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/CACaE8x6m0YXk3o%3Df360a5F6x7sWOStSwAqOH7skHYKMGuWj9qg%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
You can't use SMTP with Google.
You need to use oauth through Google cloud platform. Actually there is one
way to use SMTP with Google to login through third party apps. Check out my
stories on medium. I had written one for a solution.

On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
wrote:

> Are you logging through Gmail?
>
> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
> wrote:
>
>> I deleted all passwords and thhen created new password but nothig was
>> happen
>>
>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>> dashlakshyaraj2...@gmail.com> wrote:
>>
>>> First verify if the email through which the app password was created is
>>> same or different. If different then it will not work.
>>> OR
>>> Please recreate a new app and copy the password again and enter.
>>>
>>> Thanks and Regards
>>> Lakshyaraj Dash
>>>
>>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>>> wrote:
>>>
>>>> how can I solve this? I enabled 2fa then created app password but it
>>>> does not work.
>>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
>>>> not accepted. Learn more at\n5.7.8
>>>> https://support.google.com/mail/?p=BadCredentials
>>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>>
>>>> --
>>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%40mail.gmail.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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%40mail.gmail.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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%40mail.gmail.com.


Re: django smtp.gmail error

2023-05-17 Thread Vishesh Mangla
https://medium.com/@manglavishesh64/using-gmail-smtp-with-3rd-party-apps-be3e15f4a7fc

On Wed, 17 May, 2023, 19:50 Chelsea Fan, 
wrote:

> how can I find your medium stories?
>
> On Wed, May 17, 2023 at 7:09 PM Vishesh Mangla 
> wrote:
>
>> You can't use SMTP with Google.
>> You need to use oauth through Google cloud platform. Actually there is
>> one way to use SMTP with Google to login through third party apps. Check
>> out my stories on medium. I had written one for a solution.
>>
>> On Wed, 17 May, 2023, 19:36 Vishesh Mangla, 
>> wrote:
>>
>>> Are you logging through Gmail?
>>>
>>> On Wed, 17 May, 2023, 19:35 Chelsea Fan, 
>>> wrote:
>>>
>>>> I deleted all passwords and thhen created new password but nothig was
>>>> happen
>>>>
>>>> On Wed, May 17, 2023 at 6:54 PM Lakshyaraj Dash <
>>>> dashlakshyaraj2...@gmail.com> wrote:
>>>>
>>>>> First verify if the email through which the app password was created
>>>>> is same or different. If different then it will not work.
>>>>> OR
>>>>> Please recreate a new app and copy the password again and enter.
>>>>>
>>>>> Thanks and Regards
>>>>> Lakshyaraj Dash
>>>>>
>>>>> On Wed, May 17, 2023, 19:17 Chelsea Fan 
>>>>> wrote:
>>>>>
>>>>>> how can I solve this? I enabled 2fa then created app password but it
>>>>>> does not work.
>>>>>> smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password
>>>>>> not accepted. Learn more at\n5.7.8
>>>>>> https://support.google.com/mail/?p=BadCredentials
>>>>>> ev21-20020a17090729d500b00965b416585bsm12337451ejc.118 - gsmtp')
>>>>>>
>>>>>> --
>>>>>> 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/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/django-users/CAJwZndce5fV-BuwnLUTrU73e%3DvQ_QbArGoyf6qSnQr4wyxHQOw%40mail.gmail.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/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAF7qQgBwYUz8HaRizz_4AVU4rwNcYUX8v1Au%2BWN-UNqHdc1LdQ%40mail.gmail.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/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJwZnddw2dpYE35Ww_5W%2BUCQiDvdTzZ1B7ojNry50aBkH-efzA%40mail.gmail.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/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACaE8x4165he-ofirdmyqtc-BksB18dEcKWebnzU2j2h6%3Dhymg%40mail.gmail.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/CAJwZndcYssDjkSc%2BFGCpy%3DWVPp6R%2Bd0a8Lo1puUrvDAubErbhw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAJwZndcYssDjkSc%2BFGCpy%3DWVPp6R%2Bd0a8Lo1puUrvDAubErbhw%40mail.gmail.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/CACaE8x4Dr%3Dtb_fGKG5TnidLyqo6mApG0autaxyoRuRgM9nevjA%40mail.gmail.com.


Re: upload folder

2023-05-19 Thread Vishesh Mangla
https://api.video/blog/tutorials/uploading-large-files-with-javascript/
On Fri, 19 May, 2023, 18:29 Karuppasamy T, 
wrote:

> how to upload folder and sub directory and including sub files maximum
> 5gb  please help me .
>
> --
> 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/de381e03-816c-4b90-a80b-5062025af9afn%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/CACaE8x5Hc8SM61gT4XKZhGtZAkK7ZhAWR8B4UOjQACLfNjsGaw%40mail.gmail.com.


Re: Tokenized Authentication for subdomains

2023-05-24 Thread Vishesh Mangla
use nginx as reverse proxy

On Thu, 25 May, 2023, 07:35 André Lewis,  wrote:

> Hi,
>
> I'm currently working on a project with subdomains, and I wanted to
> authenticate the user across the site, regardless of the url. I did some
> digging and found some ideas for implementing Oauth/openID connect
> authentication in Django (wasn't much help). Seeing, I don't intend on
> using third-party providers for this one.
>
>  I have an idea of how it should work 'on paper', but it gets fuzzy when I
> start thinking about server-end verification; how the token is generated,
> and how I get access to it for later verification.
>
> Any suggestions, would be really helpful?
> Thanks in advance.
>
> --
> 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/CAJN6x_gEgbE87yg0NpzhS_Rr_BEwWwo7HkWT02JRccfCfWS2Gw%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/CACaE8x6BmDOopm%2BF9fwMHLn3e3FiskdASrvTOMj%2BJEbxjrrC9Q%40mail.gmail.com.


Re: Tokenized Authentication for subdomains

2023-05-26 Thread Vishesh Mangla
https://stackoverflow.com/a/62782197/4213362

On Thu, May 25, 2023 at 7:35 AM André Lewis  wrote:

> Hi,
>
> I'm currently working on a project with subdomains, and I wanted to
> authenticate the user across the site, regardless of the url. I did some
> digging and found some ideas for implementing Oauth/openID connect
> authentication in Django (wasn't much help). Seeing, I don't intend on
> using third-party providers for this one.
>
>  I have an idea of how it should work 'on paper', but it gets fuzzy when I
> start thinking about server-end verification; how the token is generated,
> and how I get access to it for later verification.
>
> Any suggestions, would be really helpful?
> Thanks in advance.
>
> --
> 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/CAJN6x_gEgbE87yg0NpzhS_Rr_BEwWwo7HkWT02JRccfCfWS2Gw%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/CACaE8x4AXKD7AUqk2%2B4Ck_%2Bp-zc5jOW%2BVDDXF7NMVLm6%3DYkW%3DQ%40mail.gmail.com.


Re: JOB | Lead Platform Engineer (Singapore/London)

2023-05-26 Thread Vishesh Mangla
Please be careful whilst looking at the random jobs in this group. Afaik,
these are unverified. If they require you to relocate then think 10 times
before taking any action.

On Sat, May 27, 2023 at 1:32 AM Sakshi  wrote:

> Hi I have around 3 years of experience with python.can you consider my
> profile??
>
> On Fri, 26 May, 2023, 5:24 pm James Tobin,  wrote:
>
>> Hello, I'm working with an employer that is looking to hire someone in
>> London or Singapore to take lead on the modernisation of their
>> on-premises environment.  Python experience is *mandatory*.
>> Consequently, I had hoped that some members of this group may like to
>> discuss.  I can be reached using "JamesBTobin (at) Gmail (dot) Com".
>> Kind regards, James
>>
>> --
>> 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/6cc40ec3-dc19-4dab-82da-bbc43035b154n%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/CADJuPLUs3Y%2BK1%2BU_q4K-N1XPBe_axcDAAHko5CV_1nnmY4jwLg%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/CACaE8x67xpT4o1Gu9xhWdhbnBV%2BWrgSSKkNmZPfQhcqmU6AYHA%40mail.gmail.com.


Re: I want help from senior python/django developer to create one django assignment project.

2023-06-05 Thread Vishesh Mangla
Ya, who ll open up Linux for him 😑

On Mon, 5 Jun, 2023, 22:43 Lakshyaraj Dash, 
wrote:

> Bro please send in pdf format so that it will be possible to open in mobile
>
> On Mon, 5 Jun, 2023, 22:35 AKHIL KORE,  wrote:
>
>> Hi django developer group.
>>
>>  I'm from india. I got one django assignment from xyz comapny. But i
>> can't how to create  that logical way. Please help me. Below file is that
>> assignment. Please open and see it.
>> can any one send that type of related previous projects code.
>>
>> --
>> 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/7988a2b0-95af-4c75-92db-670e541b9af6n%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/CAF7qQgCBQ9jkBb%3DX0TvaSZMcqBRoKYEWM3XFMTddmhBvGDxO8A%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/CACaE8x5JW1bfPvmbWLp-7qmP3Ya-5%3DP30vLkCgj8sc-e9fVvDg%40mail.gmail.com.


Re: Slow Performance of Django Web App

2023-06-11 Thread Vishesh Mangla
Lmao

On Mon, 12 Jun, 2023, 10:54 Kunal Mittal,  wrote:

> I have read various docs on performance optimization, but still not
> getting what's taking to render templates and what's the bottleneck when
> cache get cleared, I takes around 12 hours for application to run smoothly
> after that event.
>
> On Monday, June 12, 2023 at 10:53:06 AM UTC+5:30 Kunal Mittal wrote:
>
>> Hi, we are using Django 1.8.5
>> Architecture is like -  Nginx side car -> wsgi server (gunicorn) ->
>> application
>> On Monday, June 12, 2023 at 1:06:18 AM UTC+5:30 Mz Gz wrote:
>>
>>> What server do you use ?
>>>
>>> On Sun, 11 Jun 2023, 10:00 pm Kunal Mittal,  wrote:
>>>
 I've a django application serving 10k+ users daily, that application
 has everything to be on the top of performance metrics but still some API's
 have high latencies, application serves lots of pages with nice css and
 various images, on most the pages they are being served by s3 while on some
 it's via django static files. We have implemented caching on akamai for
 every static file that application serves, whenever that cache disappears
 latency of each and every API spikes exponentially, at that time even
 loading metrics becomes a pain, server does not pick those requests. Can
 anyone suggest what's going on here.

 --
 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/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%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/e07d773a-db82-4a09-b73c-f36ac90322b1n%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/CACaE8x63fZiLs_rkSZEYEi8upnp_9Ljc_Z4cJz56eTGJdbDJXA%40mail.gmail.com.


Re: Slow Performance of Django Web App

2023-06-11 Thread Vishesh Mangla
Try cdn, and use Statics based on screen size

On Mon, 12 Jun, 2023, 11:14 Vishesh Mangla, 
wrote:

> Lmao
>
> On Mon, 12 Jun, 2023, 10:54 Kunal Mittal,  wrote:
>
>> I have read various docs on performance optimization, but still not
>> getting what's taking to render templates and what's the bottleneck when
>> cache get cleared, I takes around 12 hours for application to run smoothly
>> after that event.
>>
>> On Monday, June 12, 2023 at 10:53:06 AM UTC+5:30 Kunal Mittal wrote:
>>
>>> Hi, we are using Django 1.8.5
>>> Architecture is like -  Nginx side car -> wsgi server (gunicorn) ->
>>> application
>>> On Monday, June 12, 2023 at 1:06:18 AM UTC+5:30 Mz Gz wrote:
>>>
>>>> What server do you use ?
>>>>
>>>> On Sun, 11 Jun 2023, 10:00 pm Kunal Mittal, 
>>>> wrote:
>>>>
>>>>> I've a django application serving 10k+ users daily, that application
>>>>> has everything to be on the top of performance metrics but still some 
>>>>> API's
>>>>> have high latencies, application serves lots of pages with nice css and
>>>>> various images, on most the pages they are being served by s3 while on 
>>>>> some
>>>>> it's via django static files. We have implemented caching on akamai for
>>>>> every static file that application serves, whenever that cache disappears
>>>>> latency of each and every API spikes exponentially, at that time even
>>>>> loading metrics becomes a pain, server does not pick those requests. Can
>>>>> anyone suggest what's going on here.
>>>>>
>>>>> --
>>>>> 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/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%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/e07d773a-db82-4a09-b73c-f36ac90322b1n%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/e07d773a-db82-4a09-b73c-f36ac90322b1n%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/CACaE8x4G%3D14_4fw8LELef_FYzRnASFiSdHqqZm47_1k6CuBxgg%40mail.gmail.com.


Re: Translating a Django website

2023-06-12 Thread Vishesh Mangla
Why don't you use Google translate api?

On Mon, 12 Jun, 2023, 14:36 אורי,  wrote:

> Hi,
>
> I have a website in English and Hebrew which I want to translate into
> French. The website has about 3 or 4 .po files in each language, which
> should be translated. But the translators I talked to want to have it in a
> Word or Excel format. Is it possible to export .po files into Excel formats
> or CSV? Notice that some translations include context (for example male or
> female), and the context itself should be used too. I think it's better to
> send them the Hebrew .po files which contain English and Hebrew, and then
> they will translate it to French. So is it possible to convert it into CSV
> format?
>
> Thanks,
> Uri Rodberg, Speedy Net.
> אורי
> u...@speedy.net
>
> --
> 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/CABD5YeE06_ZTLvJPZU-Y4RqoF3jpKBQN4cWad8tybZwEUsk_zA%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/CACaE8x6WG5FymwuJuuwuycifiPdY5Gjcr7TYprpGOdTJaFimhQ%40mail.gmail.com.


Re: Slow Performance of Django Web App

2023-06-13 Thread Vishesh Mangla
Try profiling your django code

On Tue, 13 Jun, 2023, 23:19 Nisha Jose,  wrote:

> Try to check any N+1 issue available in the code.
>
>
> On Mon, Jun 12, 2023 at 9:46 AM Vishesh Mangla 
> wrote:
>
>> Try cdn, and use Statics based on screen size
>>
>> On Mon, 12 Jun, 2023, 11:14 Vishesh Mangla, 
>> wrote:
>>
>>> Lmao
>>>
>>> On Mon, 12 Jun, 2023, 10:54 Kunal Mittal, 
>>> wrote:
>>>
>>>> I have read various docs on performance optimization, but still not
>>>> getting what's taking to render templates and what's the bottleneck when
>>>> cache get cleared, I takes around 12 hours for application to run smoothly
>>>> after that event.
>>>>
>>>> On Monday, June 12, 2023 at 10:53:06 AM UTC+5:30 Kunal Mittal wrote:
>>>>
>>>>> Hi, we are using Django 1.8.5
>>>>> Architecture is like -  Nginx side car -> wsgi server (gunicorn) ->
>>>>> application
>>>>> On Monday, June 12, 2023 at 1:06:18 AM UTC+5:30 Mz Gz wrote:
>>>>>
>>>>>> What server do you use ?
>>>>>>
>>>>>> On Sun, 11 Jun 2023, 10:00 pm Kunal Mittal, 
>>>>>> wrote:
>>>>>>
>>>>>>> I've a django application serving 10k+ users daily, that application
>>>>>>> has everything to be on the top of performance metrics but still some 
>>>>>>> API's
>>>>>>> have high latencies, application serves lots of pages with nice css and
>>>>>>> various images, on most the pages they are being served by s3 while on 
>>>>>>> some
>>>>>>> it's via django static files. We have implemented caching on akamai for
>>>>>>> every static file that application serves, whenever that cache 
>>>>>>> disappears
>>>>>>> latency of each and every API spikes exponentially, at that time even
>>>>>>> loading metrics becomes a pain, server does not pick those requests. Can
>>>>>>> anyone suggest what's going on here.
>>>>>>>
>>>>>>> --
>>>>>>> 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/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/django-users/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%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/e07d773a-db82-4a09-b73c-f36ac90322b1n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/e07d773a-db82-4a09-b73c-f36ac90322b1n%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/CACaE8x4G%3D14_4fw8LELef_FYzRnASFiSdHqqZm47_1k6CuBxgg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACaE8x4G%3D14_4fw8LELef_FYzRnASFiSdHqqZm47_1k6CuBxgg%40mail.gmail.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/CANXPAinVh-P_3sPOzNu5rXbEtQS_EfbvOActjrgjw0%3DybMhYYQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CANXPAinVh-P_3sPOzNu5rXbEtQS_EfbvOActjrgjw0%3DybMhYYQ%40mail.gmail.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/CACaE8x77J-YC47zf%2BJTW-L6f2y2uKZFm9wGoMn-HpMu3T5ALmg%40mail.gmail.com.


Re: Slow Performance of Django Web App

2023-06-13 Thread Vishesh Mangla
https://medium.com/kami-people/profiling-in-django-9f4d403a394f

On Tue, Jun 13, 2023 at 11:44 PM Vishesh Mangla 
wrote:

> Try profiling your django code
>
> On Tue, 13 Jun, 2023, 23:19 Nisha Jose,  wrote:
>
>> Try to check any N+1 issue available in the code.
>>
>>
>> On Mon, Jun 12, 2023 at 9:46 AM Vishesh Mangla 
>> wrote:
>>
>>> Try cdn, and use Statics based on screen size
>>>
>>> On Mon, 12 Jun, 2023, 11:14 Vishesh Mangla, 
>>> wrote:
>>>
>>>> Lmao
>>>>
>>>> On Mon, 12 Jun, 2023, 10:54 Kunal Mittal, 
>>>> wrote:
>>>>
>>>>> I have read various docs on performance optimization, but still not
>>>>> getting what's taking to render templates and what's the bottleneck when
>>>>> cache get cleared, I takes around 12 hours for application to run smoothly
>>>>> after that event.
>>>>>
>>>>> On Monday, June 12, 2023 at 10:53:06 AM UTC+5:30 Kunal Mittal wrote:
>>>>>
>>>>>> Hi, we are using Django 1.8.5
>>>>>> Architecture is like -  Nginx side car -> wsgi server (gunicorn) ->
>>>>>> application
>>>>>> On Monday, June 12, 2023 at 1:06:18 AM UTC+5:30 Mz Gz wrote:
>>>>>>
>>>>>>> What server do you use ?
>>>>>>>
>>>>>>> On Sun, 11 Jun 2023, 10:00 pm Kunal Mittal, 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> I've a django application serving 10k+ users daily, that
>>>>>>>> application has everything to be on the top of performance metrics but
>>>>>>>> still some API's have high latencies, application serves lots of pages 
>>>>>>>> with
>>>>>>>> nice css and various images, on most the pages they are being served 
>>>>>>>> by s3
>>>>>>>> while on some it's via django static files. We have implemented 
>>>>>>>> caching on
>>>>>>>> akamai for every static file that application serves, whenever that 
>>>>>>>> cache
>>>>>>>> disappears latency of each and every API spikes exponentially, at that 
>>>>>>>> time
>>>>>>>> even loading metrics becomes a pain, server does not pick those 
>>>>>>>> requests.
>>>>>>>> Can anyone suggest what's going on here.
>>>>>>>>
>>>>>>>> --
>>>>>>>> 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/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%40googlegroups.com
>>>>>>>> <https://groups.google.com/d/msgid/django-users/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%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/e07d773a-db82-4a09-b73c-f36ac90322b1n%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/e07d773a-db82-4a09-b73c-f36ac90322b1n%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/CACaE8x4G%3D14_4fw8LELef_FYzRnASFiSdHqqZm47_1k6CuBxgg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CACaE8x4G%3D14_4fw8LELef_FYzRnASFiSdHqqZm47_1k6CuBxgg%40mail.gmail.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/CANXPAinVh-P_3sPOzNu5rXbEtQS_EfbvOActjrgjw0%3DybMhYYQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CANXPAinVh-P_3sPOzNu5rXbEtQS_EfbvOActjrgjw0%3DybMhYYQ%40mail.gmail.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/CACaE8x7gmY47Q2aG_%3DSZJ-yW8Vu%2Bx6dAbfzXce%2BYT%3DVvKTuxsw%40mail.gmail.com.


Re: Slow Performance of Django Web App

2023-06-13 Thread Vishesh Mangla
One important question, what webserver are you using?

On Wed, Jun 14, 2023 at 10:34 AM Shaheed Haque 
wrote:

> Have you tried using
> https://django-debug-toolbar.readthedocs.io/en/latest/? It can be a
> little fiddling about with, but it's time based profiling support has been
> invaluable in tracking down a few critical queries.
>
> On Sun, 11 Jun 2023, 20:00 Kunal Mittal,  wrote:
>
>> I've a django application serving 10k+ users daily, that application has
>> everything to be on the top of performance metrics but still some API's
>> have high latencies, application serves lots of pages with nice css and
>> various images, on most the pages they are being served by s3 while on some
>> it's via django static files. We have implemented caching on akamai for
>> every static file that application serves, whenever that cache disappears
>> latency of each and every API spikes exponentially, at that time even
>> loading metrics becomes a pain, server does not pick those requests. Can
>> anyone suggest what's going on here.
>>
>> --
>> 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/d32868ba-a2df-41e3-8f41-3ecc3c1b3471n%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/CAHAc2je1B-m24UtOCjfK_VwQj1TYrdQH8czBS-bLotPsx1hGyw%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/CACaE8x6HB%3DVB2bvYCtSbszcEELXqaojWVVKW1kZj0BKguF9mMQ%40mail.gmail.com.


Re: Guidepath to learn django

2023-06-27 Thread Vishesh Mangla
There is a course by Corey Schauffer through which I started and rest the
libera #django channel helped.

On Tue, 27 Jun, 2023, 17:35 lewis machilika,  wrote:

>
> Did you already tried the Django official documentation?
>
> Regards,
> Lewis
> On Tue, 27 Jun 2023 at 2:02 PM, Dilmurod Dilmurod <
> dilmuroddilmurod...@gmail.com> wrote:
>
>> https://youtu.be/xO1O0-L8ze0
>>
>> Sesh, 27-iyn, 2023, 02:00 Mohit Lamba :
>>
>>> Hello
>>>
>>> I hope this email finds you well. My name is Mohit Lamba , and I am
>>> writing to express my interest in learning Django but not getting the right
>>> course that i should follow or a roadmap. I have been an avid member of
>>> this Django group for some time now and greatly admire the knowledge and
>>> expertise shared within this community.
>>>
>>>
>>> I am a recent graduate from college and wanted to learn and improve my
>>> skillset so I could learn more about the industry.
>>>
>>> It would be grateful if someone could guide me on how and where to start
>>> and how to improve.
>>> Tech stack I am familiar with:
>>> REACTJS,  Javascript, Tailwind CSS, Bootstrap, HTML,CSS,
>>> Languages : C++, C, , PYTHON, JAVASCRIPT
>>>
>>>
>>>
>>> Thank You
>>>
>>> Mohit Lamba
>>>
>>> --
>>> 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/875743ed-3d79-4ce0-a3d1-2879fb63149an%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/CANHuyY%2BCJXohbvWU0nbjrj_ZwPFASRAfEJ517zBwa_21JP4DWw%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/CAGRTm9H1LXVD%3Dy0%2BtWypsLqG-3iNvpK%2BTC8Mi1wCo1dZMdCkYQ%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/CACaE8x6JEjnX9%2BKCsgUQ92tYU7KzUwm%2BDE3duGQhEq%2BHdF5Unw%40mail.gmail.com.


Re:

2023-07-18 Thread Vishesh Mangla
No degree teaches django or even web development.

On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
wrote:

> Do you have a bachelor's degree in relevant field like Computer Science?/
> Software Engineering?/ Data Science?
>
> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
> wrote:
>
>> My number is 08102980007
>>
>> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
>> wrote:
>>
>>> Dear community, I am currently looking for a remote internship on Django
>>> to gain more experience in this field I currently have skills in django,
>>> database testing api development with rest framework using Django channels
>>> to integrate websockets and asgi connections I don't mind working for free
>>> but would also be glad if I'm payed 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%40mail.gmail.com.


Re:

2023-07-18 Thread Vishesh Mangla
Degree is not sufficient. Memorizing 250 DSA questions is also a
requirement.

On Tue, 18 Jul, 2023, 21:18 Asim Sulehria,  wrote:

> For getting a Job into industry you need a proper degree !
> Do you have it or not?
>
> On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla 
> wrote:
>
>> No degree teaches django or even web development.
>>
>> On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
>> wrote:
>>
>>> Do you have a bachelor's degree in relevant field like Computer
>>> Science?/ Software Engineering?/ Data Science?
>>>
>>> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
>>> wrote:
>>>
>>>> My number is 08102980007
>>>>
>>>> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
>>>> wrote:
>>>>
>>>>> Dear community, I am currently looking for a remote internship on
>>>>> Django to gain more experience in this field I currently have skills in
>>>>> django, database testing api development with rest framework using Django
>>>>> channels to integrate websockets and asgi connections I don't mind working
>>>>> for free but would also be glad if I'm payed 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%40mail.gmail.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/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%40mail.gmail.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/CACaE8x7uc5tqyS4nhVkHKdjS%2BgB%2BkkNp22US6sPBt791dnoaRg%40mail.gmail.com.


Re:

2023-07-18 Thread Vishesh Mangla
Whats the CTC you are offering?

On Tue, 18 Jul, 2023, 21:38 Asim Sulehria,  wrote:

> Do you have it or not ?
> We are just hiring Django developers as fresh graduates !
>
>
> On Tue, Jul 18, 2023 at 8:50 PM Vishesh Mangla 
> wrote:
>
>> Degree is not sufficient. Memorizing 250 DSA questions is also a
>> requirement.
>>
>> On Tue, 18 Jul, 2023, 21:18 Asim Sulehria, 
>> wrote:
>>
>>> For getting a Job into industry you need a proper degree !
>>> Do you have it or not?
>>>
>>> On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla <
>>> manglavishes...@gmail.com> wrote:
>>>
>>>> No degree teaches django or even web development.
>>>>
>>>> On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
>>>> wrote:
>>>>
>>>>> Do you have a bachelor's degree in relevant field like Computer
>>>>> Science?/ Software Engineering?/ Data Science?
>>>>>
>>>>> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
>>>>> wrote:
>>>>>
>>>>>> My number is 08102980007
>>>>>>
>>>>>> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
>>>>>> wrote:
>>>>>>
>>>>>>> Dear community, I am currently looking for a remote internship on
>>>>>>> Django to gain more experience in this field I currently have skills in
>>>>>>> django, database testing api development with rest framework using 
>>>>>>> Django
>>>>>>> channels to integrate websockets and asgi connections I don't mind 
>>>>>>> working
>>>>>>> for free but would also be glad if I'm payed 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 view this discussion on the web visit
>>>>>> https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.com
>>>>>> <https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.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/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CACaE8x65jGdWeq5shKuN9C_91hPXJj_w%2B3SznQYqvF56gPVd4A%40mail.gmail.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/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAPz57eENzPCyUHBT71L025d69pnGOr0-8FpdLmUk9O_k4jWwvg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received thi

Re: Re:

2023-07-19 Thread Vishesh Mangla
Very true. I am from a tier 1 University and I know how useless the degree
is . Teaches apples and people want oranges, even the CS ones.

On Wed, 19 Jul, 2023, 21:11 David Emanuel Sandoval, <
davidemanuelsando...@gmail.com> wrote:

> Just don't give up.
>
> A degree is always good, it can open more doors.
>
> But not all companies require a degree. You can even work remotely for a
> company.
> I myself got my first dev job with what would be the equivalent of a "high
> school" education.
> I never went to a university.
> But I did work a lot to improve my skills in this field.
> David Emanuel Sandoval
> <https://www.linkedin.com/in/david-emanuel-sandoval/>
> WEB DEVELOPER
> +549 3734 607102
>
> <https://linkedin.com/in/david-emanuel-sandoval/>
> <https://github.com/emasmach/>
>
>
>
>
>
> El mié, 19 jul 2023 a las 11:06, Vitor Angheben (<
> vitor_anghe...@hotmail.com>) escribió:
>
>> Hi Asim, I'm a fresh graduate in Industrial Engineer, but working with
>> software development
>>
>> Please, check my profile on my LinkedIn, if you find it interesting let
>> me know!!
>>
>> https://www.linkedin.com/in/vitor-a-5977a0b3/
>>
>> Best regards!
>> --
>> *De:* django-users@googlegroups.com  em
>> nome de Ibtsam Khan 
>> *Enviado:* terça-feira, 18 de julho de 2023 13:48
>> *Para:* django-users@googlegroups.com 
>> *Assunto:* Re:
>>
>> Hey I'm a fresh graduate from BS IT. And I'm a MERN Stack developer
>> learning Django for the web. What do u think?
>>
>> On Tue, Jul 18, 2023, 9:08 PM Asim Sulehria 
>> wrote:
>>
>> Do you have it or not ?
>> We are just hiring Django developers as fresh graduates !
>>
>>
>> On Tue, Jul 18, 2023 at 8:50 PM Vishesh Mangla 
>> wrote:
>>
>> Degree is not sufficient. Memorizing 250 DSA questions is also a
>> requirement.
>>
>> On Tue, 18 Jul, 2023, 21:18 Asim Sulehria, 
>> wrote:
>>
>> For getting a Job into industry you need a proper degree !
>> Do you have it or not?
>>
>> On Tue, Jul 18, 2023 at 8:36 PM Vishesh Mangla 
>> wrote:
>>
>> No degree teaches django or even web development.
>>
>> On Tue, Jul 18, 2023 at 8:50 PM Asim Sulehria 
>> wrote:
>>
>> Do you have a bachelor's degree in relevant field like Computer Science?/
>> Software Engineering?/ Data Science?
>>
>> On Tue, Jul 18, 2023 at 8:16 PM utibe solomon 
>> wrote:
>>
>> My number is 08102980007
>>
>> On Tue, Jul 18, 2023, 9:27 AM utibe solomon 
>> wrote:
>>
>> Dear community, I am currently looking for a remote internship on Django
>> to gain more experience in this field I currently have skills in django,
>> database testing api development with rest framework using Django channels
>> to integrate websockets and asgi connections I don't mind working for free
>> but would also be glad if I'm payed 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAJkiqy7MW-44%2BaPGVbhQ2ecY25Gg51jF8eN9AEoAgrdTLOrJsQ%40mail.gmail.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/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAPz57eEgE4Q_ZittJ4m07LJvjrCwb3RUOJvmatox5E4gtf2ZBQ%40mail.gmail.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/CA

Re: Internship and job in python and Django related

2023-07-21 Thread Vishesh Mangla
You can use fixtures to store json data to your db but it should be in a
specific format based on your model.

On Fri, 21 Jul, 2023, 22:44 Emmanuel Seth, 
wrote:

> Svp parlez en français 🙏🙏🙏
>
>
> Le ven. 21 juil. 2023 à 15:14, Opeyemi Ajayi <
> opeyemichristiana.aj...@gmail.com> a écrit :
>
>> I am Christiana Ajayi from Nigeria, but I am currently based in Rwanda
>> and Nigeria.  I have just concluded development of a realtime dashboard
>> using Django, Reactjs, HTML, CSS,  D3, PostgreSQL deployed on AWS cloud.
>>
>> I also have an engineering  background and hold a Masters degree in
>> Engineering  Artificial Intelligence and Software engineering from Carnegie
>> Mellon University, and I am actively seeking remote/on-site part-time or
>> full-time opportunities that will help build on my skill in Django, Python,
>> Data Analytics and contribute to my professional growth.  I look forward
>> anyone who can accept me as a full time remote role anywhere in the world.
>> Thank you.
>>
>> Attached is my LinkedIn profile: www.linkedin.com/in/
>> opeyemichristianaajayi
>>
>>
>> Kind regards,
>> +250791591554
>> +2348133347565
>>
>> On Wed, Jun 7, 2023, 4:17 PM Shubham DJ 
>> wrote:
>>
>>> Hello, I’m Shubhang Jori from Nerul Navi Mumbai. I have been learning
>>> web development for a few months now and have gained familiarity with
>>> Django, python , MySQL, HTML  and CSS. Also I have completed 3 months
>>> internship in trivia software as a python intern. As a student , I am
>>> actively seeking Full-time job opportunities as well as
>>> internship opportunities that will provide me with hands on experience in
>>> Django , python and contribute to my professional growth.  I look forward
>>> anyone who can accept me as a full time employee as well as an intern
>>>
>>>
>>> Also I attached resume for your reference.
>>> [image: PDF file]
>>> shubham cv-1-2.pdf
>>> 
>>>
>>> --
>>> 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%2B1KL_nGkLuktOc_3GEfDB1yzHCrovb_-rKJgT2trhsqnzn2rg%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/CAA0EoL37E%2BjkeUeggn%2BFoyisMtrp5OK-Du_xqO%2BHMQQW6tzLdg%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/CAMKrB%2B7AB-3aim3S-2meUQjtsOrWxwnx7pMKDhpmx4Lk7stpKw%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/CACaE8x7Pznmgqf_Ctho10pYmc1B82Q-FbBfkT5wWXTQ31osVCA%40mail.gmail.com.


RE: How to resize image from Django ckeditor_uploader in the HTML template while rendering?

2020-05-18 Thread Vishesh Mangla
You can resize an image using the Pillow library or open-cv. Sent from Mail for Windows 10 From: Ali AhammadSent: 17 May 2020 22:45To: Django usersSubject: How to resize image from Django ckeditor_uploader in the HTML template while rendering? I am using Django ckeditor_uploader to make a post view for a blog. But while rendering in the template I wanted to render image separately from the post content texts. My main goal is to set the image separately on the template on top and resizing it. And I can set more pictures inside the post  but the top one will be highlighted and rendered in different HTML page. Is there any way? I tried to use ckeditor widget but it is just customizing the toolbar of ckeditor Please let me know if you have any idea  -- 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/4b148528-7b15-4d39-8763-5f3a0f1931b6%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/5ec172ad.1c69fb81.c11b1.48eb%40mx.google.com.


RE: Re: how to write Ajax for a Like button in Django

2020-05-18 Thread Vishesh Mangla
Why don’t you use fetch api? Its simple. Once you get the response from the server, you can use InsertAdjacentHtml.  Sent from Mail for Windows 10 From: Motaz HejazeSent: 18 May 2020 07:34To: Django usersSubject: Re: how to write Ajax for a Like button in Django The button is submitted but without page refresh On Mon, 18 May 2020, 3:53 am Ahmed Khairy,  wrote:Hi Motaz, When I added your code it disabled the function of the button nothing happenedOn Sunday, May 17, 2020 at 9:30:38 PM UTC-4, Motaz Hejaze wrote:In your like button form in your templates , try this : i don't think you need ajax for this , but if you still need it let us know On Mon, 18 May 2020, 2:26 am Gabriel Araya Garcia,  wrote:Hi Ahmed, I was looking for that during several months and I have found examples than not run, and therefore I`ve get one conclution: "It`s not posible to get that functionality in Django". No one could demostrate with example code.If you find something, please send me the code. Thanks   Gabriel Araya GarciaGMI - Desarrollo de Sistemas Informáticos  El dom., 17 may. 2020 a las 20:15, Ahmed Khairy () escribió:Hi all, I need some help writing the ajax for a like button instead of refreshing every time a like is posted  here is the template:  {% csrf_token %}{% if user.is_authenticated %}{% if liked %} Unlike button>{% else %} Like button>{% endif  %}{% else %} Logina> to Like small>{{total_likes}} Likes strong>{% endif %}form>  Here is the urls:path('like/', LikeView, name='like_post'), here is the views:def LikeView(request, pk):post = get_object_or_404(Post, id=request.POST.get('post_id'))like = Falseif post.likes.filter(id=request.user.id).exists():post.likes.remove(request.user)like = False else:post.likes.add(request.user)like = Truereturn redirect('score:post-detail', pk=pk) class PostDetailView(DetailView):model = Posttemplate_name = "post_detail.html" def get_context_data(self, *args, **kwargs):context = super(PostDetailView, self).get_context_data() stuff = get_object_or_404(Post, id=self.kwargs['pk'])total_likes = stuff.total_likes() liked = Falseif stuff.likes.filter(id=self.request.user.id).exists():liked = True context["total_likes"] = total_likescontext["liked"] = likedreturn context   -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/00707977-9b68-4329-a13d-adb9ab7b8813%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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAKVvSDCuegzvsZQ_Rfms3yMA_EO914T0yJ_n929mnx7bNDodUA%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/76f6356b-17bc-4697-b6cf-966f01e9217f%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/CAHV4E-fDsKvr77YCUwjttDQJ7nx6f9%2Bj0ZZCByUa1Ygr%3DOoY1Q%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/5ec22272.1c69fb81.dac63.72cc%40mx.google.com.


RE: Re: How to resize image from Django ckeditor_uploader in the HTML template while rendering?

Sorry, I’ m just a beginner in Django but I think what you need to look at is the “Fetch API”. https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API.  https://www.youtube.com/watch?v=c3qWHnJJbSYYou can send an image through your view as HttpResponse(image_object in bytes/base64 format) object if request==”your desired one”. Then instead of your page reloading the fetch API will receivethe response and then you can use insertAdjacentHtml. For more details you can check the Django IRC channel   #django->https://webchat.freenode.net/ and ask there.  Sent from Mail for Windows 10 From: Ali AhammadSent: 18 May 2020 18:02To: Django usersSubject: Re: How to resize image from Django ckeditor_uploader in the HTML template while rendering? thanx for your reply. i am using pillow in my profile app. but the main issue is with ckeditor_uploader as you know i have to use RichTextUploadingField(). besides it i have to mention in urls.py and i have to render it corresponding variable name in the template. my main goal was if i upload any picture in body=RichTextUploadingField() in localhost/admin, i want to render the image and the text contents separately. in this case i couldn't find any document where i can learn about it. i tried to use ckeditor widgets but it just customizing the ckeditor toolbar. i dun want this and i am happy with what i have for now. so is there any way to render the uploading pic and resize and positioning in html template according to my own design? text can be separated and truncatchar:400 or 500 which i kew already. but i would like to separate the image from the text of the body. i hope you understand my problemOn Monday, May 18, 2020 at 12:49:53 PM UTC+1, Vishesh Mangla wrote:You can resize an image using the Pillow library or open-cv. Sent from Mail for Windows 10 From: Ali AhammadSent: 17 May 2020 22:45To: Django usersSubject: How to resize image from Django ckeditor_uploader in the HTML template while rendering? I am using Django ckeditor_uploader to make a post view for a blog. But while rendering in the template I wanted to render image separately from the post content texts. My main goal is to set the image separately on the template on top and resizing it. And I can set more pictures inside the post  but the top one will be highlighted and rendered in different HTML page. Is there any way? I tried to use ckeditor widget but it is just customizing the toolbar of ckeditor Please let me know if you have any idea  -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4b148528-7b15-4d39-8763-5f3a0f1931b6%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/44ef45ba-68ce-4e08-a516-c7ff1a827ff5%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/5ec28c14.1c69fb81.ee3cc.aa1a%40mx.google.com.


RE: Re: required help to save SECRET_KEY and Third party Private API key

Why don’t you use the decouple module? Use it and add it to your gitignore.  Sent from Mail for Windows 10 From: Anirudh choudharySent: 19 May 2020 13:14To: django-users@googlegroups.comSubject: Re: required help to save SECRET_KEY and Third party Private API key thanks for your answer  after your answer, I have tried to edit the ~/.profile file and /etc/profile/ but still, I can't see my key inside my VM instance  i am putting  SECRET_KEY="jhsgdjadtad876s87dsadsad7sa"  in the above file .but when i run the command "env" i can see my key  thankyou  On Tue, May 19, 2020 at 10:54 AM Akshat Zala  wrote:You can refer the link below: 1. https://cloud.google.com/community/tutorials/secrets-manager-python On Tuesday, 19 May 2020 10:26:17 UTC+5:30, Anirudh choudhary wrote:Hello everyone  I am hosting my website on google cloud platform on Ubuntu VM instance. I cannot find a way to set the environment variable in the machine  Like when I type on my local machine os.environ.get("SECRET_KEY") it give me the key but when I type the same command on VM instance it shows me null  I have tried some method like to edit the 1./etc/environment 2.~/.bashrc but none of the files is giving me the secret Key  waiting for expert answer  thankyou -- 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/0e4dbe3c-7b38-4e61-8e64-f96dc2c44dd3%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/CAL8_rkHAv1qmfW%3DzWao92cHs2jDFsSGNEv21Fg%3D6FF%3DAo8PjuA%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/5ec39d35.1c69fb81.be2f9.1767%40mx.google.com.


RE: How to pass a variable to views from a template using href ?

In your views.py check “dir” on request.GET object to see what you have got.  Sent from Mail for Windows 10 From: ratnadeep raySent: 19 May 2020 18:44To: Django usersSubject: How to pass a variable to views from a template using href ? Hi all,  My requirement is to pass a variable to the view from the template using href.  For example, I have written the following line of code:  value="SQL">SQL data So using the above line, can we send the value "SQL" clicking on the link of "SQL data" to the method "execute" written in the views? If not, then what way can I do so?  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/7e892826-f4c1-426d-bf9b-1a1b0b2b17be%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/5ec3ddc5.1c69fb81.fa4e6.ace5%40mx.google.com.


RE: NEW TO DJANGO

Your question is not clear to me. What exactly do you want ?You do not require django to go to a site , rather you require a hyperlink.  Sent from Mail for Windows 10 From: Madhav NandanSent: 19 May 2020 20:34To: django-users@googlegroups.comSubject: NEW TO DJANGO Dear Django fellas, I'm new to Django here. I started learning and it's been a while and I'm facing a lot of issues. Can somebody help me with ''how can I integrate a payment system like PayPal to a link?'' Like I have a link, if someone clicks on that link that will redirect the user to the payment page and there on the payment provider works. I just need to get started and somebody can guide me here hopefully. I don't' need code or so. Help me here. Best regards,-- Madhav Nandancell: 9170459494Skype: gaurav.kumar3992 -- 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/CAGXYL6JYzv%3DvTRNXc1ZqSvJ-6S%3DOSJt%2B%3D_%3DhLqvwyaD0Z_NoDA%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/5ec3f74c.1c69fb81.5e199.c04c%40mx.google.com.


RE: Re: how to use youtube links in my website

 Why just you not use the html5 video tag?Sent from Mail for Windows 10 From: Christian LedermannSent: 20 May 2020 15:16To: django-users@googlegroups.comSubject: Re: how to use youtube links in my website I would retrieve the RSS from YouTube, and process it server side with feedparser and render it in django https://pypi.org/project/feedparser/https://feeder.co/knowledge-base/rss-feed-creation/youtube-rss/  On Sat, 16 May 2020 at 01:35, John McClain  wrote:Can't you just use the script in the body section for this on the html page you want the video in view on. On Fri, 15 May 2020 at 20:17, Bunti  wrote:I want to make website to show the all the videos of my Youtube channel  PLAYLISTS. I mean to say that all of my Youtube videos should be linked to my website.  Can I get any  video tutorial of such type of project with Django?(I have learned Django upto some level. I can do CURD by function and Generic Views, user registration, password update by email etc.)  -- 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/96d8272e-7b5e-4e04-94ad-7b80f9a0ed87%40googlegroups.com. -- John McClainCell: 085-1977-823Skype: jmcclain0129Email: jmcclain0...@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/CAN-hv_qsELgRoZDTwS0HU2i9AWFSgBQLE0XcVRuY7GAADHo25w%40mail.gmail.com. -- Best Regards,Christian LedermannNewark-on-Trent - UKMobile : +44 7474997517https://uk.linkedin.com/in/christianledermannhttps://github.com/cleder/<*)))>{If you save the living environment, the biodiversity that we have left,you will also automatically save the physical environment, too. But Ifyou only save the physical environment, you will ultimately lose both.1) Don’t drive species to extinction2) Don’t destroy a habitat that species rely on.3) Don’t change the climate in ways that will result in the above.}<(((*>-- 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/CABCjzWpFDyDY%2BJoESkV_ND8QGFWE8T1mU%2BX9KEnBuAhC7SBSqQ%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/5ec51059.1c69fb81.24e0b.69ae%40mx.google.com.


RE: Add search to my blog app

Hi if you want a search bar you need _javascript_ which will do the dynamic stuff. Add an event listener to you  of html and use “change” as the event. Then you need to insert and remove elements on the DOM based on the text in the search box. For more info ask on  https://webchat.freenode.net/ in the #_javascript_.  Sent from Mail for Windows 10 From: sunday honestySent: 20 May 2020 21:45To: Django usersSubject: Add search to my blog app Hello everyone! I have got a question. I am a Django beginner trying to build my first web app after completing a book. I made an app I called developers forum where authenticated users can post something like question or code achievement and another can comment in form of answer.I want to add a search functionality which was not covered in the tutorial.I browsed out and found how I could add the search but the search results will be displayed to a designated urls created for the purpose. I want to be able to redirect the searcher to the exact post containing the keyword they have typed in the search form with the text highlighted. How can I achieve that... If you need any pieces of my code to be able to help me, be kind to ask me; I'll post a link to where you can find it.Thanks in advance. -- 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/cdbf7038-480e-446f-aeac-e079ad575e47%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/5ec559c3.1c69fb81.ccc5c.9d57%40mx.google.com.


RE: Re: NEW TO DJANGO

Haven’t you used the redirect() function in Django? Sent from Mail for Windows 10 From: Madhav NandanSent: 20 May 2020 22:19To: Django usersSubject: Re: NEW TO DJANGO I need to know what I should do so that once I click a hyperlink, it will redirect me to a payment page and I need to make a working payment option like paypal integration or razorpay integration. I did installed sdk, I made account on razorpay. what next? thanks for response. From: Madhav NandanSent: 19 May 2020 20:34To: django...@googlegroups.comSubject: NEW TO DJANGO Dear Django fellas, I'm new to Django here. I started learning and it's been a while and I'm facing a lot of issues. Can somebody help me with ''how can I integrate a payment system like PayPal to a link?'' Like I have a link, if someone clicks on that link that will redirect the user to the payment page and there on the payment provider works. I just need to get started and somebody can guide me here hopefully. I don't' need code or so. Help me here. Best regards,-- Madhav Nandancell: 9170459494Skype: gaurav.kumar3992 -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGXYL6JYzv%3DvTRNXc1ZqSvJ-6S%3DOSJt%2B%3D_%3DhLqvwyaD0Z_NoDA%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/63a1a453-ee38-4eba-85f7-a4d6f46c367d%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/5ec55fec.1c69fb81.99dba.9ce0%40mx.google.com.


RE: Re: NEW TO DJANGO

  Sent from Mail for Windows 10 From: Madhav NandanSent: 20 May 2020 22:19To: Django usersSubject: Re: NEW TO DJANGO I need to know what I should do so that once I click a hyperlink, it will redirect me to a payment page and I need to make a working payment option like paypal integration or razorpay integration. I did installed sdk, I made account on razorpay. what next? thanks for response. From: Madhav NandanSent: 19 May 2020 20:34To: django...@googlegroups.comSubject: NEW TO DJANGO Dear Django fellas, I'm new to Django here. I started learning and it's been a while and I'm facing a lot of issues. Can somebody help me with ''how can I integrate a payment system like PayPal to a link?'' Like I have a link, if someone clicks on that link that will redirect the user to the payment page and there on the payment provider works. I just need to get started and somebody can guide me here hopefully. I don't' need code or so. Help me here. Best regards,-- Madhav Nandancell: 9170459494Skype: gaurav.kumar3992 -- 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...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGXYL6JYzv%3DvTRNXc1ZqSvJ-6S%3DOSJt%2B%3D_%3DhLqvwyaD0Z_NoDA%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/63a1a453-ee38-4eba-85f7-a4d6f46c367d%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/5ec5605b.1c69fb81.9a1f5.8ba9%40mx.google.com.


RE: Re: Add search to my blog app

Then you have a better option to learn react(a frontend framework for _javascript_). You cannot do dynamic stuff on the web without using _javascript_. Sent from Mail for Windows 10 From: sunday honestySent: 20 May 2020 21:57To: django-users@googlegroups.comSubject: Re: Add search to my blog app I don't know _javascript_ On Wed, May 20, 2020, 5:25 PM Vishesh Mangla <manglavishes...@gmail.com> wrote:Hi if you want a search bar you need _javascript_ which will do the dynamic stuff. Add an event listener to you  of html and use “change” as the event. Then you need to insert and remove elements on the DOM based on the text in the search box. For more info ask on  https://webchat.freenode.net/ in the #_javascript_.  Sent from Mail for Windows 10 From: sunday honestySent: 20 May 2020 21:45To: Django usersSubject: Add search to my blog app Hello everyone! I have got a question. I am a Django beginner trying to build my first web app after completing a book. I made an app I called developers forum where authenticated users can post something like question or code achievement and another can comment in form of answer.I want to add a search functionality which was not covered in the tutorial.I browsed out and found how I could add the search but the search results will be displayed to a designated urls created for the purpose. I want to be able to redirect the searcher to the exact post containing the keyword they have typed in the search form with the text highlighted. How can I achieve that... If you need any pieces of my code to be able to help me, be kind to ask me; I'll post a link to where you can find it.Thanks in advance. -- 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/cdbf7038-480e-446f-aeac-e079ad575e47%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/5ec559c3.1c69fb81.ccc5c.9d57%40mx.google.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/CALcuGNv0LBJeQxZB04xyWCDvTgoo5zN82Nf_7bqpomAbQWwAFQ%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/5ec560b5.1c69fb81.18b72.a8fe%40mx.google.com.


RE: Add search to my blog app

_javascript_ it that needs to be done dynamically otherwise redirect() Sent from Mail for Windows 10 From: Ali AhammadSent: 20 May 2020 22:32To: Django usersSubject: Add search to my blog app At first you should make search search template where you should put what and how you want display Then you should write a views.py function where you should usequery=request.GET[‘queer’]Object_list=Post.objects.filter(title__icontains=query)*same for the content If you want and then you should use union*Return render(request,’search.html’,{ ‘object_list’:object_list,’query’:query}) Then in the sign.html use ur home.html or anything and write according to your requirement You don’t need to use java -- 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/277d37ed-188f-4ad1-960a-e4f5eceee3d0%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/5ec562fc.1c69fb81.b8149.a086%40mx.google.com.


RE: Add search to my blog app

Or one thing you can do w/o _javascript_, that is send a post request to the server through a form and then redirect to a view with a blog matching that search query.  Template: {{csrf_token}} //see the correct template tagSubmit Views:def index(request):    if request.method ==”POST”:    search_query = request.POST[“search”]    //Suppose search query is blog_1   If search_query[-1] == 1:   return httpResponse(“blog1”)    return //default index.html   Sent from Mail for Windows 10 From: Ali AhammadSent: 20 May 2020 22:32To: Django usersSubject: Add search to my blog app At first you should make search search template where you should put what and how you want display Then you should write a views.py function where you should usequery=request.GET[‘queer’]Object_list=Post.objects.filter(title__icontains=query)*same for the content If you want and then you should use union*Return render(request,’search.html’,{ ‘object_list’:object_list,’query’:query}) Then in the sign.html use ur home.html or anything and write according to your requirement You don’t need to use java -- 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/277d37ed-188f-4ad1-960a-e4f5eceee3d0%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/5ec5630d.1c69fb81.1f3d5.4cfd%40mx.google.com.


RE: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form.

#template   

Document.querySelector(“select”).addEventListener(“change”,(ele)={

If ele.target.textContent ==”Volvo”:

    ..

Else if

...

Else

...

})

  Otherwise just send a form to pick the user preference out of Basic, Standard, Advanced, get the request and based on the request’s attributes send a form back through redirect function. Sent from Mail for Windows 10 From: SaiSent: 21 May 2020 10:00To: Django usersSubject: How to invoke Sub Form which have MULTIPLE OPTIONS to choose inside Django Form. Hi Everyone, I am pretty much familiar with Django Forms with models. I want to build a Submit Form which consists of attributes like UserName, Email, address field and 3 options to select the packages, for example, Basic, Standard, and Advanced.  I have gone through Django Docs but there is no such thing. Please let me know how to achieve this and open to ideas.  Thank You in Advance.-- 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/cb12fc88-0d5a-4ec4-a6d6-1272a0a69d9a%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/5ec6100b.1c69fb81.97f6e.083a%40mx.google.com.


RE: Please help me out?

You need to look at the “header” of the request object for those details. Sent from Mail for Windows 10 From: meera ganganiSent: 21 May 2020 10:39To: django-users@googlegroups.comSubject: Please help me out? I want to mark the attendance of employee using ip address or any other waycan you please help me out of the situation? Thanking You,Meera.-- 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/CANaPPPJY3JypYQaWbbx%3DNQe6SyUghvXXRRF4SK3iER0N0wa0OQ%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/5ec61042.1c69fb81.acd42.0c85%40mx.google.com.


RE: connect to mongodb

NoSQL databases vs SQL databases. What to choose? MongoDB is a NoSQL database. Features include fast searching but slow insertion deletion operations upto what I remember. You can google on “what to choose between SQL and NoSQL databases”. It depends on what kind of operations the system would be most frequently doing.Otherwise  visit https://django-mongodb-engine.readthedocs.io/en/latest/Sent from Mail for Windows 10 From: saifullah khanSent: 22 May 2020 02:34To: Django usersSubject: connect to mongodb how can integrate mongodb with django. And is it a good idea?-- 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/77b2d9de-ef7d-4874-a0ee-a77bf450a0dd%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/5ec6eede.1c69fb81.8377.8ce9%40mx.google.com.


RE: connect to mongodb

NoSQL databases vs SQL databases. What to choose? MongoDB is a NoSQL database. Features include fast searching but slow insertion deletion operations upto what I remember. You can google on “what to choose between SQL and NoSQL databases”. It depends on what kind of operations the system would be most frequently doing.Otherwise  visit https://django-mongodb-engine.readthedocs.io/en/latest/Sent from Mail for Windows 10 From: saifullah khanSent: 22 May 2020 02:34To: Django usersSubject: connect to mongodb how can integrate mongodb with django. And is it a good idea?-- 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/77b2d9de-ef7d-4874-a0ee-a77bf450a0dd%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/5ec76727.1c69fb81.aa6cf.cfe8%40mx.google.com.


RE: JSON file

I ‘m not sure if that is a JSON file because a JSON file is nothing but a python dictionary like structure and that doesn’t seem to be that. Anyways you can see python’s building json module’s json.dumps() function. Sent from Mail for Windows 10 From: HJSent: 22 May 2020 23:18To: Django usersSubject: JSON file hello django users hope you are doing well  I want to do a highchart using a json file , and that's the problem I am facing , I want to create a json file in my views.py based on my columns below "countDeliveries"and "Dates" class mail_item_count_deliveries_perDate(models.Model):    countDeliveries = models.IntegerField(default=0)    Dates = models.DateTimeField() myJSON file should be something like that: [        [                Dates,                countDeliveries        ],        [                116769600,                5        ], - can you guys help me out -- 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/65341e88-88b1-480f-9d9a-39ce909ee4da%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/5ec81901.1c69fb81.33bd5.fa47%40mx.google.com.


RE: how to use .py file function via html or css button from django template

You can create a .py file in the same location where your views.py file is.Then to import any function from there in the views.py you can use,from  import I rather prefer to make a folder structure like templates/ and static/ And name it backend/my_appThen inside there I store all the .py filesThen in views I usefrom .backend.my_app import module_nameSent from Mail for Windows 10 From: THIRUMALAIVASAN KSent: 23 May 2020 17:03To: Django usersSubject: how to use .py file function via html or css button from django template Hi,  i have created a site for local use and i need to run some some python script  when i click the button , how to do that   i am using on raspberry  to contoll something via dashboard , so i am used django to create a site but i can't ontroll the GPIO pin's via website button-- 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/0f01c9a8-60fb-4597-9170-c896e18058c5%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/5ec91644.1c69fb81.c2d43.4742%40mx.google.com.


RE: Error while trying to send email for password reset

\u...    represents a Unicode character and you are using an ascii-decoder to decode it.Consider using encoding=”utf-8”. Sent from Mail for Windows 10 From: sunday honestySent: 24 May 2020 21:09To: Django usersSubject: Error while trying to send email for password reset I got the following error while trying to send email with send grid smtp UnicodeEncodeError: 'ascii' codec can't encode character '\u2020' in position 168: ordinal not in range(128) -- 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/e3baf159-4247-413a-89cf-7c1993aee2b1%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/5ecb3208.1c69fb81.b1a28.755f%40mx.google.com.


RE: Please help me pip install mysqlclient time screenshot image this error

See the last photo, it says Microsoft Visual C++ 14 required. You are surely using win 7. Please try install Visual studio community version  https://visualstudio.microsoft.com/vs/. Sent from Mail for Windows 10 From: R D SainiSent: 26 May 2020 22:40To: Django usersSubject: Please help me pip install mysqlclient time screenshot image this error  -- 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/a204a4ea-a42d-472e-a9e3-08d339bd8486%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/5ecd5ecc.1c69fb81.3fb32.0f71%40mx.google.com.


RE: RES: Please help me pip install mysqlclient time screenshot image this error

Sorry for duplicate answer. I posted late. Sent from Mail for Windows 10 From: Samuel NogueiraSent: 26 May 2020 22:49To: django-users@googlegroups.comSubject: RES: Please help me pip install mysqlclient time screenshot image this error In the error shows that you don’t have visual C++ 14.0 installed in your machine, have you already verified if you have it or not? Try to install the especified version and them try the pip command again. Enviado do Email para Windows 10 De: R D SainiEnviado:terça-feira, 26 de maio de 2020 14:10Para: Django usersAssunto: Please help me pip install mysqlclient time screenshot image this error  -- 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/a204a4ea-a42d-472e-a9e3-08d339bd8486%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/5ecd4f73.1c69fb81.6a4d9.1d07%40mx.google.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/5ecd5f31.1c69fb81.c9f40.0bee%40mx.google.com.


RE: Please help me out!!!!!

Href="" url ‘ name’%}Where name is the name parameter of the view in urls.py. Urlpatterns=[path(“/myview”, views.myview, name=”myview”)] In this caseHref="" url ‘ App_name/myview’%}Write your app name in App name Sent from Mail for Windows 10 From: meera ganganiSent: 03 June 2020 12:49To: django-users@googlegroups.comSubject: Please help me out! Hello Django-users href is not workinghere is my views.py file and my urls.py file Please Help me out!! Thank you in advance-Meera-- 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/CANaPPPLbk6JV8tQjxkKUiN-H%3D_JLHjztMQfGLK6oUx9ootEojg%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/B95F9502-B7D0-49C6-8E4E-0C3B2F80EF21%40hxcore.ol.


RE: Any free MAP API available

There’s map-box too if you w’d like to use it.  https://www.mapbox.com/ Sent from Mail for Windows 10 From: meera ganganiSent: 04 June 2020 09:22To: django-users@googlegroups.comSubject: Re: Any free MAP API available you can use Geo-Django Library available in django  On Thu, Jun 4, 2020 at 3:15 AM Ram  wrote:Hi, We need to add location map based on the zip code in our DJango web application. Is there any free API available out there? if you have used it already could you suggest one? Thanks,~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%2BOi5F02G9gW64FAPfKYHjEGf28hp34ePmg%3Dd%2BtVtHNSEs%2BqQg%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/CANaPPPKaoD3WGBis436dRPzyc96UsKq6SUg8RfyFV%2BkvPC1gsA%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/5C45CF8F-5DA7-4933-A87F-BC3CAA3CDCC5%40hxcore.ol.


RE: How to convert the static image files of a readymade template to dynamic

First of all, if you will use .css file, it would be better. In that you can include image the usual way.But still if you would like it as inline element thenn use “...{% url ‘’ %}...”. Mind the single commas and double commas.Sent from Mail for Windows 10 From: Rabbi RabbiSent: 05 June 2020 20:57To: Django usersSubject: How to convert the static image files of a readymade template to dynamic Please help me to fix this. Do I need to use a double quotation before and after the .jpg link? -- 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/9abe66f6-06d2-4851-a41c-b45ab129033bo%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/CD689EDE-504B-44D6-B043-685D0F7F50D4%40hxcore.ol.


RE: Required Python Django developers

Hi, I m interested but I started Django a few months ago only but know about models, forms, html, css, _javascript_. I don’t have any full projects but do know tensorflow and OpenCV too.I know GitHub.  Try considering me. I might not be an expert but am good enough. Sent from Mail for Windows 10 From: SHUBHAM .SINGH. RATHORESent: 06 June 2020 22:21To: django-users@googlegroups.comSubject: Re: Required Python Django developers I am interested  On Sat, 6 Jun 2020, 8:45 pm Appu Yadav,  wrote:hii i am interested On Sat, 6 Jun 2020, 20:39 maninder singh Kumar,  wrote:Dear all, We require python django developers for a HR project.  Please answer to maninder.s.ku...@gmail.com if interested. regardsWilly-- 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/CABOHK3R1pdwbzavYP48KA_g_pLm_5kkqNSxwhGdcRf4mfetw6w%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/CAF_eevdaFN2s3XugAyH4ZSkOzv1KWUc1ZmHLQG%3DQmROhH5Wa6Q%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/CALkhXJWegzFr4jx2gXM3c2NuYbWy%2B2vYLhReJC5oLoNy54SCAA%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/65EDBF18-1C3D-44B7-996B-0E2C28EBFAB9%40hxcore.ol.


RE: Need your help!!

What kind of security? Sent from Mail for Windows 10 From: meera ganganiSent: 15 June 2020 22:28To: django-users@googlegroups.comSubject: Need your help!! Hello ,                  How to apply security in django application and  how to secure django applications Thanks in advance -Meera Gangani-- 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/CANaPPPLr9DJstjDvYOOrddtY4fcfNLs7xgudWfJ1aFhkROL0GA%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/6B653CD7-68CB-4C56-9FB3-034FF4902547%40hxcore.ol.


RE: Django Saving a form with Imagefield on shared host

One thing that can be done is to save the image as a base64 string in the database. https://stackoverflow.com/questions/3715493/encoding-an-image-file-with-base64 Sent from Mail for Windows 10 From: MUGOYA DIHFAHSIHSent: 14 June 2020 19:15To: Django usersSubject: Django Saving a form with Imagefield on shared host I am working on django project and now i have deployed it with NamecheapWhen i submit a form that does not have an ImageField, the form submits successfully on the shared hostbut when i submit a form with one of the fields ImageField, it raises 404 error.but on the localhost, the forms work perfectly.what can i do to submit such forms on a shared host.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/b79bb9b5-46b4-43eb-9ea5-3eaab14336ddo%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/3F4C1D42-FB11-49A2-8A6E-BF990EE847AD%40hxcore.ol.


RE: why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views

If your wish whatever you want to use, all you have to use is the “request” variable that Django gives you. Btw see “generic views”.  Sent from Mail for Windows 10 From: yashwanth balanaguSent: 18 June 2020 12:23To: Django usersSubject: why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views-- 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/4e4b1e4b-1a59-43d9-8835-4992e986f943o%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/42275F4A-510E-4C3B-B5CA-14C4D4156228%40hxcore.ol.


RE: Please help me out!

See Django messages Sent from Mail for Windows 10 From: meera ganganiSent: 19 June 2020 12:01To: django-users@googlegroups.comSubject: Please help me out! Hello ,              I want to implement a Notification module in my Project could you please help me out!  Thank you-Meera Gangani-- 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/CANaPPPJJq_r9AZqeQACGqMpGjPzzx1sJA%3DLQr-K3FJ6s4%3DQkbA%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/0DD42743-FD68-417A-9AB2-C78FD56B2FDB%40hxcore.ol.


RE: GSoD 2020

Although it has been just a few months for me learning Django, and although a lot of people on #django and #python on IRC say that Django docs are easier but I really felt it difficult to understand the required stuff in the docs without having good knowledge of Django. For example I was interested in using class based views and didn’t know where you get started, the polls app provided almost no information and the best resource I could find after the very basic example was http://ccbv.co.uk/projects/Django/3.0/django.views.generic.edit/FormView/#get_context_data .I really feel the docs aren’t easy for a beginner and even now when I know Django a bit. I also remember when I wanted to use Formset and I wasted time on understanding management form which was put like at the end of the docs page. Well, it would be good to add “accordian” element in the docs so that a user can choose a title of whatever they want and explore that topic, it w’d also make it easier for writers to extend a section. Sent from Mail for Windows 10 From: Spring-dotSent: 19 June 2020 18:36To: Django usersSubject: Re: GSoD 2020 Please!!! Someone help!!! I know the basics but cannot find project ideas for GSoD 2020. Do we have to write our own idea for improving the documentation?On Wednesday, June 17, 2020 at 11:01:09 PM UTC+5:30, Spring-dot wrote:What are the project ideas for contributing to Django for GSoD, 2020? Anyone who can guide me in this? Please Help!!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/31a08f56-e75d-437b-b07f-9e86d2630414o%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/AED23B45-6C1C-4321-A047-1B3B6B8970CB%40hxcore.ol.


RE: Help me out please

Easiest solutionhttps://www.w3schools.com/html/html5_geolocation.asp  Otherwise GeoDjango might have something Sent from Mail for Windows 10 From: meera ganganiSent: 20 June 2020 14:03To: django-users@googlegroups.comSubject: Help me out please Hello ,     I am working on attendance module in HR Project, So I implement something new, so as employee enter in the office and login to his system and click on to the check-in button his/her attendance will be marked,     So that's why we need Map APi, First of all we want to find Longitude and latitude of our building, so we can mark his/her attendance,  so please can you help me out in troubled situation      At least you can give some sort of idea of what I will use to implement this  Thanking you in advance -Meera Gangani-- 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/CANaPPPJkTDyd%3DPdW5SoaVCwaKB%2BJKv0kqnid4EXFwYrrPF1X7g%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/805D1B9A-9026-46DB-B917-22F7357D325C%40hxcore.ol.


Re: Manage.py not working

https://docs.djangoproject.com/en/3.0/intro/tutorial01/Please follow
this.

On Sat, Jun 20, 2020 at 9:34 PM ankit baliyan 
wrote:

> First of all go to test1 folder then run this command.
>
> On Sat, 20 Jun, 2020, 9:11 pm Tanisha Jain, 
> wrote:
>
>> Hi everyone,
>> I am new to Django platform. Whenever I am trying to create a new app
>> using  ( python manage.py startapp app1) then I am not able to create app.
>> Neither I get any error message in logs. Can someone plz suggest me what to
>> do now?
>>
>> --
>> 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/6b4c856f-0849-409a-b77a-b31038572aado%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/CAH0koywoY3YnV2NH7uf3_JXamooJuE2a3Ri27eseurvJ2o7MOA%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/CACaE8x7rTaLjDMkY7i9-qTBCzYzFWZBzzwbcS5mvjZ1_owXndw%40mail.gmail.com.


RE: Manage.py not working

Isn’t test1 the ‘name’ that you had put in ‘django-admin startproject  ’? Then after this you are supposed to change directory and get into  where you find a folder with  again. Then you make an app with “python manage.py startapp ” I can’t see any apps there. Also you need to put your ‘appname’ under INSTALLED APPS =[  ,] in settings.py in  folder where manage.py is.   Sent from Mail for Windows 10 From: Tanisha JainSent: 20 June 2020 21:53To: django-users@googlegroups.comSubject: Re: Manage.py not working I am already in test1 folder... Please check the terminal section in the attached screenshot.  On Sat, 20 Jun, 2020, 9:34 PM ankit baliyan,  wrote:First of all go to test1 folder then run this command. On Sat, 20 Jun, 2020, 9:11 pm Tanisha Jain,  wrote:Hi everyone,I am new to Django platform. Whenever I am trying to create a new app using  ( python manage.py startapp app1) then I am not able to create app. Neither I get any error message in logs. Can someone plz suggest me what to do now?-- 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/6b4c856f-0849-409a-b77a-b31038572aado%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/CAH0koywoY3YnV2NH7uf3_JXamooJuE2a3Ri27eseurvJ2o7MOA%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/CAF1kx9nAtUe_ox%2BVe5ccyRiC68%2BCThJA-iL6cMFTO52EgFm0QQ%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/02371E28-228E-4CDF-B317-AB995DD52446%40hxcore.ol.


RE: Manage.py not working

I meant INSTALLED APPS= [], a correction. Sent from Mail for Windows 10 From: Vishesh ManglaSent: 20 June 2020 22:31To: django-users@googlegroups.comSubject: RE: Manage.py not working Isn’t test1 the ‘name’ that you had put in ‘django-admin startproject  ’? Then after this you are supposed to change directory and get into  where you find a folder with  again. Then you make an app with “python manage.py startapp ” I can’t see any apps there. Also you need to put your ‘appname’ under INSTALLED APPS =[  ,] in settings.py in  folder where manage.py is.   Sent from Mail for Windows 10 From: Tanisha JainSent: 20 June 2020 21:53To: django-users@googlegroups.comSubject: Re: Manage.py not working I am already in test1 folder... Please check the terminal section in the attached screenshot.  On Sat, 20 Jun, 2020, 9:34 PM ankit baliyan,  wrote:First of all go to test1 folder then run this command. On Sat, 20 Jun, 2020, 9:11 pm Tanisha Jain,  wrote:Hi everyone,I am new to Django platform. Whenever I am trying to create a new app using  ( python manage.py startapp app1) then I am not able to create app. Neither I get any error message in logs. Can someone plz suggest me what to do now?-- 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/6b4c856f-0849-409a-b77a-b31038572aado%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/CAH0koywoY3YnV2NH7uf3_JXamooJuE2a3Ri27eseurvJ2o7MOA%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/CAF1kx9nAtUe_ox%2BVe5ccyRiC68%2BCThJA-iL6cMFTO52EgFm0QQ%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/02371E28-228E-4CDF-B317-AB995DD52446%40hxcore.ol. 



-- 
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/41344884-654A-4A2A-9469-B59DA35D1F4D%40hxcore.ol.


RE: Django Uploaded images not displayed in production

Hi, first of all welcome on this group. Secondly you can also try https://webchat.freenode.net/  on the #django channel but you first need to register there by asking on #freenode channel. Regarding your problem, images are static files and you should put them in static//your_desired_path to be detectable not media if they are part of your templates. Use src="" url “your_desired_path %} and don’t forget to put {% load static %} at the top of your template. Sent from Mail for Windows 10 From: Anton NyagolovSent: 21 June 2020 22:29To: Django usersSubject: Django Uploaded images not displayed in production Hello everyone, I just discovered this group through Google.I couldn't get any help on stack overflow and hopefully someone here can help. I have deployed a Django App on a Ubuntu server for the first time using Nginx and gunicorn. Before deployment, I used port 8000 to test if everything runs as it is supposed to and all was fine. Since I allowed 'Nginx Full' my database images are not showing up. This is my django project structure:My virtual environment folder and my main project folder are both in the same directory. I have separated them. ```python# Create your models here.class Project(models.Model):    project_name = models.CharField(max_length=120)    project_description = models.CharField(max_length=400)    project_link = models.CharField(max_length=500)    project_image = models.ImageField(upload_to='')    def __str__(self):    return self.project_name``` I have set up my settings.py to :```python# Build paths inside the project like this: os.path.join(BASE_DIR, ...)BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))STATIC_URL = '/static/'STATIC_ROOT = os.path.join(BASE_DIR, 'static')MEDIA_URL = '/media/'MEDIA_ROOT = os.path.join(os.path.dirname(__file__), '..', 'media').replace('\\','/')```My view gets all the project object from a database and passes those to the template. The template renders successfully all other information related to project model except the image field . In my template I do: ```html  {% for project in projects %}    {% if forloop.counter|mod:2 == 0 %}      {% else %}      {% endif %}      alt="Image could not be found :(" style="height:120px; width:166px !important;" />      {{ project.project_name }}  {{ project.project_description}}  Link        {% if forloop.counter|mod:2 == 0 %}    {% endif %}  {% endfor%}      ```Uploading the images works, it sends them in the project's media directory, the problem is that they are not showing up, the alt="" is activated. My main urls.py: ```pythonurlpatterns = [ path('', include('project.urls')),    path('admin/', admin.site.urls),]  + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)```The gunicorn system file:```[Unit]Description=gunicorn daemonAfter=network.target[Service]User=myusernameGroup=www-dataWorkingDirectory=/home/myusername/myprojectExecStart=/home/myusername/venv/bin/gunicorn --access-logfile - --workers 3 --bind unix:/home/myusername/myproject/myproject.sock myproject.wsgi:application[Install]WantedBy=multi-user.target```Nginx setup:```  server {    listen 80;    server_name  ;    location = /favicon.ico { access_log off; log_not_found off; }    location /static/ {    root /home/myusername/myproject;    }    location / {    include proxy_params;    proxy_pass http://unix:/home/myusername/myproject/myproject.sock;    }    }```EDIT: When inspecting the image element of the webpage the source of the image it is "/media/imageNmae.png". Any help would be 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/635fcf7e-6e53-425d-aad1-8638fef425c1o%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/CCDBA280-8772-4A69-9698-430CB19A687A%40hxcore.ol.


RE: Django Uploaded images not displayed in production

Sorry, I misunderstood your problem. But can you also show your views.py. Also your path to MEDIA_ROOT is obfuscated. I used MEDIA_ROOT = os.path.join(BASE_DIR, 'media'). I thing this shall be sufficient to do for a try.  Sent from Mail for Windows 10 From: Anton NyagolovSent: 21 June 2020 22:46To: Django usersSubject: Re: Django Uploaded images not displayed in production Thanks I will check out the group too for future reference and etc. Those images are uploaded to a database and are part of a model. I iterate through all the object and for each object I print some information including the images, therefore I cannot specify only one specific image. I use admin so I can add my (new future) projects and only by admin they should be able to display automatically on my website with all the information and structure required. Do you sugest changing the value of the imageField (upload_to="static//my_desired_path) ? -- 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/d4758123-f506-401b-b488-c3f17385d9fco%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/C64216E4-101F-4398-8264-9499B18F82C2%40hxcore.ol.


RE: Django Uploaded images not displayed in production

If the issue is managing static files on the server simply installing Django-heroku saved me from all that trouble. Sent from Mail for Windows 10 From: Rob RiedlingerSent: 21 June 2020 23:40To: Django usersSubject: Re: Django Uploaded images not displayed in production Check out this video  https://youtu.be/kBwhtEIXGII  Denis talks about why this happensOn Sunday, June 21, 2020 at 7:15:43 PM UTC+2, Anton Nyagolov wrote:Thanks I will check out the group too for future reference and etc. Those images are uploaded to a database and are part of a model. I iterate through all the object and for each object I print some information including the images, therefore I cannot specify only one specific image. I use admin so I can add my (new future) projects and only by admin they should be able to display automatically on my website with all the information and structure required. Do you sugest changing the value of the imageField (upload_to="static//my_desired_path) ? -- 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/33d4c599-135d-45d9-abbc-978e404e4f87o%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/A68703DE-32D6-417B-AF0F-64EACA533FE0%40hxcore.ol.


Re: How to get names of columns from QuerySet without executing it

I think learning some sql commands would be good. Lots of youtube tuts
available online.
https://docs.djangoproject.com/en/3.0/topics/db/sql/#executing-custom-sql-directly

On Sun, Jul 5, 2020 at 1:59 AM Akinfolarin Stephen <
akinfolarinsteph...@gmail.com> wrote:

> you can filter out the column you want by using
> [name of model].objects.get(filter=[name of the column you want])
>
> On Sun, Jul 5, 2020 at 10:12 AM Eugene Kulak 
> wrote:
>
>> How to get names of columns from QuerySet without executing it?
>> If it is not possible what would be the most easier way to execute a
>> lighter version of the query.
>> The query itself is unknown, it could be anything.
>>
>> --
>> 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/60c63ddd-80fa-44c5-9a8e-10091e307099o%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/CAFujGLyz6U%3D4t3RSiiAzOo5jkXiCc7bcvzYYyD4do3R-fgbdoQ%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/CACaE8x7k9WTwn4yCaCwdfBWbCBD68exhzetVt1Mp_%3DF1buhgrg%40mail.gmail.com.


RE: How to get data from django model to the excel sheet.

@Ashutosh Mishra I think reading your sql table with pandas and using to_excel/to_csv would be great in this case. If you are worried about the images. First of all I don’t know how you are storing your images. One method to store an image is to convert it to a very long base64 string and store it in the database. Then whenever you want to show it use can use that base64 string. Web browsers can understand base64 strings. But using base64 allows anyone to just copy your image so be careful. You can otherwise always decode back from base64 to normal image always. Sent from Mail for Windows 10 From: sum abiutSent: 06 July 2020 13:29To: django-users@googlegroups.comSubject: Re: How to get data from django model to the excel sheet. You can try this export data to excel fileSum, On Mon, Jul 6, 2020 at 7:00 PM Ashutosh Mishra  wrote:I want to get the data from the django model contans(name,age,photo) on a excel sheet.How can i do that.-- 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/b9ad3b60-2c0a-43dc-bdc6-6a67f8a88826n%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/CAPCf-y6tSDOTUDfWWQV652E6yY7M2FRgJuKA4vnc4nPme_j1Bw%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/064866A5-4C93-444A-B415-47D01CDFAF54%40hxcore.ol.


RE: How to get data from django model to the excel sheet.

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_sql.html Sent from Mail for Windows 10 From: Ashutosh MishraSent: 06 July 2020 13:56To: django-users@googlegroups.comSubject: Re: How to get data from django model to the excel sheet. But It is for js,react,angular, how can I place that in django projectOn Jul 6, 2020 1:54 PM, "Damanjeet Singh"  wrote:Please see handsontable.com. I have been using it for my project. On Mon, Jul 6, 2020 at 9:06 AM Ashutosh Mishra  wrote:What if I have an image field too,how to do that-- 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/9bf3cc78-00bd-4a8f-a6b7-90344f0bded7o%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/CAGLHGi5_9zX%2BLkywRH9GB_hKLJTBRRjmGBw1aCrYSW5WGOj-6Q%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/CAGDmY671qKxoEUL%3DjEWQ7Xso4Opn74W3jh3dtD2Zy9jgvEpjtw%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/1B445B42-39E1-477E-8CAB-7786C3BB5EB3%40hxcore.ol.


RE: Static not working on unix while working on windows

Href = "" static appname/something.css %}” Sent from Mail for Windows 10 From: ashish goyalSent: 06 July 2020 23:50To: django-users@googlegroups.comSubject: Static not working on unix while working on windows Hi All, I have created a django app on windows and have used bootstrap navbar n other functions which are working good on windows. Same files I have imported on unix server then i am able to get all details but getting issue with css and js files saying below error Refused to apply style from  because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled angular I am using below script in windows which is working in windows but not on unix { % load static %} Any suggestions, static and static url js defined i. Settings.py already. Since all working fine on windows dont know same code is not working for css and js while data is fetching correctlyThanksAshish-- 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/D45C33B1-949B-4BBE-8338-8982F2A246BF%40gmail.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/2A992212-ECB5-4FBA-BE2A-6775FE777304%40hxcore.ol.


RE: How to get data from django model to excel sheet using openpyxl including images.

Api’s are better suited for Django rest framework. Sent from Mail for Windows 10 From: Ashutosh MishraSent: 10 July 2020 18:30To: Django usersSubject: Re: How to get data from django model to excel sheet using openpyxl including images. i have created an api through which i can download the excel file with all fields except images.I am posting my models and views models.py class Task(models.Model): Id=models.IntegerField()Name=models.CharField(max_length=50,null=False,blank=True)Image1=models.FileField(blank=True, default="",upload_to="media/images",null=True)Image2=models.FileField(blank=True, default="",upload_to="media/images",null=True)Date=models.DateField(null=True,blank=True)def __str__(self):return str(self.Name) views.pyclass TaskViewSet(viewsets.ViewSet): def list(self,request):try:queryset=Task.objects.all()response = HttpResponse(content_type='application/ms-excel')#response=HttpResponse(content_type='application/ms-excel') #response['Content-Disposition'] = 'attachment; filename="users.xls'response['Content-Disposition']='attachment; filename="users.xls"' wb=openpyxl.Workbook()ws=wb.active row_num=0columns=['Id','Name','Image1','Image2','Date'] for col_num in range(len(columns)):c = ws.cell(row=row_num + 1, column=col_num + 1)c.value = columns[col_num]for obj in queryset:row_num+=1row = [obj.Id,obj.Name,obj.Image1.url,obj.Image2.url,str(obj.Date),]print(type(row)) for col_num in range(len(row)):c = ws.cell(row=row_num + 1, column=col_num + 1)c.value = row[col_num] wb.save(response)return responseexcept Exception as error:traceback.print_exc()return Response({"message": str(error), "success": False}, status=status.HTTP_200_OK)  On Friday, July 10, 2020 at 5:48:36 PM UTC+5:30 ajoeiam wrote:On Thu, Jul 9, 2020 at 10:02 PM Ashutosh Mishra  wrote:I am creating an api to get data and images from django model to excel sheet ,how can i do that,someone please help me.   What have you tried so far? Regards -- 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/c1092b58-9d91-4d9c-8654-54df883c5172n%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/80F9CD37-925E-4CB1-A03D-743C8F10EDB4%40hxcore.ol.


RE:

https://www.youtube.com/watch?v=UmljXZIypDc Follow this good tutorial. Sent from Mail for Windows 10 From: Suraj KumarSent: 14 August 2020 19:31To: django-users@googlegroups.comSubject:  Hi guys, I am to new django. I am making blog website project. During the making blog website I am stuck one point for last 5 hrs, I don't know how to resolve this. I also searched in google, stackoverflow but I am not satisfied with their answer. So, anyone can help me to resolve this issue. Please find attached screenshot which given below -- 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/CACCwaoVzB1disO9ZtZbPz%3DxrtBgm1gGuTkxx6--%2Bef7ODEjXDQ%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/CD11304B-A4DF-49BA-BD00-E00200BD18BA%40hxcore.ol.


RE: HTML Snippets instead of JSON-API

You can use Django and react with the help of webpack. Sent from Mail for Windows 10 From: guettliSent: 28 August 2020 14:02To: Django usersSubject: HTML Snippets instead of JSON-API If you read the current articles about software development,you get the impression that you must createa backend API returning JSON (maybe via Django RestFramework)and then create a GUI with React/Vue/Angular I am a backend geek. I like Python, Django, Linux, SQL, and try to avoid _javascript_. Nevertheless I want to develop a modern GUI. By chance I found a nice library: https://htmx.org/ This does exactly what I was looking for. It helps you to update parts of your html page.This way the server sends HTML to the client and htmxinserts the snippets into the page. At the moment I think I found the perfect library. But maybe I am wrong. Which alternatives exist, if you want to avoid JSand render HTML and HTML forms with Django? Regards,  Thomas Güttler -- 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/f737d8cb-6d11-4722-8351-459b903297bbn%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/A08741FF-3F06-475C-8AAE-EAC6698260B2%40hxcore.ol.


RE: material

https://www.youtube.com/watch?v=UmljXZIypDc Sent from Mail for Windows 10 From: sakshi jainSent: 28 August 2020 21:04To: django-users@googlegroups.comSubject: Re: material youtube vedios online On Fri, Aug 28, 2020, 19:23 السعيد حاجي سعيد  wrote:Hello and good morning, I want to start learning dejango. Is there a material in writing to study it? -- 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/5b128545-69b3-4305-8aaf-03ec393c41b8n%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/CAJhs3iOZjZVa8-xz3SwdbtJohFKxqVPp93EO_Jrzs97%3DC7_ruA%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/8874679F-532D-4A23-9124-AB0E8CA93DE9%40hxcore.ol.


RE: Data Science Guide

https://www.youtube.com/watch?v=yzIMircGU5I&list=PL5-da3qGB5ICCsgW1MxlZ0Hq8LL5U3u9y Sent from Mail for Windows 10 From: Emmanuel Oppong NtiamoahSent: 28 August 2020 21:05To: django-users@googlegroups.comSubject: Data Science Guide Hello friends i have learnt Python for a while now and i want to start with data science. Please can you guide me as to the path, resources and tools to used and advice.  -- 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/E02ED175-CF51-4D50-A66C-64CED59734E8%40gmail.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/1E1CEFF1-6DF6-406D-B871-EF7FDAB99152%40hxcore.ol.


Exception Type: SuspiciousOperation

Hi, I am facing this error and 'm stuck on it from quite a lot of time.
The error logs: https://dpaste.com/AVG628T9N
My code: https://dpaste.org/dSMc

I have used  :  https://pypi.org/project/django-postgres-extra/
Any help is appreciated,
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/1cd3674d-6f00-4456-a24a-1a1cac3edf66n%40googlegroups.com.


Re: Exception Type: SuspiciousOperation

I deleted the db and ran the migrations again. 
the actual error is this.   https://dpaste.org/7vb3

On Friday, January 1, 2021 at 1:58:17 AM UTC+5:30 Vishesh Mangla wrote:

> Hi, I am facing this error and 'm stuck on it from quite a lot of time.
> The error logs: https://dpaste.com/AVG628T9N
> My code: https://dpaste.org/dSMc
>
> I have used  :  https://pypi.org/project/django-postgres-extra/
> Any help is appreciated,
> 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/43a427ec-dff7-4e0e-b207-42941edbfa63n%40googlegroups.com.


Re: Exception Type: SuspiciousOperation

The error was related to data. The key wasn't in the data.

On Fri, Jan 1, 2021 at 2:07 AM Vishesh Mangla 
wrote:

> I deleted the db and ran the migrations again.
> the actual error is this.   https://dpaste.org/7vb3
>
> On Friday, January 1, 2021 at 1:58:17 AM UTC+5:30 Vishesh Mangla wrote:
>
>> Hi, I am facing this error and 'm stuck on it from quite a lot of time.
>> The error logs: https://dpaste.com/AVG628T9N
>> My code: https://dpaste.org/dSMc
>>
>> I have used  :  https://pypi.org/project/django-postgres-extra/
>> Any help is appreciated,
>> 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/43a427ec-dff7-4e0e-b207-42941edbfa63n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/43a427ec-dff7-4e0e-b207-42941edbfa63n%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/CACaE8x4isqZ_1g_kmrmsg4ZqM_ZSFLpt-%2ByHtMkLnSopiKnYGA%40mail.gmail.com.


UserManager creation for AbstractUserModel extended MyUser

https://dpaste.org/Zz5Z


(venv) PS C:\Users\Dell\OneDrive\Desktop\djangodev\mass> python manage.py 
createsuperuser
PAN ID: 6785
Email: s@g
Error: Enter a valid email address.
Email: s...@gmail.com
Name: fjghg
Type: fg
Error: Value 'fg' is not a valid choice.
Type: ADM
Holding: 568
Password: 
Password (again):
This password is too short. It must contain at least 8 characters.
Bypass password validation and create user anyway? [y/N]: y
Traceback (most recent call last):
  File "manage.py", line 22, in 
main()
  File "manage.py", line 18, in main
execute_from_command_line(sys.argv)
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
 
line 401, in execute_from_command_line
utility.execute()
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
 
line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
 
line 330, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
 
line 79, in execute
return super().execute(*args, **options)
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
 
line 371, in execute
output = self.handle(*args, **options)
  File 
"C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
 
line 189, in handle

self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
  File "C:\Users\Dell\OneDrive\Desktop\djangodev\mass\base\models.py", line 
25, in create_superuser
return super()._create_user(PAN_ID,  password, **extra_fields)
AttributeError: 'super' object has no attribute '_create_user'

-- 
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/b4ff8445-8ed7-4d29-8ae6-73f3b1f8295fn%40googlegroups.com.


Re: UserManager creation for AbstractUserModel extended MyUser

Hi, please help me create this UserManager child class. I 'm stuck up on 
this. I also need to divide my users into three groups.  
For this I extended the migrations file.   https://dpaste.org/9VSd. But 
running `makemigrations` gives no changes detected.
 Please help with this issue too.
Thanks in advance.
On Saturday, January 9, 2021 at 6:35:34 PM UTC+5:30 Vishesh Mangla wrote:

> https://dpaste.org/Zz5Z
>
>
> (venv) PS C:\Users\Dell\OneDrive\Desktop\djangodev\mass> python manage.py 
> createsuperuser
> PAN ID: 6785
> Email: s@g
> Error: Enter a valid email address.
> Email: s...@gmail.com
> Name: fjghg
> Type: fg
> Error: Value 'fg' is not a valid choice.
> Type: ADM
> Holding: 568
> Password: 
> Password (again):
> This password is too short. It must contain at least 8 characters.
> Bypass password validation and create user anyway? [y/N]: y
> Traceback (most recent call last):
>   File "manage.py", line 22, in 
> main()
>   File "manage.py", line 18, in main
> execute_from_command_line(sys.argv)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>  
> line 401, in execute_from_command_line
> utility.execute()
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>  
> line 395, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>  
> line 330, in run_from_argv
> self.execute(*args, **cmd_options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>  
> line 79, in execute
> return super().execute(*args, **options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>  
> line 371, in execute
> output = self.handle(*args, **options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>  
> line 189, in handle
> 
> self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
>   File "C:\Users\Dell\OneDrive\Desktop\djangodev\mass\base\models.py", 
> line 25, in create_superuser
> return super()._create_user(PAN_ID,  password, **extra_fields)
> AttributeError: 'super' object has no attribute '_create_user'
>

-- 
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/2aaa49cd-78bf-4168-b925-7f4c35320c8cn%40googlegroups.com.


Re: UserManager creation for AbstractUserModel extended MyUser

Another thing is that my "employees" group has an additional CharField 
requirement. Only the employees group.How can I add specifically a field to 
that group? Something this 
this:https://stackoverflow.com/questions/16407217/add-extra-fields-to-django-to-django-auth-groups

On Saturday, January 9, 2021 at 6:38:56 PM UTC+5:30 Vishesh Mangla wrote:

> Hi, please help me create this UserManager child class. I 'm stuck up on 
> this. I also need to divide my users into three groups.  
> For this I extended the migrations file.   https://dpaste.org/9VSd. But 
> running `makemigrations` gives no changes detected.
>  Please help with this issue too.
> Thanks in advance.
> On Saturday, January 9, 2021 at 6:35:34 PM UTC+5:30 Vishesh Mangla wrote:
>
>> https://dpaste.org/Zz5Z
>>
>>
>> (venv) PS C:\Users\Dell\OneDrive\Desktop\djangodev\mass> python manage.py 
>> createsuperuser
>> PAN ID: 6785
>> Email: s@g
>> Error: Enter a valid email address.
>> Email: s...@gmail.com
>> Name: fjghg
>> Type: fg
>> Error: Value 'fg' is not a valid choice.
>> Type: ADM
>> Holding: 568
>> Password: 
>> Password (again):
>> This password is too short. It must contain at least 8 characters.
>> Bypass password validation and create user anyway? [y/N]: y
>> Traceback (most recent call last):
>>   File "manage.py", line 22, in 
>> main()
>>   File "manage.py", line 18, in main
>> execute_from_command_line(sys.argv)
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>>  
>> line 401, in execute_from_command_line
>> utility.execute()
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>>  
>> line 395, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>>  
>> line 330, in run_from_argv
>> self.execute(*args, **cmd_options)
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>>  
>> line 79, in execute
>> return super().execute(*args, **options)
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>>  
>> line 371, in execute
>> output = self.handle(*args, **options)
>>   File 
>> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>>  
>> line 189, in handle
>> 
>> self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
>>   File "C:\Users\Dell\OneDrive\Desktop\djangodev\mass\base\models.py", 
>> line 25, in create_superuser
>> return super()._create_user(PAN_ID,  password, **extra_fields)
>> AttributeError: 'super' object has no attribute '_create_user'
>>
>

-- 
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/6ff80f40-30e1-4c09-9dab-7eae9461d6b2n%40googlegroups.com.


Re: UserManager creation for AbstractUserModel extended MyUser

I did paste my `models.py` with the help the help of a dpaste link. 
```
class UserManager( BaseUserManager):

def _create_user(self, PAN_ID, password=None, **extra_fields):
"""
Creates and saves a User with the given email, date of
birth and password.
"""
if not PAN_ID:
raise ValueError('Users must have an email address')
extra_fields['email'] = self.normalize_email(extra_fields["email"])
user = self.model(PAN_ID=PAN_ID, **extra_fields)

user.set_password(password)
user.save(using=self._db)
return user

def create_user(self, PAN_ID, password=None, **extra_fields):

extra_fields.setdefault('is_staff', False)
extra_fields.setdefault('is_superuser', False)
return self._create_user(PAN_ID, password, **extra_fields)

def create_superuser(self, PAN_ID, password=None, **extra_fields):
extra_fields.setdefault('is_staff', True)
extra_fields.setdefault('is_superuser', True)

if extra_fields.get('is_staff') is not True:
raise ValueError('Superuser must have is_staff=True.')
if extra_fields.get('is_superuser') is not True:
raise ValueError('Superuser must have is_superuser=True.')

return self._create_user(PAN_ID, password, **extra_fields)


```   The following code worked. I used 
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
 
and the source code from 
https://github.com/django/django/blob/master/django/contrib/auth/models.py.   
Can I get help in the migrations and creating groups? Code is in the dpaste 
s.
On Saturday, January 9, 2021 at 7:11:23 PM UTC+5:30 Amitesh Sahay wrote:

> Could you please paste your models.py
>
> Sent from Yahoo Mail on Android 
> <https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature>
>
> On Sat, 9 Jan 2021 at 18:36, Vishesh Mangla
>  wrote:
>
> https://dpaste.org/Zz5Z
>
>
> (venv) PS C:\Users\Dell\OneDrive\Desktop\djangodev\mass> python manage.py 
> createsuperuser
> PAN ID: 6785
> Email: s@g
> Error: Enter a valid email address.
> Email: s...@gmail.com
> Name: fjghg
> Type: fg
> Error: Value 'fg' is not a valid choice.
> Type: ADM
> Holding: 568
> Password: 
> Password (again):
> This password is too short. It must contain at least 8 characters.
> Bypass password validation and create user anyway? [y/N]: y
> Traceback (most recent call last):
>   File "manage.py", line 22, in 
> main()
>   File "manage.py", line 18, in main
> execute_from_command_line(sys.argv)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>  
> line 401, in execute_from_command_line
> utility.execute()
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\__init__.py",
>  
> line 395, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>  
> line 330, in run_from_argv
> self.execute(*args, **cmd_options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>  
> line 79, in execute
> return super().execute(*args, **options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\core\management\base.py",
>  
> line 371, in execute
> output = self.handle(*args, **options)
>   File 
> "C:\Users\Dell\OneDrive\Desktop\djangodev\venv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py",
>  
> line 189, in handle
> 
> self.UserModel._default_manager.db_manager(database).create_superuser(**user_data)
>   File "C:\Users\Dell\OneDrive\Desktop\djangodev\mass\base\models.py", 
> line 25, in create_superuser
> return super()._create_user(PAN_ID,  password, **extra_fields)
> AttributeError: 'super' object has no attribute '_create_user'
>
> -- 
> 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/dj

Re: UserManager creation for AbstractUserModel extended MyUser

Oops I guess, my bad messaging style made you miss the last few pieces of 
my messages. Thanks, but that problem is resolved as written in my previous 
message with the working code. Now I require help with the Migrations 
problem.

On Saturday, January 9, 2021 at 8:00:55 PM UTC+5:30 Amitesh Sahay wrote:

> Hello Vishesh, 
>
> Below is from my models.py:
>
> models.py
> -
>
> from django.contrib.auth.base_user import BaseUserManager
> from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
> from django.utils.translation import gettext_lazy as _
>
>
> class AccountManager(BaseUserManager):
> def create_superuser(self, email, password, **extra_fields):
>
>
> extra_fields.setdefault('is_staff', True)
> extra_fields.setdefault('is_superuser', True)
>
> extra_fields.setdefault('is_active', True)
>
>
>
> if extra_fields.get('is_staff') is not True:
>
> raise ValueError(_('Superuser must have is_staff=True.'))
>
>
> if extra_fields.get('is_superuser') is not True:
>
> raise ValueError(_('Superuser must have is_superuser=True.'))
> return self.create_user(email, password, **extra_fields)
>
> def create_user(self, email, password, **extra_fields):
> if not email:
> raise ValueError(_('Enter the email before proceeding'))
>
> email = self.normalize_email(email)
> user = self.model(email=email, password=password, **extra_fields)
> user.set_password(password)
> user.save()
> return user
>
>
> class Shop(AbstractBaseUser, PermissionsMixin):
> email = models.EmailField(unique=True)
> shop_name = models.CharField(max_length=150)
> contact = models.CharField(max_length=10)
> State = models.CharField(max_length=100)
> district = models.CharField(max_length=100)
> location = models.CharField(max_length=100)
> is_staff = models.BooleanField(default=False)
> is_active = models.BooleanField(default=True)
> date_joined = models.DateTimeField(auto_now_add=True)
> last_login = models.DateTimeField(null=True)
>
> objects = AccountManager()
>
> USERNAME_FIELD = 'email'
> REQUIRED_FIELDS = ['shop_name', 'contact', 'is_staff']
>
> def __str__(self):
> return str(self.shop_name)
>
>
> See if that helps you out.
>
> Regards,
> Amitesh
>
>
> On Saturday, 9 January, 2021, 07:39:18 pm IST, Vishesh Mangla <
> manglav...@gmail.com> wrote: 
>
>
> I did paste my `models.py` with the help the help of a dpaste link. 
> ```
> class UserManager( BaseUserManager):
> 
> def _create_user(self, PAN_ID, password=None, **extra_fields):
> """
> Creates and saves a User with the given email, date of
> birth and password.
> """
> if not PAN_ID:
> raise ValueError('Users must have an email address')
> extra_fields['email'] = self.normalize_email(extra_fields["email"
> ])
> user = self.model(PAN_ID=PAN_ID, **extra_fields)
>
> user.set_password(password)
> user.save(using=self._db)
> return user
> 
> def create_user(self, PAN_ID, password=None, **extra_fields):
>
> extra_fields.setdefault('is_staff', False)
> extra_fields.setdefault('is_superuser', False)
> return self._create_user(PAN_ID, password, **extra_fields)
> 
> def create_superuser(self, PAN_ID, password=None, **extra_fields):
> extra_fields.setdefault('is_staff', True)
> extra_fields.setdefault('is_superuser', True)
>
> if extra_fields.get('is_staff') is not True:
> raise ValueError('Superuser must have is_staff=True.')
> if extra_fields.get('is_superuser') is not True:
> raise ValueError('Superuser must have is_superuser=True.')
>
> return self._create_user(PAN_ID, password, **extra_fields)
>
>
> ```   The following code worked. I used 
> https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
>  
> and the source code from 
> https://github.com/django/django/blob/master/django/contrib/auth/models.py.   
> Can I get help in the migrations and creating groups? Code is in the dpaste 
> s.
> On Saturday, January 9, 2021 at 7:11:23 PM UTC+5:30 Amitesh Sahay wrote:
>
> Could you please paste your models.py
>

  1   2   >