v3 structure

This commit is contained in:
Felipe Martín 2015-12-02 22:57:44 +01:00
parent 2a409f2f40
commit 97329994f6
82 changed files with 89 additions and 25 deletions

19
.gitignore vendored
View File

@ -1,10 +1,13 @@
# Python
*.pyc
__pycache__
.virtualenv
node_modules
**/bower
bower_components
**/CACHE/*
*.sublime-workspace
.sass-cache
db.sqlite3
/projects
# App
local_settings.py
# Emacs
*~
# OS X
.DS_Store

View File

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

17
_old/requirements.txt Normal file
View File

@ -0,0 +1,17 @@
Django==1.7.7
Jinja2==2.7.3
django-jinja==1.3.1
dj-database-url==0.3.0
django-suit==0.2.12
django-reversion==1.8.5
django-solo==1.1.0
django-ckeditor-updated==4.4.4
pytz==2014.10
django-compressor==1.4
easy-thumbnails==2.2

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from flask import Flask
from . import conf
app = Flask(__name__)
app.debug = conf.DEBUG
app.secret_key = conf.SECRET_KEY
# Import all views
from . import views

0
fmartingrcom/app.py Normal file
View File

16
fmartingrcom/conf.py Normal file
View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Enables or disables debug mode
DEBUG = False
# Secret key for some stuff
SECRET_KEY = '0123456789'
# Database URI
DATABASE_URI = 'sqlite:////tmp/fmartingrcom.db'
# Try to import local_settings module for this enviroment
try:
from local_settings import *
except ImportError:
pass

View File

@ -0,0 +1 @@
from . import home, blog, portfolio

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from .. import app
@app.route('/blog/<int:year>/<int:month>/<int:day>/<slug>/')
def blog_post(year, month, day, slug):
return ', '.join([str(var) for var in locals().values()])
@app.route('/blog/')
def blog_list():
return 'blog list'

View File

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from .. import app
@app.route('/')
def home():
return 'Sort for about page for the home'

View File

@ -0,0 +1,7 @@
# -*- coding: utf-8 -*-
from .. import app
@app.route('/projects/')
def portfolio_list():
return 'project list'

6
main.py Normal file
View File

@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
from fmartingrcom import app
if __name__ == '__main__':
app.run()

View File

@ -1,17 +1,2 @@
Django==1.7.7
Jinja2==2.7.3
django-jinja==1.3.1
dj-database-url==0.3.0
django-suit==0.2.12
django-reversion==1.8.5
django-solo==1.1.0
django-ckeditor-updated==4.4.4
pytz==2014.10
django-compressor==1.4
easy-thumbnails==2.2
# Web
Flask==0.10.1