Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
App Generator
committed
Sep 16, 2021
1 parent
e18b4d7
commit 0bd8b02
Showing
1,952 changed files
with
59,363 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
web: gunicorn run:app --log-file=- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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()]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.