• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Django: How to authenticate a form in class based views

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to Django and I have this idea that when I user enters a room a modal popup ask them for a password of that specific room(as there will be other rooms) before they can get inside and see it's contents and the password is created by the admin in the admin site. Now my problem is I've created a password field on my room model, and I've also created a form for it, but I am having a hard time on how to incorporate it in my views.. I have no idea on how to GET the password that admin created and match it with what the user POST as the password. Could someone help me out please? I've been trying for hours and still no luck of making it work..

here is the image of the "room"


My room model


my form


my views
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic