Friday, November 30, 2018

Re: objects.filter

Hi todor, 

Thanks very much you save my day... 

Regards

On Sat, 1 Dec 2018, 12:18 Todor Velichkov, <todorvelichkov89@gmail.com> wrote:
It would be

logbook_noc.objects.filter(StatusProgress__in = ['1 Pending', '2 On Progress'])

You can read more about this at Making queries and please take a look at Coding styles and PEP8, because reading this code is a pain.

On Friday, November 30, 2018 at 8:28:22 AM UTC+2, pujiarahman wrote:
helo, 
iam new for python.  

my : models.py

lass logbook_noc(models.Model):
idLogbookN = models.IntegerField(primary_key=True)
kodetiket = models.CharField(max_length=30)
CustName = models.CharField(max_length=30)
TanggalLo = models.DateTimeField()
DeskripsiLo = models.TextField()
StatusProgress = models.CharField(max_length=30)
PenangananLo = models.TextField()
TglUpdate = models.DateTimeField()


class Meta:
managed = False
db_table = 'logbook_noc'
def __str__(self):
return self.Id

  
 my: views.py

def home(request):
logbooks = logbook_noc.objects.filter(StatusProgress = '1 Pending' )
paginator = Paginator(logbooks, 8)
page = request.GET.get('page')
pb = paginator.get_page(page)
return render(request, 'blog/home.html', {'pb':pb})


how to add  one word again to filter like '2 On Progress'
i tray to logbooks = logbook_noc.objects.filter(StatusProgress = '1 Pending' or '2 On Progress' )
the output for status is only 1 Pending the 2 On Progress not display..

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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3f69d7a1-e522-450c-99f6-62506652b3d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABbNnG6nHf1veh_kzmZCR6i18v_ugxdpaHaEwFwSps%2B79%3D-8Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: objects.filter

It would be

logbook_noc.objects.filter(StatusProgress__in = ['1 Pending', '2 On Progress'])

You can read more about this at Making queries and please take a look at Coding styles and PEP8, because reading this code is a pain.

On Friday, November 30, 2018 at 8:28:22 AM UTC+2, pujiarahman wrote:
helo, 
iam new for python.  

my : models.py

lass logbook_noc(models.Model):
idLogbookN = models.IntegerField(primary_key=True)
kodetiket = models.CharField(max_length=30)
CustName = models.CharField(max_length=30)
TanggalLo = models.DateTimeField()
DeskripsiLo = models.TextField()
StatusProgress = models.CharField(max_length=30)
PenangananLo = models.TextField()
TglUpdate = models.DateTimeField()


class Meta:
managed = False
db_table = 'logbook_noc'
def __str__(self):
return self.Id

  
 my: views.py

def home(request):
logbooks = logbook_noc.objects.filter(StatusProgress = '1 Pending' )
paginator = Paginator(logbooks, 8)
page = request.GET.get('page')
pb = paginator.get_page(page)
return render(request, 'blog/home.html', {'pb':pb})


how to add  one word again to filter like '2 On Progress'
i tray to logbooks = logbook_noc.objects.filter(StatusProgress = '1 Pending' or '2 On Progress' )
the output for status is only 1 Pending the 2 On Progress not display..

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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/3f69d7a1-e522-450c-99f6-62506652b3d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Why isn't user.photo being saved in UpdateView?

For some reason, the updateview will save all of the other user fields (and update them if changed) to the database.  Do I need to handle the user.photo field differently? 

# views.py
class UserUpdateView(LoginRequiredMixin, UpdateView):

    model
= User
    fields
= ["name", "photo", "city", "experience", "domain", "bio"]

   
def get_success_url(self):
       
return reverse("users:detail", kwargs={"username": self.request.user.username})

   
def get_object(self):
       
return User.objects.get(username=self.request.user.username)

user_update_view
= UserUpdateView.as_view()


The form:
# form.py
from django.contrib.auth import get_user_model, forms
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _


User = get_user_model()

class UserChangeForm(forms.UserChangeForm):

   
class Meta(forms.UserChangeForm.Meta):
        model
= User




It does save the photo though in the Admin.
# admin.py
from
django.contrib import admin
from django.contrib.auth import admin as auth_admin
from django.contrib.auth import get_user_model

from lexpy.users.forms import UserChangeForm, UserCreationForm

User = get_user_model()

@admin.register(User)
class UserAdmin(auth_admin.UserAdmin):


    form
= UserChangeForm
    add_form
= UserCreationForm
    fieldsets
= (("User", {"fields": ("name", "photo", "height_field", "width_field",
           
"city", "experience", "domain", "bio")}),) + auth_admin.UserAdmin.fieldsets
    list_display
= ["username", "name", "is_superuser"]
    search_fields
= ["name"]
Enter code here...


My Models:

# models.py
from datetime import date


from django.contrib.auth.models import AbstractUser
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _


def user_directory_path(instance, filename):
   
#file will be uploaded to MEDIA_ROOT/user_<id>/<filename>
   
return 'user_{0}/{1}'.format(instance.username, filename)


class User(AbstractUser):
    EXPERIENCE_BEGINNER
= 'B'
    EXPERIENCE_BEGINT
= 'BI'
    EXPERIENCE_INTERMEDIATE
= 'I'
    EXPERIENCE_INTERVANCED
= 'IA'
    EXPERIENCE_ADVANCED
= 'A'
    DOMAIN_WEB_DEVELOPMENT
= 'WD'
    DOMAIN_SCIENTIFIC_AND_NUMERIC
= 'SN'
    DOMAIN_EDUCATION
= 'E'
    DOMAIN_DESKTOP_GUIS
= 'DG'
    DOMAIN_GAME_DEVELOPMENT
= 'GD'
    DOMAIN_SOFTWARE_DEVELOPMENT
= 'SD'
    DOMAIN_SCRIPTING
= 'S'


    EXPERIENCE_CHOICES
= (
       
(EXPERIENCE_BEGINNER, 'Beginner'),
       
(EXPERIENCE_BEGINT, 'Beginner to Intermediate'),
       
(EXPERIENCE_INTERMEDIATE, 'Intermediate'),
       
(EXPERIENCE_INTERVANCED, 'Intermediate to Advanced'),
       
(EXPERIENCE_ADVANCED, 'Advanced / Professional'),
       
)


    DOMAIN_CHOICES
= (
       
(DOMAIN_WEB_DEVELOPMENT, "Web Applications"),
       
(DOMAIN_SCIENTIFIC_AND_NUMERIC, "Scientific or Numeric Applications"),
       
(DOMAIN_EDUCATION, "Education"),
       
(DOMAIN_DESKTOP_GUIS, "Desktop Software (GUI's)"),
       
(DOMAIN_GAME_DEVELOPMENT, "Game Development"),
       
(DOMAIN_SOFTWARE_DEVELOPMENT, "Support Software"),
       
(DOMAIN_SCRIPTING, "Scripting"),
       
)


   
# First Name and Last Name do not cover name patterns
   
# around the globe.
    name
= models.CharField(_("Name of User"), blank=True, max_length=255)
    photo
= models.ImageField(upload_to=user_directory_path,
            blank
=True,
            width_field
="width_field",
            height_field
="height_field")
    height_field
= models.IntegerField(default=0)
    width_field
= models.IntegerField(default=0)
    city
= models.CharField(max_length=50, blank=True)
   
# Fix default
    experience
= models.CharField(max_length=2, choices=EXPERIENCE_CHOICES, blank=True, null=True)
    domain
= models.CharField(max_length=2, choices=DOMAIN_CHOICES, blank=True, null=True)
    bio
= models.TextField(max_length=500, blank=True)


   
def get_absolute_url(self):
       
return reverse("users:detail", kwargs={"username": self.username})






 

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9a0c73a2-3e4c-41b8-b905-bb75639a16cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: How to hide the password of postgresql in settings.py

Use this


If you have copied the GitHub template of .gitignore then the .env won't be in your history of vs. I used this in production and development without a single problem.

On Nov 30, 2018 11:54 PM, "Carsten Fuchs" <carsten.fuchs@cafu.de> wrote:
Am 30.11.18 um 18:50 schrieb Sandip Nath:
I am a newbie to Django. Using Postgresql for CRUD operations. Although its working but I need to write the password of my Postgresql server in the settings.py. How can I hide that without hampering the operation?


In your settings.py, you could write something like:


from my_site import localconfig

DEBUG = localconfig.DEBUG
SECRET_KEY = localconfig.SECRET_KEY

# Rest of normal settings.py file
# ...


and in a minmal my_site/localconfig.py file:


DEBUG = True
SECRET_KEY = '...'


For completeness, be aware that some people consider local config files an anti pattern. Personally, I've never found the arguments convincing, but use at your own discretion.

Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ddc528e3-12c1-6ba4-0f5b-1be7dad54acd%40cafu.de.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMMZq8MHS7Jv5-D0nwaFYf5fxrsuj1c7sQ94yv8nZqMJiTFqNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: How to hide the password of postgresql in settings.py

Am 30.11.18 um 18:50 schrieb Sandip Nath:
> I am a newbie to Django. Using Postgresql for CRUD operations. Although its
> working but I need to write the password of my Postgresql server in the
> settings.py. How can I hide that without hampering the operation?
>

In your settings.py, you could write something like:


from my_site import localconfig

DEBUG = localconfig.DEBUG
SECRET_KEY = localconfig.SECRET_KEY

# Rest of normal settings.py file
# ...


and in a minmal my_site/localconfig.py file:


DEBUG = True
SECRET_KEY = '...'


For completeness, be aware that some people consider local config files an anti
pattern. Personally, I've never found the arguments convincing, but use at your
own discretion.

Best regards,
Carsten

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ddc528e3-12c1-6ba4-0f5b-1be7dad54acd%40cafu.de.
For more options, visit https://groups.google.com/d/optout.

Re: How to hide the password of postgresql in settings.py

I typically create a second file which stores my sensitive data and import it as a variable.

Then can exclude say.. credentials.py when sharing code.

I don't know that this is an ideal solution, just something that I've taken as habit.

On Friday, November 30, 2018 at 11:51:44 AM UTC-6, Sandip Nath wrote:
I am a newbie to Django. Using Postgresql for CRUD operations. Although its working but I need to write the password of my Postgresql server in the settings.py. How can I hide that without hampering the operation?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2d1c3851-5888-4d2f-8b8a-7ed05a88a379%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: How to hide the password of postgresql in settings.py

You should be keeping settings.py secure.  There's other stuff that shouldn't be public. That's why the django project directories are not included in the pages that the front end web server is allowed to serve, among other things.  Security is tough.  There's no magic answer.

On Fri, Nov 30, 2018 at 12:51 PM Sandip Nath <techsandip@gmail.com> wrote:
I am a newbie to Django. Using Postgresql for CRUD operations. Although its working but I need to write the password of my Postgresql server in the settings.py. How can I hide that without hampering the operation?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ea8bc539-a3be-44b4-af2f-e1b7f11d1539%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAB%2BAj0ursz0UbEaS7MFjGimKXqnNi72g7w5DwnSpt_SvsA_qOw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

How to hide the password of postgresql in settings.py

I am a newbie to Django. Using Postgresql for CRUD operations. Although its working but I need to write the password of my Postgresql server in the settings.py. How can I hide that without hampering the operation?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ea8bc539-a3be-44b4-af2f-e1b7f11d1539%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

RE: Microsoft deprecation for the Python extensions

I could never get Django working with IIS myself, so I simply installed Apache on Windows.  I haven't had much of a problem since.

 

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of El_Merendero
Sent: Friday, November 30, 2018 3:56 AM
To: Django users
Subject: Microsoft deprecation for the Python extensions

 

Hi all,

I'm a young developer and I'm working on a Django application (wrote in Python 2.7) that need to be deployed in a IIS 10 web server (I tryed a first version of the app and it works great). Today I read this post and I realized that Microsoft Server will not support the Python extension. So, now I have to decide whether to migrate in a Linux Server or not but before I want to understand what really does it involve to me? I'll explain:

  • It means that future ISS versions (10+) may not have a Python support?
  • It means that in the future I can have security issues due the absence of the IIS updates for python compability?
  • It means that in the future I can't make a python version upgrade of the app?

Or simply it means that we can not foresee what this can entail?

 

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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c59000ca-6cd0-4583-ae11-ef5b9963a2ee%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Re: Easiest front end JavaScript framework to integrate with a Django backend?

Valid point you made there vincent.
Javascript libraries come and leave but django remains the same :)

Best best advise would be to just learn javascript first and every other library becomes
easy-peasy. ;)



Kind regards,
E.I Kenneth
[Python developer/Machine Learner]
@www.wolfiegrabber.in
[Developer Program Member] @Github
[Mobile:] (+33)758401546
       (+33)767962527
[e-mail:] kennedyczar@gmail.com
[Git REPO:]

[
Open Collaborator for OpenSource]


On Fri, Nov 30, 2018 at 2:49 PM William Vincent <william.s.vincent@gmail.com> wrote:
Hi Joel,

Your view is correct. I wrote a book on Django APIs (https://restapiswithdjango.com) and struggled with this same issue. The answer is to just pick one (Vue, React, Angular are the big 3 right now) based either on a whim or on whichever seems to have more jobs available. Probably that would mean React at the moment.

You've probably also heard that you should just learn JavaScript at an expert level first before any framework. Also true but maddening. My advice would be to pick a basic project and implement it with all 3 and see which you like best. For a React example, see here: https://wsvincent.com/django-rest-framework-react-tutorial/.
 
But again, just pick one and move on. JavaScript frameworks come and go. Fortunately Django does not as much.

-William

On Thursday, November 29, 2018 at 9:25:30 PM UTC-5, Joel Mathew wrote:
From the point of view of someone who hasnt been using frameworks but wants to, this is all very maddening. Guess I just have to pick one randomly between Vue and Angular!

Sincerely yours,

 Joel G Mathew



On Fri, 30 Nov 2018 at 01:51, Benjamin SOULAS <benjamin...@gmail.com> wrote:
Hello,

Currently I integrate VueJS, it works like a charm, the documentation is awesome 

Le jeu. 29 nov. 2018 21:17, Jani Tiainen <red...@gmail.com> a écrit :
Also there exist ExtJS, Dojo Toolkit and at least Svelte which I've tried...

kennedy kay <kenne...@gmail.com> kirjoitti to 29. marrask. 2018 klo 21.25:
For me personally I would recommend AngularJS. Not just because it easy to integrate with Django but because you can also create mobile applications on the fly.

--
You received this message because you are subscribed 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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/53e1bfd4-ef11-4fa6-afbb-9a172337d2e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed 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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHn91ofO3d7wXu9z6w1h8fvoG0fiUsaT-QJcye%3DiT7J7ZWH9wA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed 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 post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABG7fFXdStQmKji%3DK4wRhdGhbZBQ2SdkatJzN9td_QNrmkB6bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/672e7e08-8ea9-47cd-a30a-44d9c25f0d66%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJvXZPpLDZFVtg8YfLVXeru5VrOt57XCF%2BGjk1om62utBUsvJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Re: What is meant by blocking request in django?

This is how I think about blocking in the context of Django. Anything that takes time and is not directly related to returning an http response should be done in the background (via celery or whatever). Your email example is a good one. The email doesn't need to be sent before the http response is returned so you should send email via celery. In general anything that "blocks" the http response unnecessarily should be done in the background.

On November 29, 2018 9:58:30 PM CST, Kharis <kharis@wisana.com> wrote:
Once I worked on a feature that use API like sending emails from my app, I write the code inside the django app.
My superior told me that causes request to block, so another request will be blocked until the process of calling the API finished and response sent to user.
He suggest that this process better off offloaded to celery.

I thought this can be solved by using multiple worker as in gunicorn, so another client can be served by another worker if there's available.
but, both he and I don't have a clue if above (solved by creating multiple worker) is true.

so, does it mean by blocking, it only blocks a single process/worker? or do all worker have to wait?
and what is another possible blocking request scenario? generating pdf? long calculation?

in addition, where can I read about blocking request in django? I searched but, really hard to find one 

This message and any attachments may contain confidential information and are intended only for the use of the intended recipient(s). Any disclosure, distribution or copying of this message and any attachments is strictly prohibited without approval from PT. Wisanamitra Argakarya. If you are not the intended recipient, you should notify the sender and delete this message immediately. PT. Wisanamitra Argakarya is not liable for any damage caused by any virus or malicious file transmitted by this message. Any views, opinions, or commitments expressed in this message do not necessarily reflect the views of PT. Wisanamitra Argakarya.

Re: error in creating modelform for builtin user table

Ok  thanks guys for ur reply .
But I had found solution.
Just place Meta at meta

On Fri 30 Nov, 2018 7:00 pm Nagarjuna J <nagarjuna.j@enthsquare.com wrote:
i think add password2 in form fileds


On Fri, Nov 30, 2018 at 6:54 PM amit pant <amitpant945@gmail.com> wrote:
use variable instead of getusermodel

On Wed, Nov 28, 2018, 23:14 shiva kumar <kannamshivakumar417@gmail.com> wrote:
hello guys,
       i want to create a register form that user builtin user table . For that i used model form. here is code of forms.

forms.py
from django import forms
from .models import BlogPost
from django.conf import settings
from django.contrib.auth import get_user_model
User=get_user_model()
from django import forms


class register(forms.ModelForm):
class meta:

model=User
fields=['username','first_name','last_name','email','password'
]
password2 = forms.CharField(label='re-enter password', max_length=128)


and i used views.
views.py

def hidemeregister(request):
if request.method == 'POST':
form = register(request.POST)
if form.is_valid():
if form.cleaned_data['password']==form.cleaned_data['password2']:
form.save()
print(type(form))
return redirect('/hideme/blog/')
else:
form=register(get_user_model())
return render(request,'login.html',{'form':form})

and login.html 
i simple used form.as_p in login.html

i am getting error like this







please figure out where is the error

here i am using builtin user for register.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMsYeuHni67VsJBiWrC6w8seMFN0hpGrqQOJp1sAaSZGLtUHbQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF2Ah_HxawKHpDRBeVn07XP2je8n8pVce5ukXMQ49Q3iaUrsNw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks&Regards,
-------------------------
J.V.Nagarjuna Reddy,
7207203544,
8328031020.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CADK%2B6-B9pdSS-wJj%3DtssFNY-Hc%2BF%3D13rSh9VqQZ2mnuV0s8A1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMsYeuGmMJM5QMjtCrL8J%3DJsnoXTTpYKb2b2bbhj8kPOQJ8cEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.