-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Showing
241 changed files
with
4,375 additions
and
2,918 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,23 @@ | ||
# generated by deepsource.io | ||
version = 1 | ||
|
||
test_patterns = [ | ||
'tests/**/*.py' | ||
] | ||
|
||
exclude_patterns = [ | ||
'databases/migrations/*' | ||
] | ||
|
||
[[analyzers]] | ||
name = "python" | ||
enabled = true | ||
runtime_version = "3.x.x" | ||
|
||
[analyzers.meta] | ||
max_line_length = 99 | ||
|
||
# Test coverage analyzer | ||
[[analyzers]] | ||
name = "test-coverage" | ||
enabled = true |
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
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,8 @@ | ||
DB_DRIVER=sqlite | ||
DB_CONNECTION=sqlite | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=masonite.db | ||
DB_USERNAME=root | ||
DB_PASSWORD= | ||
APP_DEBUG=True |
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 |
---|---|---|
|
@@ -20,3 +20,4 @@ tests/bootstrap/cache/*.txt | |
/uploads/ | ||
.coverage | ||
.idea/ | ||
masonite.db |
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
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
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,70 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
ably = "==1.0.1" | ||
"asn1crypto" = "==0.24.0" | ||
atomicwrites = "==1.2.1" | ||
attrs = "==18.2.0" | ||
backpack = "==0.1" | ||
bcrypt = "==3.1.4" | ||
blinker = "==1.4" | ||
"boto3" = "==1.5.24" | ||
botocore = "==1.8.50" | ||
certifi = "==2018.8.24" | ||
cffi = "==1.11.5" | ||
chardet = "==3.0.4" | ||
cleo = "==0.6.5" | ||
coverage = "==4.5.1" | ||
coveralls = "*" | ||
cryptography = "==2.3" | ||
docopt = "==0.6.2" | ||
docutils = "==0.14" | ||
idna = "==2.6" | ||
inflection = "==0.3.1" | ||
jmespath = "==0.9.3" | ||
lazy-object-proxy = "==1.3.1" | ||
more-itertools = "==4.3.0" | ||
msgpack-python = "==0.5.6" | ||
ndg-httpsclient = "==0.5.1" | ||
orator = "==0.9.7" | ||
pastel = "==0.1.0" | ||
pendulum = "==1.4.4" | ||
pluggy = "==0.7.1" | ||
psutil = "==5.4.7" | ||
pusher = "==1.7.4" | ||
py = "==1.6.0" | ||
pyaml = "==16.12.2" | ||
"pyasn1" = "==0.4.4" | ||
pycparser = "==2.18" | ||
pylev = "==1.3.0" | ||
python-dateutil = "==2.7.3" | ||
python-dotenv = "==0.9.1" | ||
pytz = "==2018.5" | ||
pytzdata = "==2018.5" | ||
requests = "==2.18.4" | ||
requests-file = "==1.4.3" | ||
"s3transfer" = "==0.1.13" | ||
simplejson = "==3.16.0" | ||
six = "==1.11.0" | ||
tabulate = "==0.8.2" | ||
tldextract = "==2.2.0" | ||
tzlocal = "==1.5.1" | ||
"urllib3" = "==1.22" | ||
"validator.py" = "==1.2.5" | ||
waitress = "==1.1.0" | ||
whitenoise = "==4.0" | ||
wrapt = "==1.10.11" | ||
"flake8" = "==3.5.0" | ||
pika = "*" | ||
Faker = "==0.7.18" | ||
"Jinja2" = "==2.10" | ||
MarkupSafe = "==1.0" | ||
Pygments = "==2.2.0" | ||
pyOpenSSL = "==18.0.0" | ||
PyYAML = "==3.13" | ||
|
||
[dev-packages] | ||
|
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
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
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
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 @@ | ||
"""A UnitTestController Module.""" | ||
|
||
from masonite.request import Request | ||
from masonite.controllers import Controller | ||
|
||
|
||
class UnitTestController(Controller): | ||
"""UnitTestController Controller Class.""" | ||
|
||
def __init__(self, request: Request): | ||
"""UnitTestController Initializer | ||
Arguments: | ||
request {masonite.request.Request} -- The Masonite Request class. | ||
""" | ||
self.request = request | ||
|
||
def show(self): | ||
return 'got' | ||
|
||
def store(self): | ||
return 'posted' | ||
|
||
def params(self): | ||
return self.request.input('test') | ||
|
||
def get_params(self): | ||
return self.request.input('test') | ||
|
||
def user(self): | ||
return self.request.user().name |
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
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 |
---|---|---|
@@ -1,30 +1,24 @@ | ||
""" Authentication Middleware """ | ||
"""Authentication Middleware.""" | ||
|
||
from masonite.request import Request | ||
|
||
|
||
class AuthenticationMiddleware: | ||
"""Middleware To Check If The User Is Logged In | ||
""" | ||
"""Middleware To Check If The User Is Logged In.""" | ||
|
||
def __init__(self, request: Request): | ||
"""Inject Any Dependencies From The Service Container | ||
"""Inject Any Dependencies From The Service Container. | ||
Arguments: | ||
Request {masonite.request.Request} -- The Masonite request object | ||
""" | ||
|
||
self.request = request | ||
|
||
def before(self): | ||
"""Run This Middleware Before The Route Executes | ||
""" | ||
|
||
"""Run This Middleware Before The Route Executes.""" | ||
if not self.request.user(): | ||
self.request.redirect_to('login') | ||
|
||
def after(self): | ||
"""Run This Middleware After The Route Executes | ||
""" | ||
|
||
"""Run This Middleware After The Route Executes.""" | ||
pass |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
""" CSRF Middleware """ | ||
"""CSRF Middleware.""" | ||
|
||
from masonite.middleware import CsrfMiddleware as Middleware | ||
|
||
|
||
class CsrfMiddleware(Middleware): | ||
""" Verify CSRF Token Middleware """ | ||
"""Verify CSRF Token Middleware.""" | ||
|
||
exempt = [] | ||
every_request = False | ||
token_length = 30 |
Oops, something went wrong.