Creating default user

2023-01-30 Thread Pooja Kumari
Hi... Anyone know how can we give default username and password without
creating superuser? I have seen some fields like Default_username = "demo"
and Default_password = "demo" in settings.py. if you guys have any idea
regarding this please guide me...
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/CAHYvwbX9O%2BbLPhOu3NsZW%3DjCs9pCFEpFd47_VRJMXKY6FWp3Yg%40mail.gmail.com.


Re: Django rest framework

2022-11-25 Thread Pooja Kumari
Thank you these references are very helpful

On Fri, Nov 25, 2022, 11:16 PM Devang  wrote:

> Follow this website https://www.cdrf.co/
> It has all cheat sheet.
> If you you want to implement login and signup please use either rest-auth
> or dj-rest-auth package
>
> On Fri, 25 Nov 2022, 22:39 M Adnan,  wrote:
>
>> Message in the group if no body will help than I will guide you in group
>> I am in admin in group
>>
>> On Fri, 25 Nov 2022, 10:02 pm Pooja Kumari, 
>> wrote:
>>
>>> Yeah.. I'm already in group.
>>>
>>> On Fri, Nov 25, 2022, 10:29 PM M Adnan  wrote:
>>>
>>>> https://chat.whatsapp.com/ICXdXOrbgoNFQTbKxalZD1
>>>>
>>>>
>>>>
>>>> Join this group to discuss all django query here all the developers
>>>> will help of you
>>>>
>>>> On Fri, 25 Nov 2022, 9:56 pm Pooja Kumari, 
>>>> wrote:
>>>>
>>>>> Hello.. Can anybody help me with APIs in django? I have to create
>>>>> registration and login APIs but my concepts are not clear yet. Any
>>>>> reference will be enough also.
>>>>> 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/CAHYvwbXMgfynTL%2Bj5mwpfyn_Q7Oq%3Dq%2BPPZc6rb5V2_K8m9nOzQ%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-users/CAHYvwbXMgfynTL%2Bj5mwpfyn_Q7Oq%3Dq%2BPPZc6rb5V2_K8m9nOzQ%40mail.gmail.com?utm_medium=email_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/CABNyTSrsY6_xHg%3D3pwggyj4bR06b%2Bc%3Dyor1dpM-AVf2E3C_PQw%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CABNyTSrsY6_xHg%3D3pwggyj4bR06b%2Bc%3Dyor1dpM-AVf2E3C_PQw%40mail.gmail.com?utm_medium=email_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/CAHYvwbU%3Da-KMjjxQcci1tOk2bAmCwg%2BxOaPi29q8-jOs-TzF6g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAHYvwbU%3Da-KMjjxQcci1tOk2bAmCwg%2BxOaPi29q8-jOs-TzF6g%40mail.gmail.com?utm_medium=email_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/CABNyTSppEMBG1OAL8wm-YcYmGzJUQUvG80Ead8K%2Beyg1pHsCeA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CABNyTSppEMBG1OAL8wm-YcYmGzJUQUvG80Ead8K%2Beyg1pHsCeA%40mail.gmail.com?utm_medium=email_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%2BU2%3DaiiOfDPuQ_VgpbgQzDDkF32kT3kG-_wvxvg-ouXYig7Bg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CA%2BU2%3DaiiOfDPuQ_VgpbgQzDDkF32kT3kG-_wvxvg-ouXYig7Bg%40mail.gmail.com?utm_medium=email_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/CAHYvwbVyAUbL6%3DSxHdgAA8rg2hqgq2EcpK0wHsO9DRa-dHCadg%40mail.gmail.com.


Re: Django rest framework

2022-11-25 Thread Pooja Kumari
Yeah.. I'm already in group.

On Fri, Nov 25, 2022, 10:29 PM M Adnan  wrote:

> https://chat.whatsapp.com/ICXdXOrbgoNFQTbKxalZD1
>
>
>
> Join this group to discuss all django query here all the developers will
> help of you
>
> On Fri, 25 Nov 2022, 9:56 pm Pooja Kumari, 
> wrote:
>
>> Hello.. Can anybody help me with APIs in django? I have to create
>> registration and login APIs but my concepts are not clear yet. Any
>> reference will be enough also.
>> 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/CAHYvwbXMgfynTL%2Bj5mwpfyn_Q7Oq%3Dq%2BPPZc6rb5V2_K8m9nOzQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHYvwbXMgfynTL%2Bj5mwpfyn_Q7Oq%3Dq%2BPPZc6rb5V2_K8m9nOzQ%40mail.gmail.com?utm_medium=email_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/CABNyTSrsY6_xHg%3D3pwggyj4bR06b%2Bc%3Dyor1dpM-AVf2E3C_PQw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABNyTSrsY6_xHg%3D3pwggyj4bR06b%2Bc%3Dyor1dpM-AVf2E3C_PQw%40mail.gmail.com?utm_medium=email_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/CAHYvwbU%3Da-KMjjxQcci1tOk2bAmCwg%2BxOaPi29q8-jOs-TzF6g%40mail.gmail.com.


Django rest framework

2022-11-25 Thread Pooja Kumari
Hello.. Can anybody help me with APIs in django? I have to create
registration and login APIs but my concepts are not clear yet. Any
reference will be enough also.
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/CAHYvwbXMgfynTL%2Bj5mwpfyn_Q7Oq%3Dq%2BPPZc6rb5V2_K8m9nOzQ%40mail.gmail.com.


Re: Page Integration

2022-11-16 Thread Pooja Kumari
 I'll check it out.
Thanks


On Wed, Nov 16, 2022, 7:03 PM parmeshwar deharkar <
parmeshwardehar...@gmail.com> wrote:

> https://pythonprogramming.net/user-login-logout-django-tutorial/
>
> On Wed, Nov 16, 2022, 6:58 PM parmeshwar deharkar <
> parmeshwardehar...@gmail.com> wrote:
>
>> Just visit on www.pythondjango.com
>> See that page registration access
>>
>> On Thu, Nov 10, 2022, 9:02 PM Pooja Kumari 
>> wrote:
>>
>>> Hi.. Can anyone help me with django templates? Actually I have a
>>> registration page where user can signup and data will be saved in admin
>>> panel or database but I am not able to do that. Registration page is
>>> working when I hit URL but data is not saving in database. Let me know If
>>> anyone have idea about this type of project. I'll be very grateful for your
>>> 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/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com?utm_medium=email_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/CAFyF%2BQi2%2B6oGuhvP4VVsMy2u4z%3DZb_XbVzm-tjMxQCmMFr3WAQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAFyF%2BQi2%2B6oGuhvP4VVsMy2u4z%3DZb_XbVzm-tjMxQCmMFr3WAQ%40mail.gmail.com?utm_medium=email_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/CAHYvwbXPkbRttzPZSD4fGQRALzDMm2uYu_pMssAg7fSkZGFOeQ%40mail.gmail.com.


Re: EROR AT INITIAL VIEWS

2022-11-15 Thread Pooja Kumari
Try views or .views while importing and urls.py you should give path like
views.home_view()

On Tue, Nov 15, 2022, 11:25 PM Ogunsanya Opeyemi <
ogunsanyaopeye...@gmail.com> wrote:

> Your views.py is inside profiles folder not pages folder so change
> pages.views to profiles.views
>
> On Tuesday, November 15, 2022 at 6:08:56 PM UTC+1 gabk...@gmail.com wrote:
>
>> [image: 2.png][image: 3.png]
>
>
>
>> Hi, kindly help me with this error, i seem not to know what is the cause
>> and how to fix it. Thank you. Can[image: 1.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/b75d5986-4cf0-47b0-b4ce-7a9543b7a318n%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/CAHYvwbX8vcyygVXByB0mz%3DUkS%2BGeJdxneiJwMjKCAfzdhqU%3DJQ%40mail.gmail.com.


Re: Page Integration

2022-11-10 Thread Pooja Kumari
I tried many ways but nothing works.
Sorry this code is messed up but hope you get some idea what I'm trying to
do.
In views.py
@api_view(['GET', 'POST', ])
def signUpPage(request, format=None):
  #permission_classes = (IsAuthenticated,)
  #authentication_classes = (TokenAuthentication,)
  serializer = AuthTokenSerializer(data=request.data)
  data= {'signUpPage': Employee.objects.all() }
  if request.method == "POST":
empid=request.POST['empid']
first_name=request.POST['first_name']
last_name=request.POST['last_name']
email=request.POST['email']
password=request.POST['password']
phone=request.POST['phone']
register = NewUserSerializer(data=data, context={'request':request})
if register.is_valid(raise_exception=True):
  register.save()
  print(register.data)
  #register.save()
  return Response("registration successfully")
  #return
JsonResponse(data,template_name='signup.html',content_type="application/json")
'''
  '''
  #@action(detail=False, methods=['post'], name='register')
  def create(self, request):
"""
Api to registration
"""
try:
  data = request.data
  print(data)
  email = request.data.get("email")
  user_obj = Employee.objects.filter(email=email)
  print("35 line", user_obj)
  #print("...",user_obj)
  print("demo")
  if user_obj:
return Response("User Already Exist With This Email Id")
  else:
#new_user = NewUserSerializer(data=data,
context={'request':request})
#if new_user.is_valid(raise_exception=True):
#  new_user.save()
print("42 line")
new_user =
Employee.objects.create(empid=data.get('empid'),first_name=data.get('first_name'),last_name=data.get('last_name'),email=data.get('email'),password=data.get('password'),phone=data.get('phone'))
print("user",new_user)
return Response("registration successfully")

except Exception as e:
  print("hello", str(e))
  return Response( "invalid data")
'''







'''
name = request.data.get("name","")
email= request.data.get("email","")'''



"""class UserDetailAPI(APIView):
  authentication_classes = (TokenAuthentication,)
  permission_classes = (AllowAny,)
  def get(self,request,*args,**kwargs):
user = User.objects.get(id=request.user.id)
serializer = UserSerializer(user)
return Response(serializer.data)

#Class based view to register user
class RegisterUserAPIView(generics.CreateAPIView):
  permission_classes = (AllowAny,)
  serializer_class = RegisterSerializer
"""


On Fri, Nov 11, 2022 at 1:16 AM Chukwudi Onwusa 
wrote:

> If you are using function based view in your views.py . After you must
> have equated the input values through the name attribute to the instance of
> the class in your model, then instance.save() before you redirect.
> This should be done in the views.py not models.
>
> On Thu, Nov 10, 2022, 20:07 Pooja Kumari  wrote:
>
>> Where I have to use save() method? In models or somewhere else?
>>
>> On Thu, Nov 10, 2022, 9:19 PM Lakshyaraj Dash <
>> dashlakshyaraj2...@gmail.com> wrote:
>>
>>> Please see that if you're calling the .save() method or not
>>>
>>> On Thu, Nov 10, 2022, 21:02 Pooja Kumari 
>>> wrote:
>>>
>>>> Hi.. Can anyone help me with django templates? Actually I have a
>>>> registration page where user can signup and data will be saved in admin
>>>> panel or database but I am not able to do that. Registration page is
>>>> working when I hit URL but data is not saving in database. Let me know If
>>>> anyone have idea about this type of project. I'll be very grateful for your
>>>> 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/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com?utm_medium=email_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, s

Re: Page Integration

2022-11-10 Thread Pooja Kumari
Where I have to use save() method? In models or somewhere else?

On Thu, Nov 10, 2022, 9:19 PM Lakshyaraj Dash 
wrote:

> Please see that if you're calling the .save() method or not
>
> On Thu, Nov 10, 2022, 21:02 Pooja Kumari  wrote:
>
>> Hi.. Can anyone help me with django templates? Actually I have a
>> registration page where user can signup and data will be saved in admin
>> panel or database but I am not able to do that. Registration page is
>> working when I hit URL but data is not saving in database. Let me know If
>> anyone have idea about this type of project. I'll be very grateful for your
>> 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/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com?utm_medium=email_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/CAF7qQgBrQoWDSpStS9quQ1jSWxpAD9s7kJqHgFCgiCnEMtd%2BfQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAF7qQgBrQoWDSpStS9quQ1jSWxpAD9s7kJqHgFCgiCnEMtd%2BfQ%40mail.gmail.com?utm_medium=email_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/CAHYvwbUCfTxMRgaxfgGK_yOwth7VAHr35hNK8JgnhDGNVsq%2BTQ%40mail.gmail.com.


Page Integration

2022-11-10 Thread Pooja Kumari
Hi.. Can anyone help me with django templates? Actually I have a
registration page where user can signup and data will be saved in admin
panel or database but I am not able to do that. Registration page is
working when I hit URL but data is not saving in database. Let me know If
anyone have idea about this type of project. I'll be very grateful for your
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/CAHYvwbWDVFjuddPah3WUX8M9H6ojvDSjQD_mn7W6AgcT_pQsGQ%40mail.gmail.com.


Re: ImportError: cannot import name 'employees' from 'rest_framework'

2022-09-01 Thread Pooja Kumari
Understood.
Thank you very much

On Thu, Sep 1, 2022, 7:45 PM MAHESH KUMAR 
wrote:

> You can write  your serializers in 3rd line
>
> From .models import employees
>
> Thanks,
> Mahesh
>
> On Thu, Sep 1, 2022, 19:30 Pooja Kumari  wrote:
>
>> Can anyone explain 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/2920648e-f12c-4e26-a089-59a196fd653an%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/2920648e-f12c-4e26-a089-59a196fd653an%40googlegroups.com?utm_medium=email_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/CAPvC_H847-a5M3fdmTmWRT%2BU3ZESG-RqHDA3h6JBQXnGFe0a_w%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAPvC_H847-a5M3fdmTmWRT%2BU3ZESG-RqHDA3h6JBQXnGFe0a_w%40mail.gmail.com?utm_medium=email_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/CAHYvwbVQ4Rywj-N0E4H%2Bnk9c8C1pNYkwWESBx2aAvo%2B29sRpAQ%40mail.gmail.com.