Voting App : Datatron. Feedback Please!

Hello, fellow campers!
I was working on a final (capstone) project on Codecademy and I also decided to finish the voting app project as well.

Here is the Live Demo:

datatron-voting-app.herokuapp.com

Datatron

You can create an account, make as many polls as you want, vote for others’ polls, and even Comment on and Like them!

You can also tweet and share the link to the polls you’ve created.
Don’t forget to share the polls and this site with your friends!

If you catch any bugs, you can report them at this github repo:

github.com

Conner1115/Datatron

https://datatron-voting-app.herokuapp.com/. Contribute to Conner1115/Datatron development by creating an account on GitHub.

Thanks for reading.
Happy Coding!

3 Likes

Wow! Congrats! This is well, Brilliant! Wish you luck!

1 Like

Wait! This is in Project feedback section, does that mean that we have to make something of this sort when we’re at freecodecamp? I’d love it if it’s like that!

This is not part of the FCC projects.

Forum users can post any project they are currently working on. It doesn’t have to be FCC related.

Your project looks good @ConnerOw1115.

When you click on “signup” , the login link in Already have an account? log in, doesn’t work

Thanks a lot for the kind feedback!

The Project Feedback section is where you request feedback for projects you’ve built.

Okay, I’ll try to fix that. Thanks for reporting!

Thanks for the kind feedback!

@ConnerOw1115 Wonderful project bro! It works well. I voted in several polls. The following suggestions are only my opinion.

  • How about some brighter colors?
  • The login page should have either the username and password OR the email and password to log in.
  • Some text is getting squished in mobile view.
    squished

Thanks for the kind feedback!

  1. I kind of liked to make it into a dark mode-type thing. Bright colors are sometimes a bit hard on my eyes and others’ too. I think I’ll keep it that way.
  2. I don’t exactly know how to do that. I made this in Python Flask and I’m not too familiar with it yet.
  3. Yeah, I tried to make it responsive as best as I could. Maybe I’ll update it later.

Here is some sample code. This is how you could set up the login to only verify email address. This uses flask, flask-wtf, flask-login, and flask-bcrypt.

@app.route('/login', methods=['GET', 'POST'])
def login_route():
    '''Login registered users'''

    form = LoginForm()
    # If the for validates on the POST request check email and password.
    if form.validate_on_submit():
        # Check the database for the email address.
        user = User.query.filter_by(email=form.email.data).first()
        # If the email exists and the password is correct log the user in.
        if user and bcrypt.check_password_hash(user.password,
                                               form.password.data):
            login_user(user)
            flash('Login successful!', 'success')
            # Redirect user to the profile page upon successful login.
            return redirect(url_for('profile_route'))
        else:
            flash('Login failed. Check your email/password.', 'fail')
            # Send user back to the login page if email and password are incorrect.
            return redirect(url_for('login_route'))
    return render_template('login.html', form=form)

I can validate email addresses and usernames. Thanks, I’ll look into this soon!