Skip to content

Commit 0bd8b02

Browse files
author
App Generator
committed
Bump Codebase Version
1 parent e18b4d7 commit 0bd8b02

File tree

1,952 files changed

+59363
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,952 files changed

+59363
-0
lines changed

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
flask/
2+
*.pyc
3+
dev
4+
node_modules
5+
app/database.db
6+
app/build
7+
yarn.lock
8+
yarn-error.log
9+
*.psd
10+
env/
11+
env__/
12+
.vscode/symbols.json
13+
app/db.sqlite3
14+
15+
app/static/assets/node_modules
16+
app/static/assets/yarn.lock
17+
app/static/assets/.temp

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.9
2+
3+
COPY . .
4+
5+
# set environment variables
6+
ENV PYTHONDONTWRITEBYTECODE 1
7+
ENV PYTHONUNBUFFERED 1
8+
9+
# install python dependencies
10+
RUN pip install --upgrade pip
11+
RUN pip install --no-cache-dir -r requirements.txt
12+
13+
# gunicorn
14+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]

LICENSE.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# MIT License
2+
3+
Copyright (c) 2019 - present [AppSeed](http://appseed.us/)
4+
5+
<br />
6+
7+
## Licensing Information
8+
9+
<br />
10+
11+
| Item | - |
12+
| ---------------------------------- | --- |
13+
| License Type | MIT |
14+
| Use for print | **YES** |
15+
| Create single personal website/app | **YES** |
16+
| Create single website/app for client | **YES** |
17+
| Create multiple website/apps for clients | **YES** |
18+
| Create multiple SaaS applications | **YES** |
19+
| End-product paying users | **YES** |
20+
| Product sale | **YES** |
21+
| Remove footer credits | **YES** |
22+
| --- | --- |
23+
| Remove copyright mentions from source code | NO |
24+
| Create HTML/CSS template for sale | NO |
25+
| Create Theme/Template for CMS for sale | NO |
26+
| Separate sale of our UI Elements | NO |
27+
28+
<br />
29+
30+
---
31+
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* >

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn run:app --log-file=-

app/__init__.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
import os
7+
8+
from flask import Flask
9+
from flask_sqlalchemy import SQLAlchemy
10+
from flask_login import LoginManager
11+
from flask_bcrypt import Bcrypt
12+
13+
# Grabs the folder where the script runs.
14+
basedir = os.path.abspath(os.path.dirname(__file__))
15+
16+
app = Flask(__name__)
17+
18+
app.config.from_object('app.config.Config')
19+
20+
db = SQLAlchemy (app) # flask-sqlalchemy
21+
bc = Bcrypt (app) # flask-bcrypt
22+
23+
lm = LoginManager( ) # flask-loginmanager
24+
lm.init_app(app) # init the login manager
25+
26+
# Setup database
27+
@app.before_first_request
28+
def initialize_database():
29+
db.create_all()
30+
31+
# Import routing, models and Start the App
32+
from app import views, models

app/config.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
import os
7+
from decouple import config
8+
9+
# Grabs the folder where the script runs.
10+
basedir = os.path.abspath(os.path.dirname(__file__))
11+
12+
class Config():
13+
14+
CSRF_ENABLED = True
15+
16+
# Set up the App SECRET_KEY
17+
SECRET_KEY = config('SECRET_KEY', default='S#perS3crEt_007')
18+
19+
# This will create a file in <app> FOLDER
20+
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'db.sqlite3')
21+
SQLALCHEMY_TRACK_MODIFICATIONS = False

app/forms.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from flask_wtf import FlaskForm
7+
from flask_wtf.file import FileField, FileRequired
8+
from wtforms import StringField, TextAreaField, SubmitField, PasswordField
9+
from wtforms.validators import InputRequired, Email, DataRequired
10+
11+
class LoginForm(FlaskForm):
12+
username = StringField (u'Username' , validators=[DataRequired()])
13+
password = PasswordField(u'Password' , validators=[DataRequired()])
14+
15+
class RegisterForm(FlaskForm):
16+
name = StringField (u'Name' )
17+
username = StringField (u'Username' , validators=[DataRequired()])
18+
password = PasswordField(u'Password' , validators=[DataRequired()])
19+
email = StringField (u'Email' , validators=[DataRequired(), Email()])

app/models.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# -*- encoding: utf-8 -*-
2+
"""
3+
Copyright (c) 2019 - present AppSeed.us
4+
"""
5+
6+
from app import db
7+
from flask_login import UserMixin
8+
9+
class User(UserMixin, db.Model):
10+
11+
id = db.Column(db.Integer, primary_key=True)
12+
user = db.Column(db.String(64), unique = True)
13+
email = db.Column(db.String(120), unique = True)
14+
password = db.Column(db.String(500))
15+
16+
def __init__(self, user, email, password):
17+
self.user = user
18+
self.password = password
19+
self.email = email
20+
21+
def __repr__(self):
22+
return str(self.id) + ' - ' + str(self.user)
23+
24+
def save(self):
25+
26+
# inject self into db session
27+
db.session.add ( self )
28+
29+
# commit change and save the object
30+
db.session.commit( )
31+
32+
return self

0 commit comments

Comments
 (0)