-
Notifications
You must be signed in to change notification settings - Fork 3
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
0 parents
commit 6e7a754
Showing
41 changed files
with
594 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,3 @@ | ||
{ | ||
"directory" : "frontend/bower_components" | ||
} |
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,18 @@ | ||
# Python byte-compiled files | ||
__pycache__/ | ||
|
||
# Environment files | ||
*.sqlite3 | ||
/settings/local.py | ||
.DS_Store | ||
/.env | ||
.directory | ||
|
||
# Front-end assets and media | ||
/frontend/bower_components | ||
/node_modules | ||
/_public | ||
/_media | ||
|
||
# Other cache | ||
/.cache |
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,28 @@ | ||
|
||
define step | ||
@echo -e "\x1b[34;01m>>> $(1)\x1b[0m" | ||
endef | ||
|
||
|
||
pip-compile: | ||
# Update requirements/*.txt with latest packages from requirements/*.in | ||
$(call step,Installing/upgrading pip-tools...) | ||
pip install -qU pip-tools | ||
|
||
$(call step,Upgrading local packages...) | ||
pip-compile -U requirements/dev.in | ||
pip-compile -U requirements/heroku.in | ||
pip-compile -U requirements/production.in | ||
|
||
$(call step,Compiling test requirements...) | ||
pip-compile -U -o requirements/test.txt requirements/production.in requirements/test.in | ||
|
||
|
||
install-dev-requirements: | ||
# Install requirements for a local development environment | ||
$(call step,Installing dev requirements...) | ||
pip install -qU pip-tools | ||
pip-sync requirements/*.txt | ||
|
||
setup-frontend: | ||
bower install --allow-root |
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,2 @@ | ||
release: bin/post_compile | ||
web: gunicorn backend.wsgi --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,49 @@ | ||
# Turbo Send Email # | ||
|
||
Web application to send mails in a turbo speed. | ||
|
||
|
||
## Instructions | ||
|
||
### Requirements | ||
|
||
- Linux/MacOS | ||
- Git | ||
- Python 3.6 | ||
|
||
### Instalation | ||
|
||
Run the following commands on your terminal: | ||
|
||
```bash | ||
$ git clone [email protected]:mazulo/turbo_send_mail.git | ||
$ cd turbo_send_mail | ||
$ pip install -r requirements.txt | ||
$ python manage.py migrate | ||
``` | ||
|
||
and then... | ||
|
||
### Run the server | ||
|
||
```bash | ||
$ ./manage.py runserver | ||
Performing system checks... | ||
|
||
System check identified no issues (0 silenced). | ||
Django version 1.10.5, using settings 'settings' | ||
Starting development server at http://127.0.0.1:8000/ | ||
Quit the server with CONTROL-C. | ||
``` | ||
|
||
### How to use | ||
|
||
You can use it by access `http://127.0.0.1:8000/` | ||
|
||
### Tests | ||
|
||
To run the tests: | ||
|
||
```bash | ||
python manage.py test backend | ||
``` |
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,15 @@ | ||
{ | ||
"name": "TurboSendMail", | ||
"addons": [ | ||
], | ||
"env": { | ||
"DJANGO_DEBUG": "1", | ||
"DJANGO_SECRET_KEY": { | ||
"generator": "secret" | ||
} | ||
}, | ||
"buildpacks": [ | ||
{"url": "heroku/nodejs"}, | ||
{"url": "heroku/python"} | ||
] | ||
} |
Empty file.
Empty 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,9 @@ | ||
from django.apps import AppConfig | ||
from settings.base import BASE_DIR | ||
|
||
|
||
class DefaultApp(AppConfig): | ||
label = 'core' | ||
name = 'backend.core' | ||
path = BASE_DIR.child('backend', 'core') | ||
verbose_name = 'Core Application' |
Empty file.
Empty file.
Empty file.
Empty 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,7 @@ | ||
from django.conf.urls import url | ||
from . import views | ||
|
||
|
||
urlpatterns = [ | ||
url(r'^$', views.IndexView.as_view(), name='index'), | ||
] |
Empty 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,6 @@ | ||
from django.views import generic | ||
|
||
|
||
class IndexView(generic.TemplateView): | ||
|
||
template_name = 'core/index.html' |
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,9 @@ | ||
from django.conf.urls import include, url | ||
from django.contrib import admin | ||
|
||
urlpatterns = [ | ||
# Django admin | ||
url(r'^admin/', include(admin.site.urls)), | ||
# Local apps | ||
url(r'^', include('backend.core.urls', namespace='core')), | ||
] |
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,12 @@ | ||
""" | ||
WSGI config for valid_credit_card project. | ||
It exposes the WSGI callable as a module-level variable named ``application``. | ||
For more information on this file, see | ||
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ | ||
""" | ||
|
||
import os | ||
from django.core.wsgi import get_wsgi_application | ||
|
||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") | ||
application = get_wsgi_application() |
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,3 @@ | ||
# !/usr/bin/env bash | ||
echo "=> Performing database migrations..." | ||
python manage.py migrate |
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,16 @@ | ||
{ | ||
"name": "turbosendmail", | ||
"authors": [ | ||
"Patrick Mazulo <[email protected]>" | ||
], | ||
"description": "", | ||
"main": "", | ||
"license": "COMMERCIAL", | ||
"homepage": "", | ||
"private": true, | ||
"dependencies": { | ||
"jquery": "^3.1.0", | ||
"susy": "^2.2.12", | ||
"semantic": "^2.2.4" | ||
} | ||
} |
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,24 @@ | ||
# Rename to .env | ||
DATABASE_URL='postgres://user:password@localhost:5432/database_name' | ||
DEBUG=True | ||
|
||
SECRET_KEY=put-an-awesome-secret-key-here | ||
ALLOWED_HOSTS=127.0.0.1 | ||
|
||
STATIC_URL= | ||
MEDIA_URL= | ||
|
||
# Email settings | ||
DEFAULT_FROM_EMAIL= | ||
EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend | ||
EMAIL_HOST= | ||
SENDGRID_PASSWORD= | ||
SENDGRID_USERNAME= | ||
EMAIL_PORT=587 | ||
EMAIL_USE_TLS=True | ||
|
||
|
||
# Third apps tokens | ||
TWITTER_CONSUMER_KEY= | ||
TWITTER_CONSUMER_SECRET= | ||
|
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 @@ | ||
@import 'susy'; | ||
|
||
|
||
$susy: ( | ||
columns: 12, | ||
container: 1168px, | ||
global-box-sizing: border-box, | ||
gutter-position: split, | ||
gutters: 0.25, | ||
); | ||
|
||
|
||
body { | ||
background: #eee; | ||
|
||
& > * { | ||
@include container; | ||
} | ||
main > section { | ||
@include span(full); | ||
} | ||
|
||
} |
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,20 @@ | ||
{% load compress %} | ||
{% load static %} | ||
|
||
|
||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>{{ view.title }}</title> | ||
|
||
{% compress css %} | ||
<link rel="stylesheet" type="text/css" href="{% static 'semantic/dist/semantic.css' %}"> | ||
<link rel="stylesheet" type="text/x-scss" href="{% static 'styles/main.scss' %}"> | ||
{% endcompress %} | ||
</head> | ||
<body> | ||
<main id="{{ view.title|slugify }}"> | ||
{% block content %}{% endblock content %} | ||
</main> | ||
</body> | ||
</html> |
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,5 @@ | ||
{% extends 'base.html' %} | ||
|
||
|
||
{% block content %} | ||
{% endblock content %} |
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,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
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 @@ | ||
{ | ||
"name": "TurboSendMail", | ||
"description": "This application will send emails in a turbo speed.", | ||
"version": "1.0.0", | ||
"author": "Patrick Mazulo", | ||
"dependencies": { | ||
"bower": "1.7.9" | ||
}, | ||
"license": "UNLICENSED", | ||
"repository": "https://github.com/mazulo/turbo_send_mail", | ||
"engines": { | ||
"node": "5.11.1" | ||
}, | ||
"scripts": { | ||
"heroku-postbuild": "./node_modules/.bin/bower install" | ||
} | ||
} |
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,26 @@ | ||
# Our favorite web framework | ||
Django==1.11.2 | ||
|
||
# Read sensitive settings from the environment | ||
python-decouple==3.0 | ||
|
||
# Ease path/files operations | ||
Unipath==1.1 | ||
|
||
# 12fator-like database URL parser | ||
dj-database-url==0.4.2 | ||
|
||
# Static files manager | ||
django-compressor==2.1.1 | ||
|
||
# Static files compilers | ||
libsass==0.13.2 | ||
|
||
# PostgreSQL driver | ||
psycopg2==2.7.1 | ||
|
||
# The WSGI server of choice | ||
gunicorn==19.7.1 | ||
|
||
# Support static files on Heroku | ||
whitenoise==3.3.0 |
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 @@ | ||
-r production.in |
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 @@ | ||
# | ||
# This file is autogenerated by pip-compile | ||
# To update, run: | ||
# | ||
# pip-compile --output-file requirements/dev.txt requirements/dev.in | ||
# | ||
click==6.7 # via python-dotenv | ||
dj-database-url==0.4.2 | ||
django-appconf==1.0.2 # via django-compressor | ||
django-compressor==2.1.1 | ||
django==1.11.2 | ||
gunicorn==19.7.1 | ||
libsass==0.13.2 | ||
psycopg2==2.7.1 | ||
python-decouple==3.0 | ||
python-dotenv==0.6.4 | ||
pytz==2017.2 # via django | ||
rcssmin==1.0.6 # via django-compressor | ||
rjsmin==1.0.12 # via django-compressor | ||
six==1.10.0 # via libsass | ||
unipath==1.1 |
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,2 @@ | ||
-r production.in | ||
whitenoise |
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,22 @@ | ||
# | ||
# This file is autogenerated by pip-compile | ||
# To update, run: | ||
# | ||
# pip-compile --output-file requirements/heroku.txt requirements/heroku.in | ||
# | ||
click==6.7 # via python-dotenv | ||
dj-database-url==0.4.2 | ||
django-appconf==1.0.2 # via django-compressor | ||
django-compressor==2.1.1 | ||
django==1.11.2 | ||
gunicorn==19.7.1 | ||
libsass==0.13.2 | ||
psycopg2==2.7.1 | ||
python-decouple==3.0 | ||
python-dotenv==0.6.4 | ||
pytz==2017.2 # via django | ||
rcssmin==1.0.6 # via django-compressor | ||
rjsmin==1.0.12 # via django-compressor | ||
six==1.10.0 # via libsass | ||
unipath==1.1 | ||
whitenoise==3.3.0 |
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,9 @@ | ||
dj-database-url | ||
python-decouple | ||
Django | ||
psycopg2 | ||
python-dotenv | ||
gunicorn | ||
django_compressor | ||
libsass | ||
unipath |
Oops, something went wrong.