Re: Employee matching query does not exist

2022-01-04 Thread Jitendra kumar Patra
name column row's data not matching from database

Show that you are getting error .


So we use the Expection then you can easily handle the error ..

On Tue, 4 Jan 2022, 8:05 pm yassin kamanyile,  wrote:

> please team ..i  got an error from that line below
>
> obj.employee = Employee.objects.get(name=self.request.POST.get(
> 'employee_id'))
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0d469b11-33f5-49bb-a984-76f53a2e08c8n%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/CAOAROfn%2Bd7C4JDSAFZpqoSm2kVxCBL16qdA93PS0oXvRD3-VoA%40mail.gmail.com.


Re: Need help in User log in, someone please help

2022-02-22 Thread Jitendra kumar Patra
7008080545 DM .

On Wed, 23 Feb 2022, 12:22 pm Antonis Christofides, <
anto...@antonischristofides.com> wrote:

> You have this statement:
> user = User.objects.create_user(username=username, email=email,
> password = password)
>
> Just before this statement, you need to insert a statement that will
> enable you to examine the value of the "username" statement. Something like
> this:
>
> print(username)
> user = User.objects.create_user(username=username, email=email,
> password = password)
>
> This might or not might work properly with Django. What most Python
> programmers would do instead is this:
>
> import pdb; pdb.set_trace()
> user = User.objects.create_user(username=username, email=email,
> password = password)
>
> but for that you need to know how to use pdb. It's quite simple though
> tricky at first. Eventually you will need to learn it, however, so now
> would be a good time. Search the web.
>
> Regards,
>
> Antonis
>
> Antonis Christofides
> +30-6979924665 (mobile)
>
>
>
> On 22/02/2022 19.01, Raj wrote:
>
> I am trying to create register form access in django, but i am getting this
> * " ValueError at /registerThe given username must be set" error. *
> Kindly help me how can I fix this bug.
> please.
> *here is the code of the views.py file.--->*
> from msilib.schema import Feature
> from pyexpat.errors import messages
> from django.shortcuts import render, redirect
> from django.contrib.auth.models import User, auth
> from django.contrib import messages
> from django.http import HttpResponse
> from .models import Feature
> # Create your views here.
> def index(request):
> return render(request,'index.html',{'features': features})
> #=---register function---
> def register(request):
> if request.method == 'POST':
> username = request.POST.get('username')
> email = request.POST.get('email')
> password = request.POST.get('password')
> password2 = request.POST.get('password2')
> # username = request.POST['username']
> # email = request.POST['email']
> # password = request.POST['password']
> # password2 = request.POST['password2']
> if password == password2:
> if User.objects.filter(email = email).exists():
> messages.info(request, 'Email already has been used!')
> return redirect('register')
> elif User.objects.filter(username= username).exists():
> messages.info(request, 'Username already exist')
> return redirect('register')
> else:
> user = User.objects.create_user(username=username,
> email=email, password = password)
> user.save();
> print("User created")
> return redirect('login')  #check
> else:
> messages.info(request, 'Incorrect password')
> return redirect('register')
> else:
> return render(request, 'register.html')
> def login(request):
> if request.method == 'POST':
> # username = request.POST['username']
> # password = request.POST['password']
> username = request.POST.get('username')
> password = request.POST.get('password')
> user = auth.authenticate(username = username, password = password)
> if user is not None:
> auth.login(request, user)
> return redirect('/')
> else:
> messages.info(request,'Credential Invalid')
> return redirect('login')
> else:
> return render(request, 'login.html')
> *here is the SS of the error*[image: Screenshot (75).png]
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c7bcf4b5-f8e7-4f84-97df-02e4655e42f1n%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/cdfef3b3-37b4-801d-c53c-85d8176e3025%40antonischristofides.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 discussio

Re: how to convert xlsx file into jpg

2022-06-09 Thread Jitendra kumar Patra
Message me 7008080545 .I will help you

On Thu, 9 Jun, 2022, 14:55 Abhinandan K,  wrote:

> IS anybody know how to convert xlsx file into jpg format in python on mac ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%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/CAOAROfnOxsLLGQLmZ_Sv9KgpZ6t_cNS9dqHK5H_XH7txqQ5K7Q%40mail.gmail.com.


Re: how to convert xlsx file into jpg

2022-06-09 Thread Jitendra kumar Patra
https://stackoverflow.com/questions/19294143/python-script-to-save-image-from-xlsx-file-to-disk

On Thu, 9 Jun, 2022, 15:01 Jitendra kumar Patra, 
wrote:

> Message me 7008080545 .I will help you
>
> On Thu, 9 Jun, 2022, 14:55 Abhinandan K, 
> wrote:
>
>> IS anybody know how to convert xlsx file into jpg format in python on mac
>> ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAA6_Mp6Ve%3D1jdvYbt3qRVVub1%2BhsbHf%3Dd0VYR6WWCk%3DDC_-5wg%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/CAOAROfmjHD-iehiq10mPPPX%2BrVBTy_-qMYUbaiGqE_pKhF5OXA%40mail.gmail.com.


Re: Help to implement join query in django orm

2022-07-24 Thread Jitendra kumar Patra
Ping me 7008080545

On Fri, 22 Jul, 2022, 12:16 Avi shah,  wrote:

> I have two tables
> Tbl 1
> &
> Tbl 2
>
> I need to connect the two tables using a join
>
>
> Thanks and regards,
> Avi shah
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALa7AFNmoep5MT3MwoYn1ZF0S%3DENPUdVAO-_3EmVyAzCub_Jkg%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/CAOAROf%3DgMPbSQ37f81A0rpRr7NgiUFF8ZyTsF8bZ-KG9Sgh%3DkA%40mail.gmail.com.


Re: On button click need to call a python function...

2022-10-17 Thread Jitendra kumar Patra
Ping me

On Tue, 18 Oct, 2022, 11:35 Saswat Mahapatra, 
wrote:

> Hi ,
>
> I am new to django.
> On button click I need to call a python function which returns 2 values.
> If both the values are the same then I need to display the same image in 2
> places on the web page or else a different image.
>
> How to call the python function from html ?
>
> Thanks & Regards,
> Saswat
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/294c7d09-d558-4b18-97c6-ee369c27a591n%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/CAOAROfkYgnZuO740QZTuZGFVeJXfC2Hax5wbuyjdgHcsxFvSkA%40mail.gmail.com.


Re: request to post UnboundLocalError

2022-10-23 Thread Jitendra kumar Patra
Declare the contact variable before the return statement

On Mon, 24 Oct, 2022, 00:52 Deepak kumar,  wrote:

> please check to pdf and send to my email dk9284...@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/ce32825e-f275-4735-af27-6626e19f60ban%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/CAOAROfmd65WqGZVtGh2MPsa0q1G5rC9BAP%2BnL%3DSNgROR9%3DaMww%40mail.gmail.com.


Re: Email Sending In Django not working

2022-11-09 Thread Jitendra kumar Patra
Please use  int type EMAIL_PORT = 587

On Wed, 9 Nov, 2022, 16:42 peteru mimo,  wrote:

> EMAIL_PORT = '587'
>
> On Wed, Nov 9, 2022 at 11:56 AM peteru mimo  wrote:
>
>> Good day team,
>>
>> I have been facing this challenge in sending mail in django
>>
>> here is the error *"A connection attempt failed because the connected
>> party did not properly respond after a period of time, or established
>> connection failed because connected host has failed to respond"*
>>
>> *Code*
>> def send_verification_email(request, user):
>> from_email = settings.DEFAULT_FROM_EMAIL
>> current_site = get_current_site(request)
>> mail_subject = 'Please activate your account'
>> message =
>> render_to_string('accounts/emails/account_verification_email.html', {
>> 'user': user,
>> 'domain': current_site,
>> 'uid': urlsafe_base64_encode(force_bytes(user.pk)),
>> 'token': default_token_generator.make_token(user),
>> })
>> to_email = user.email
>> mail = EmailMessage(mail_subject, from_email, message, to=[to_email])
>> mail.send()
>>
>> *Settings*
>> EMAIL_HOST = 'smtp.google.com'
>> EMAIL_POST = '587'
>> EMAIL_HOST_USER = 'myemail'
>> EMAIL_HOST_PASSWORD = 'email_password'
>> EMAIL_USE_TLS = True
>>
>> Any solution will be appreciated. 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/1ed5b9fc-3370-413c-b4cb-edeb2451d8f4n%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/CAJBAA1Ls4VT_ZywWYz4NE1w3YX-xtw85mzMKk7cTwwBgQe5j0w%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/CAOAROfk4gAwfJeiwV5eOHAD%2BRtLa%3D6vRG7UU0ay4Hwgde-GnDA%40mail.gmail.com.


Re: MANAGE.PY RUNSERVER ERROR

2022-11-16 Thread Jitendra kumar Patra
Could you share what type of error you are getting?

On Wed, Nov 16, 2022 at 2:39 PM 'Kasper Laudrup' via Django users <
django-users@googlegroups.com> wrote:

> On 15/11/2022 18.49, Peter Mwai wrote:
> > Hello experts,
> > I was trying to start the server using 'python manage.py runserver' but
> > encountered this error,
> >
>
> You have a bug somewhere in your code. That most likely happened after
> you made a change somewhere.
>
> Look into what you changed, fix the bug and the error should disappear.
>
> Hope that helps.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/27422127-db9b-b4f0-bca7-204642edaeb0%40stacktrace.dk
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOAROfn_fqxog0xW9LjuS4jK%2BbP%3DjUshz5gswra-4Z6rF2NiLQ%40mail.gmail.com.