Skip to content

Commit

Permalink
Bump Codebase Version
Browse files Browse the repository at this point in the history
  • Loading branch information
App Generator committed Sep 16, 2021
1 parent e18b4d7 commit 0bd8b02
Show file tree
Hide file tree
Showing 1,952 changed files with 59,363 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
@@ -0,0 +1,17 @@
flask/
*.pyc
dev
node_modules
app/database.db
app/build
yarn.lock
yarn-error.log
*.psd
env/
env__/
.vscode/symbols.json
app/db.sqlite3

app/static/assets/node_modules
app/static/assets/yarn.lock
app/static/assets/.temp
14 changes: 14 additions & 0 deletions Dockerfile
@@ -0,0 +1,14 @@
FROM python:3.9

COPY . .

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

# install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# gunicorn
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]
31 changes: 31 additions & 0 deletions LICENSE.md
@@ -0,0 +1,31 @@
# MIT License

Copyright (c) 2019 - present [AppSeed](http://appseed.us/)

<br />

## Licensing Information

<br />

| Item | - |
| ---------------------------------- | --- |
| License Type | MIT |
| Use for print | **YES** |
| Create single personal website/app | **YES** |
| Create single website/app for client | **YES** |
| Create multiple website/apps for clients | **YES** |
| Create multiple SaaS applications | **YES** |
| End-product paying users | **YES** |
| Product sale | **YES** |
| Remove footer credits | **YES** |
| --- | --- |
| Remove copyright mentions from source code | NO |
| Create HTML/CSS template for sale | NO |
| Create Theme/Template for CMS for sale | NO |
| Separate sale of our UI Elements | NO |

<br />

---
For more information regarding licensing, please contact the AppSeed Service < *support@appseed.us* >
1 change: 1 addition & 0 deletions Procfile
@@ -0,0 +1 @@
web: gunicorn run:app --log-file=-
32 changes: 32 additions & 0 deletions app/__init__.py
@@ -0,0 +1,32 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

import os

from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt

# Grabs the folder where the script runs.
basedir = os.path.abspath(os.path.dirname(__file__))

app = Flask(__name__)

app.config.from_object('app.config.Config')

db = SQLAlchemy (app) # flask-sqlalchemy
bc = Bcrypt (app) # flask-bcrypt

lm = LoginManager( ) # flask-loginmanager
lm.init_app(app) # init the login manager

# Setup database
@app.before_first_request
def initialize_database():
db.create_all()

# Import routing, models and Start the App
from app import views, models
21 changes: 21 additions & 0 deletions app/config.py
@@ -0,0 +1,21 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

import os
from decouple import config

# Grabs the folder where the script runs.
basedir = os.path.abspath(os.path.dirname(__file__))

class Config():

CSRF_ENABLED = True

# Set up the App SECRET_KEY
SECRET_KEY = config('SECRET_KEY', default='S#perS3crEt_007')

# This will create a file in <app> FOLDER
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')
SQLALCHEMY_TRACK_MODIFICATIONS = False
19 changes: 19 additions & 0 deletions app/forms.py
@@ -0,0 +1,19 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired
from wtforms import StringField, TextAreaField, SubmitField, PasswordField
from wtforms.validators import InputRequired, Email, DataRequired

class LoginForm(FlaskForm):
username = StringField (u'Username' , validators=[DataRequired()])
password = PasswordField(u'Password' , validators=[DataRequired()])

class RegisterForm(FlaskForm):
name = StringField (u'Name' )
username = StringField (u'Username' , validators=[DataRequired()])
password = PasswordField(u'Password' , validators=[DataRequired()])
email = StringField (u'Email' , validators=[DataRequired(), Email()])
32 changes: 32 additions & 0 deletions app/models.py
@@ -0,0 +1,32 @@
# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

from app import db
from flask_login import UserMixin

class User(UserMixin, db.Model):

id = db.Column(db.Integer, primary_key=True)
user = db.Column(db.String(64), unique = True)
email = db.Column(db.String(120), unique = True)
password = db.Column(db.String(500))

def __init__(self, user, email, password):
self.user = user
self.password = password
self.email = email

def __repr__(self):
return str(self.id) + ' - ' + str(self.user)

def save(self):

# inject self into db session
db.session.add ( self )

# commit change and save the object
db.session.commit( )

return self

0 comments on commit 0bd8b02

Please sign in to comment.