User Controls

Polls

  1. #1
    SBTlauien African Astronaut
    I like polls to be added so that we can vote.
  2. #2
    Sophie Pedophile Tech Support
    Something something github, something something pull request.
  3. #3
    This would be a good begainer project
    The following users say it would be alright if the author of this post didn't die in a fire!
  4. #4
    Sophie Pedophile Tech Support

    class PollForm(ModelForm):
    class Meta:
    model = Poll


    Poll form.


    class ChoiceForm(ModelForm):
    class Meta:
    model = Choice
    fields = ('choice',)


    Choice form.


    def index(request):
    return render_to_response('index.html', context_instance = RequestContext(request),)


    This goes in index.py


    url(r'^$', 'poll_tutorial.polls.views.index', name = 'index'),


    This goes in urls.py


    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Poll Manager Home</title>
    </head>
    <body>

    <p>Welcome!</p>
    <p><a href="{% url polls %}">View Polls</a></p>
    <p><a href="{% url add_poll %}">Add a poll</a></p>

    </body>
    </html>


    Here is our template.

    It took me literally 5 minutes to find this code. This is Python, this is Django, 100% compatible with forum sauce, it will probably need some tweaking. Look at the source for ISS on Github, figure out where these pieces of code should live and fork ISS over. Add your changes and go to the original ISS page to submit a pull request. Lanny will be with you shortly.
    The following users say it would be alright if the author of this post didn't die in a fire!
  5. #5
    That looks easy.
  6. #6
    Sophie Pedophile Tech Support
    Originally posted by SCronaldo_J_Trump That looks easy.

    Django makes it easy for you.
  7. #7
    Lanny Bird of Courage
    Yeah, I'm not opposed to the idea of polls but I have a lot of other things that have higher priority, I invite someone to take it up if they're interested (you can also get credit in our SUPER EXCLUSIVE humans.txt). The Django tutorial is literally "how do I make a polls app".

    Post last edited by Lanny at 2017-03-22T07:01:00.744693+00:00
  8. #8
    Sophie Pedophile Tech Support
    Originally posted by Lanny Yeah, I'm not opposed to the idea of polls but I have a lot of other things that have higher priority, I invite someone to take it up if they're interested (you can also get credit in our SUPER EXCLUSIVE humans.txt). The [link=https://docs.djangoproject.com/en/1.10/intro/tutorial01/]Django tutorial[/link] is literally "how do I make a polls app".

    Humans.txt is funny.

    /* LEAD ALCOHOLIC */
    Lon Lon
  9. #9
    benny vader YELLOW GHOST
    VOTE IS HARUMM.
  10. #10
    bumping i need a poll right now we used to have em. tell me how to code it I have meth I will do it just tell me how ill do the legwork just tell me how.

    All I know is Django, github and pulls.
  11. #11
    SBTlauien African Astronaut
    Originally posted by Lanny The [link=https://docs.djangoproject.com/en/1.10/intro/tutorial01/]Django tutorial[/link] is literally "how do I make a polls app".

    Not Found. lol.
  12. #12
    infinityshock Black Hole
    ive never been to poland but from what i hear, poloks are not considered ideal as members of an online community. just ask archie bunker...
  13. #13
    bling bling Dark Matter
    100 horses django
  14. #14
    bling bling Dark Matter
    22 chiken *nandoz*
  15. #15
    Lanny Bird of Courage
    Originally posted by SBTlauien Not Found. lol.

    whoops, try now
Jump to Top