-1

I have been following along with the django tutorial and have Polls appearing in the administration panel of the site.

Additionally, I have, using django-registration package, created a way to allow a user to login and register a new account.

How do I grant this user permission to create objects in the Polls such that appear in the admin panel of the website?

Also, these users will not be staff so they will not be able to log in to the administration portion of the website. Is there a way to create Poll objects in a form?

Elijah1210
  • 329
  • 1
  • 2
  • 10
  • 1
    If the user can login in your website, you can let them create polls by creating a form for them to create a polls, if that's what you are asking. – Aamu Dec 05 '13 at 22:32
  • @Aamu Will they require certain permissions to do so however? – Elijah1210 Dec 05 '13 at 22:33
  • What type of permission are you thinking? – Aamu Dec 05 '13 at 22:34
  • If you create a non-administrative view to enter poll information, the user will not require any permissions unless you specifically set your view to require some. In fact, users will not need to be logged in unless you specifically set your view to require login. – Peter DeGlopper Dec 05 '13 at 22:34
  • @Aamu On the administration panel I can see that there are 3 things that say create polls, modify polls etc. – Elijah1210 Dec 05 '13 at 22:43
  • By default those permissions only affect admin views. You can check for them in your own views if you like, and sometimes it's useful to do so, but there's nothing automatically enforced outside of the admin. – Peter DeGlopper Dec 05 '13 at 22:46
  • As Peter said, those are for the admin. And if you dont want your users to access via admin, you shoud create your own views, template and forms for that. – Aamu Dec 06 '13 at 00:32

1 Answers1

0

Also, these users will not be staff so they will not be able to log in to the administration portion of the website. Is there a way to create Poll objects in a form?

This is literally what you do on page 4 of the django tutorial. Finish the tutorial, and you will answer your own question.

https://docs.djangoproject.com/en/dev/intro/tutorial04/#write-a-simple-form

Thomas
  • 11,757
  • 4
  • 41
  • 57