Change all relative imports to standard imports

This commit is contained in:
Xevion
2022-03-28 17:29:44 -05:00
parent e6db061500
commit 6c4b952004
6 changed files with 47 additions and 18 deletions

View File

@@ -4,8 +4,35 @@ A retro myspace clone for UTSA students.
## About
Made during Rowdy Hacks 2022, this myspace look-a-like was quickly made with intentions of serving
the UTSA student community.
Made during Rowdy Hacks 2022, this myspace look-a-like was quickly made with intentions of serving the UTSA student community. We took heavy
inspiration from my-space and other social media services of it's era.
We made this app starting almost 5 hours after this 24-hour Hackathon started and in total I stayed up for around 36 hours straight to
## Features
- Accounts
- Signup
- Login/Logout + Remember Me
- Administrative Access
- Profile Editing
- Profile Viewing
- Online and Offline account flags
- Posts
- Post Creation
- Post Feed + Comment Stats
- Appearance
- Customized to look like MySpace; UTSA themed
- CSS written to be usable on most laptops/desktops
- MySpace-like Theme
- Image used, although text-based logo fallback available
- Misc
- Human + Computer Readable Timestamps
- "3 minutes ago" and such...
- Global Header & Footer
- License Page
- About Page
- UTC Timestamped Page Rendering
## Tech Stack
@@ -18,12 +45,14 @@ the UTSA student community.
- Humanize
- Faker
# Setup
# Development Setup
Use Python 3.8.
Developed on Python 3.8.0 - thus we recommend this version specifically.
```bash
pip install pipenv
pipenv install
flask run
```
Not production ready yet.

8
app.py
View File

@@ -33,19 +33,19 @@ def create_app():
login_manager.login_view = 'auth.login'
login_manager.init_app(app)
from .models import User, Post, Comment
from models import User, Post, Comment
@login_manager.user_loader
def load_user(user_id):
return User.query.get(int(user_id))
from .auth import blueprint as auth_blueprint
from auth import blueprint as auth_blueprint
app.register_blueprint(auth_blueprint)
from .routes import blueprint as routes_blueprint
from routes import blueprint as routes_blueprint
app.register_blueprint(routes_blueprint)
from .forms import blueprint as forms_blueprint
from forms import blueprint as forms_blueprint
app.register_blueprint(forms_blueprint)
@app.errorhandler(404)

View File

@@ -2,8 +2,8 @@ from flask import Blueprint, flash, redirect, request, url_for
from flask_login import login_required, login_user, logout_user, current_user
from werkzeug.security import check_password_hash, generate_password_hash
from .models import User
from .app import db
from models import User
from app import db
blueprint = Blueprint('auth', __name__)

View File

@@ -1,8 +1,8 @@
from flask import Blueprint, flash, redirect, request, url_for
from flask_login import current_user, login_required
from .app import db
from .models import User, Post, Comment
from app import db
from models import User, Post, Comment
blueprint = Blueprint('forms', __name__)

View File

@@ -6,7 +6,7 @@ import humanize
from flask_login import UserMixin
from sqlalchemy import func
from .app import db
from app import db
MAXIMUM_ONLINE_DELTA = datetime.timedelta(minutes=1)

View File

@@ -1,7 +1,7 @@
from flask import Blueprint, redirect, render_template, url_for
from flask_login import current_user, login_required
from .models import User, Post, Comment
from models import User, Post, Comment
blueprint = Blueprint('main', __name__)