From 35edb9d2bc628eece7d3a05a688f8077b2ac3930 Mon Sep 17 00:00:00 2001 From: Chris Reeves Date: Sat, 30 Mar 2013 12:12:57 +0000 Subject: [PATCH] Included example django project --- examples/django/__PROJECT_NAME__/__init__.py | 1 + .../__PROJECT_NAME__/config/__init__.py | 0 .../config/common/__init__.py | 0 .../config/common/settings.py | 83 +++ .../__PROJECT_NAME__/config/dev/__init__.py | 0 .../__PROJECT_NAME__/config/dev/nginx.conf | 25 + .../__PROJECT_NAME__/config/dev/settings.py | 31 ++ .../__PROJECT_NAME__/context_processors.py | 16 + .../__PROJECT_NAME__/public/css/main.css | 0 .../__PROJECT_NAME__/public/css/normalize.css | 504 ++++++++++++++++++ .../__PROJECT_NAME__/public/img/cat.gif | Bin 0 -> 13481 bytes .../django/__PROJECT_NAME__/public/js/app.js | 0 .../__PROJECT_NAME__/public/less/main.less | 0 .../__PROJECT_NAME__/templates/404.html | 5 + .../__PROJECT_NAME__/templates/500.html | 5 + .../__PROJECT_NAME__/templates/base.html | 19 + .../django/__PROJECT_NAME__/tests/__init__.py | 0 .../__PROJECT_NAME__/tests/test_example.py | 15 + examples/django/__PROJECT_NAME__/urls.py | 25 + examples/django/readme.md | 5 + examples/django/requirements.txt | 11 + examples/django/setup.py | 18 + facio/facio/__init__.py | 3 - 23 files changed, 763 insertions(+), 3 deletions(-) create mode 100644 examples/django/__PROJECT_NAME__/__init__.py create mode 100644 examples/django/__PROJECT_NAME__/config/__init__.py create mode 100644 examples/django/__PROJECT_NAME__/config/common/__init__.py create mode 100644 examples/django/__PROJECT_NAME__/config/common/settings.py create mode 100644 examples/django/__PROJECT_NAME__/config/dev/__init__.py create mode 100644 examples/django/__PROJECT_NAME__/config/dev/nginx.conf create mode 100644 examples/django/__PROJECT_NAME__/config/dev/settings.py create mode 100644 examples/django/__PROJECT_NAME__/context_processors.py create mode 100644 examples/django/__PROJECT_NAME__/public/css/main.css create mode 100644 examples/django/__PROJECT_NAME__/public/css/normalize.css create mode 100644 examples/django/__PROJECT_NAME__/public/img/cat.gif create mode 100644 examples/django/__PROJECT_NAME__/public/js/app.js create mode 100644 examples/django/__PROJECT_NAME__/public/less/main.less create mode 100644 examples/django/__PROJECT_NAME__/templates/404.html create mode 100644 examples/django/__PROJECT_NAME__/templates/500.html create mode 100644 examples/django/__PROJECT_NAME__/templates/base.html create mode 100644 examples/django/__PROJECT_NAME__/tests/__init__.py create mode 100644 examples/django/__PROJECT_NAME__/tests/test_example.py create mode 100644 examples/django/__PROJECT_NAME__/urls.py create mode 100644 examples/django/readme.md create mode 100644 examples/django/requirements.txt create mode 100644 examples/django/setup.py diff --git a/examples/django/__PROJECT_NAME__/__init__.py b/examples/django/__PROJECT_NAME__/__init__.py new file mode 100644 index 0000000..e92dbbb --- /dev/null +++ b/examples/django/__PROJECT_NAME__/__init__.py @@ -0,0 +1 @@ +__version__ = '0.1dev' diff --git a/examples/django/__PROJECT_NAME__/config/__init__.py b/examples/django/__PROJECT_NAME__/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/config/common/__init__.py b/examples/django/__PROJECT_NAME__/config/common/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/config/common/settings.py b/examples/django/__PROJECT_NAME__/config/common/settings.py new file mode 100644 index 0000000..b75be86 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/config/common/settings.py @@ -0,0 +1,83 @@ +""" +{{ PROJECT_NAME }}.config.common.settings +----------------------------------------- +""" + +from os.path import abspath, join, dirname + + +""" Paths """ +SITE_ROOT = abspath(join(dirname(__file__), '..', '..')) +PROJECT_ROOT = abspath(join(dirname(__file__), '..', '..')) +MEDIA_ROOT = join(SITE_ROOT, 'media') +STATICFILES_DIRS = [ + join(PROJECT_ROOT, 'public'), ] +LOG_ROOT = join(SITE_ROOT, 'logs') + +""" Urls """ +STATIC_URL = '/s/' +MEDIA_URL = '/m/' +ROOT_URLCONF = '{{ PROJECT_NAME }}.urls' + +""" Secret Key & Site ID """ +SITE_ID = 1 +SECRET_KEY = '{{ DJANGO_SECRET_KEY }}' + +""" Location """ +TIME_ZONE = 'Europe/London' +LANGUAGE_CODE = 'en-gb' +USE_I18N = True +USE_L10N = True + +""" Templates """ +TEMPLATE_DIRS = [join(PROJECT_ROOT, 'templates')] +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.Loader', + 'django.template.loaders.app_directories.Loader', +) +TEMPLATE_CONTEXT_PROCESSORS = ( + 'django.contrib.auth.context_processors.auth', + 'django.core.context_processors.debug', + 'django.core.context_processors.i18n', + 'django.core.context_processors.media', + 'django.core.context_processors.static', + 'django.core.context_processors.request', + 'django.contrib.messages.context_processors.messages', + '{{ PROJECT_NAME }}.context_processors.domain', +) + +""" Middleware """ +MIDDLEWARE_CLASSES = ( + 'django.middleware.cache.UpdateCacheMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.cache.FetchFromCacheMiddleware', +) + +""" Installed Applications """ +INSTALLED_APPS = ( + # Django Apps + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.messages', + 'django.contrib.admin', + 'django.contrib.staticfiles', + # Third Party Apps here + # Project Apps here +) + +""" Test Suite """ +NOSE_ARGS = [ + '--include=^(can|it|ensure|must|should|specs?|examples?)', + '--with-spec', + '--spec-color', + '-s', + '--with-coverage', + '--cover-erase', + '--cover-package={{ PROJECT_NAME }}'] +TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' diff --git a/examples/django/__PROJECT_NAME__/config/dev/__init__.py b/examples/django/__PROJECT_NAME__/config/dev/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/config/dev/nginx.conf b/examples/django/__PROJECT_NAME__/config/dev/nginx.conf new file mode 100644 index 0000000..54768b7 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/config/dev/nginx.conf @@ -0,0 +1,25 @@ +# +# Development Nginx Config +# + +# Standard Port 80 +server { + + listen 80; + server_name _; # Catch all + + client_max_body_size 500M; + + access_log /var/log/nginx/{{ PROJECT_NAME }}.access.log combined; + error_log /var/log/nginx/{{ PROJECT_NAME }}.error.log; + + location / { + + proxy_pass http://127.0.0.1:9000; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + } + +} diff --git a/examples/django/__PROJECT_NAME__/config/dev/settings.py b/examples/django/__PROJECT_NAME__/config/dev/settings.py new file mode 100644 index 0000000..240efb4 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/config/dev/settings.py @@ -0,0 +1,31 @@ +""" +{{ PROJECT_NAME }}.config.settings.dev +-------------------------------------- +""" + +from ..common.settings import * + + +""" Debugging (default True for local environment) """ +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +""" Databases (default is mysql) """ +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'NAME': '{{ PROJECT_NAME }}', + 'USER': 'root', + 'PASSWORD': '', + } +} + +""" Cacheing (default is dummy, see django docs) """ +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.dummy.DummyCache', + } +} + +""" Use MD5 Password Hashing for Dev - Speeds things up """ +PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher'] diff --git a/examples/django/__PROJECT_NAME__/context_processors.py b/examples/django/__PROJECT_NAME__/context_processors.py new file mode 100644 index 0000000..3778def --- /dev/null +++ b/examples/django/__PROJECT_NAME__/context_processors.py @@ -0,0 +1,16 @@ +""" +{{ PROJECT_NAME }}.context_processors +------------------------------------- +""" + +from django.conf import settings +from django.contrib.sites.models import Site + + +def domain(request): + current_site = Site.objects.get_current() + domain = getattr(settings, 'DOMAIN', 'http://%s' % current_site.domain) + return { + 'DOMAIN': domain, + 'site': current_site, + } diff --git a/examples/django/__PROJECT_NAME__/public/css/main.css b/examples/django/__PROJECT_NAME__/public/css/main.css new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/public/css/normalize.css b/examples/django/__PROJECT_NAME__/public/css/normalize.css new file mode 100644 index 0000000..bc73222 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/public/css/normalize.css @@ -0,0 +1,504 @@ +/*! normalize.css v1.0.2 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE 6/7/8/9 and Firefox 3. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. + */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE 7/8/9, Firefox 3, + * and Safari 4. + * Known issue: no IE 6 support. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Corrects text resizing oddly in IE 6/7 when body `font-size` is set using + * `em` units. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-size: 100%; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Addresses `font-family` inconsistency between `textarea` and other form + * elements. + */ + +html, +button, +input, +select, +textarea { + font-family: sans-serif; +} + +/* + * Addresses margins handled incorrectly in IE 6/7. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses font sizes and margins set differently in IE 6/7. + * Addresses font sizes within `section` and `article` in Firefox 4+, Safari 5, + * and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.67em; + margin: 2.33em 0; +} + +/* + * Addresses styling not present in IE 7/8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE 6/7/8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/* + * Addresses margins set differently in IE 6/7. + */ + +p, +pre { + margin: 1em 0; +} + +/* + * Corrects font family set oddly in IE 6, Safari 4/5, and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Addresses CSS quotes not supported in IE 6/7. + */ + +q { + quotes: none; +} + +/* + * Addresses `quotes` property not supported in Safari 4. + */ + +q:before, +q:after { + content: ''; + content: none; +} + +/* + * Addresses inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Lists + ========================================================================== */ + +/* + * Addresses margins set differently in IE 6/7. + */ + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +/* + * Addresses paddings set differently in IE 6/7. + */ + +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +/* + * Corrects list images handled incorrectly in IE 7. + */ + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * 1. Removes border when inside `a` element in IE 6/7/8/9 and Firefox 3. + * 2. Improves image quality when scaled in IE 7. + */ + +img { + border: 0; /* 1 */ + -ms-interpolation-mode: bicubic; /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE 6/7/8/9, Safari 5, and Opera 11. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Corrects margin displayed oddly in IE 6/7. + */ + +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE 6/7/8/9. + * 2. Corrects text not wrapping in Firefox 3. + * 3. Corrects alignment displayed oddly in IE 6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; + white-space: normal; /* 2 */ + *margin-left: -7px; /* 3 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers. + * 2. Addresses margins set differently in IE 6/7, Firefox 3+, Safari 5, + * and Chrome. + * 3. Improves appearance and consistency in all browsers. + */ + +button, +input, +select, +textarea { + font-size: 100%; /* 1 */ + margin: 0; /* 2 */ + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ +} + +/* + * Addresses Firefox 3+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE 7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE 6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + *overflow: visible; /* 4 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to content-box in IE 8/9. + * 2. Removes excess padding in IE 8/9. + * 3. Removes excess padding in IE 7. + * Known issue: excess padding remains in IE 6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Addresses `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in Firefox 3+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE 6/7/8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/examples/django/__PROJECT_NAME__/public/img/cat.gif b/examples/django/__PROJECT_NAME__/public/img/cat.gif new file mode 100644 index 0000000000000000000000000000000000000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%0!R(eNqV^QsfiqA=Y=21FL*E2Z@;4N^nbzIX&dNo|$z+ z_@Zw`dVC0Jckl)-<&y@eO1crvir$KYs%Wbio4Vh%uB(T^1~BV0DD! zmwiY0N<9K#4Fc=>+pYgpn*Fvn<%wBAd>;Lk4!K(xx5T*t6}tgZO% U;5Z9f6+-^6|E~BXLO}`tFNB}=x&QzG literal 0 HcmV?d00001 diff --git a/examples/django/__PROJECT_NAME__/public/js/app.js b/examples/django/__PROJECT_NAME__/public/js/app.js new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/public/less/main.less b/examples/django/__PROJECT_NAME__/public/less/main.less new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/templates/404.html b/examples/django/__PROJECT_NAME__/templates/404.html new file mode 100644 index 0000000..7c1e24e --- /dev/null +++ b/examples/django/__PROJECT_NAME__/templates/404.html @@ -0,0 +1,5 @@ +{% extends 'base.html' %} + +{% block body %} +Error 404 +{% endblock %} \ No newline at end of file diff --git a/examples/django/__PROJECT_NAME__/templates/500.html b/examples/django/__PROJECT_NAME__/templates/500.html new file mode 100644 index 0000000..36269b2 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/templates/500.html @@ -0,0 +1,5 @@ +{% extends 'base.html' %} + +{% block body %} +Error 500 +{% endblock %} \ No newline at end of file diff --git a/examples/django/__PROJECT_NAME__/templates/base.html b/examples/django/__PROJECT_NAME__/templates/base.html new file mode 100644 index 0000000..7b204e7 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/templates/base.html @@ -0,0 +1,19 @@ + + + + + + + + {{ PROJECT_NAME }} + + + + + + + +

{{ PROJECT_NAME }}

+ {% block content %}{% endblock %} + + diff --git a/examples/django/__PROJECT_NAME__/tests/__init__.py b/examples/django/__PROJECT_NAME__/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/django/__PROJECT_NAME__/tests/test_example.py b/examples/django/__PROJECT_NAME__/tests/test_example.py new file mode 100644 index 0000000..8ac7bf2 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/tests/test_example.py @@ -0,0 +1,15 @@ +""" +{{ PROJECT_NAME }}.tests.test_example +------------------------------------- + +Example tests file, please remove. +""" + + +from django.utils import unittest + + +class ExampleTestCase(unittest.TestCase): + + def should_assert_true(self): + assert True diff --git a/examples/django/__PROJECT_NAME__/urls.py b/examples/django/__PROJECT_NAME__/urls.py new file mode 100644 index 0000000..0a3bc35 --- /dev/null +++ b/examples/django/__PROJECT_NAME__/urls.py @@ -0,0 +1,25 @@ +""" +{{ PROJECT_NAME }}.urls +----------------------- +""" + +from django.conf import settings +from django.conf.urls.defaults import patterns, include, url +from django.contrib import admin +from django.views.generic.simple import direct_to_template + + +admin.autodiscover() +urlpatterns = patterns('') + +if settings.DEBUG: + urlpatterns += patterns('', + url(r'^404/$', direct_to_template, {'template': '404.html'}, + name='404'), + url(r'^500/$', direct_to_template, {'template': '500.html'}, + name='500'), + ) + +urlpatterns = patterns('', + (r'^admin/', include(admin.site.urls)), +) diff --git a/examples/django/readme.md b/examples/django/readme.md new file mode 100644 index 0000000..61e843d --- /dev/null +++ b/examples/django/readme.md @@ -0,0 +1,5 @@ +# {% filter title %}{{ PROJECT_NAME|replace("_", " ") }}{% endfilter %} # + +## Description ## + +Please enter a project description here. diff --git a/examples/django/requirements.txt b/examples/django/requirements.txt new file mode 100644 index 0000000..e7768fc --- /dev/null +++ b/examples/django/requirements.txt @@ -0,0 +1,11 @@ +Django==1.5.1 +MySQL-python +ipython +ipdb +django-nose +nose +nose-cover3 +coverage +figleaf +pinocchio +specloud diff --git a/examples/django/setup.py b/examples/django/setup.py new file mode 100644 index 0000000..f8ff33c --- /dev/null +++ b/examples/django/setup.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +""" +{{ PROJECT_NAME }} +------------------ +""" + +from setuptools import setup, find_packages +from {{ PROJECT_NAME }} import __version__ + + +setup( + name="{{ PROJECT_NAME }}", + version=__version__, + author='{{ AUTHOR }}', + author_email='{{ AUTHOR_EMAIL }}', + packages=find_packages( + exclude=['examples', 'tests']), +) diff --git a/facio/facio/__init__.py b/facio/facio/__init__.py index 5648e65..7f05c3b 100644 --- a/facio/facio/__init__.py +++ b/facio/facio/__init__.py @@ -22,9 +22,6 @@ class Facio(object): def __init__(self): '''Constructor, fires all required methods.''' - with indent(4, quote=' >'): - puts(green('Starting')) - # Basic Skeleton Generation self.config = Config() self.template = Template(self.config)