6
Bubbles
6y

Low key if someone wants to help me with a flask registration form that would be great because it’s kicking my ass.

If you didn’t see my last rant I switched from php to python because I know python and php didn’t like working or doing anything.

Comments
  • 0
    Some more information might be helpful.
  • 2
    @sbiewald oh my apologies.

    So I need a login/signup program. It doesn’t need security (it’s not for real production just an example project for some of the students at this school) and I’m trying to work on the SQLite database to go with the whole log in and sign up functions.

    I’ve been trying to do it myself but I’m having a lot of trouble understanding how everything in flask works.
  • 0
    @Charon92 no
  • 1
    I'll drop a small snippet here, maybe it helps:

    from flask import request

    ...

    @app.route('/signup', methods=['get', 'post'])
    def signup():
    if request.method == 'GET:
    return signup_form_HTML
    else:
    # Form data is in request.form[key]
    do_db_actions() # SQLite or whatever
    return response_HTML

    The request object is unique to every request.
  • 0
    I was using SQLite but I could try SQLAlchemy. I’m just trying to get this done as soon as I can. My problems are mostly coming from that I’m trying to learn flask as I go and I can’t understand any of it
  • 0
    If anyone could add me on discord and help so it’ll be easier to have a conversation that would be great
    BubbsTheSupreme#0157
  • 0
    @Charon92 wait so do I import SQLite as well as alchemy?
  • 0
    And if it means simplifying and shortening a lot of the project I’ll even use JSON as a simple database which never crossed my mind until now
  • 0
    @Charon92 are we gonna continue using devRant or sumn else. And I can wait No worried thank you for help
  • 0
    I have the css and html although I don’t know what I have to do with some of the html to get it to work with Flask. I want to learn I just can’t understand it.
  • 1
    @Bubbles
    a) defined the 'routes', e.g. functions for the sites (see above)
    b) return the HTML in the functions

    CSS is placed in the static folder. It is reachable with /static/ in the URL.

    The Flask quick start guide is quite helpful: http://flask.pocoo.org/docs/1.0/...
  • 0
    @sbiewald I’m not really able to understand. I can return files but that’s about it. I have a program written but I don’t know why. And i can’t understand the fixes and explainations on SO because I don’t even know what I did wrong in the first place
  • 0
    @Charon92 what’s the numbers for your name
  • 0
    @Charon92 thank you
Add Comment