mirror of
https://github.com/Xevion/runnerspace.git
synced 2025-12-06 03:16:21 -06:00
Change all relative imports to standard imports
This commit is contained in:
37
README.md
37
README.md
@@ -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
8
app.py
@@ -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)
|
||||
|
||||
4
auth.py
4
auth.py
@@ -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__)
|
||||
|
||||
|
||||
4
forms.py
4
forms.py
@@ -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__)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user