Geo's Blog I write DRY and Unbreakable code

I Made a Thing

Hey guys good day.

for a while now I've been brushing up on my back end web development and I must say it's been a blast.

after weeks of study, I built a site that works. 

some of the features of the app include:

  1. user management 
  2. ability to add post
  3. update post
  4. delete post
  5. added a fancy WYSIWYG editor with some awesome features viz.

CODE BLOCKS

This block contains a part of the code for this app


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

    if request.method == 'POST':
        username = request.form['username']
        password = request.form['password']
        next_url = request.form["next"]

        user = db.execute(
            "select * from users where username= :username", {"username": username}).fetchone()

        if user:
            session['username'] = user.username
            session['name'] = user.name
            session['email'] = user.email

            if next_url:
                return redirect(next_url)

            flash('Log in Successful')
            return redirect(url_for('index'))
        else:
            flash('Username or Password incorrect')
            return redirect(url_for('login'))

    return render_template('login.html', postt={})

IMAGES


I can upload images and I can resize in the editor




I've put in a lot of time into making this as unbreakable as possible but I'll appreciate it if you guys can find a way to break it.


Y'all Are my inspiration thank you!. 

Discuss about post