Rename repo_name -> app_name

master
Steven Loria 11 years ago
parent e59ebf02c4
commit 7ede47885f
  1. 2
      cookiecutter.json
  2. 0
      {{cookiecutter.app_name}}/.gitignore
  3. 0
      {{cookiecutter.app_name}}/.travis.yml
  4. 0
      {{cookiecutter.app_name}}/LICENSE
  5. 1
      {{cookiecutter.app_name}}/Procfile
  6. 6
      {{cookiecutter.app_name}}/README.rst
  7. 8
      {{cookiecutter.app_name}}/manage.py
  8. 0
      {{cookiecutter.app_name}}/requirements.txt
  9. 0
      {{cookiecutter.app_name}}/requirements/dev.txt
  10. 0
      {{cookiecutter.app_name}}/requirements/prod.txt
  11. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/__init__.py
  12. 8
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/app.py
  13. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/assets.py
  14. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/database.py
  15. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/extensions.py
  16. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/__init__.py
  17. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/forms.py
  18. 12
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/public/views.py
  19. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/settings.py
  20. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/css/style.css
  21. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/js/plugins.js
  22. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/js/script.js
  23. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/css/bootstrap-theme.css
  24. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/css/bootstrap-theme.min.css
  25. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/css/bootstrap.css
  26. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/css/bootstrap.min.css
  27. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/fonts/glyphicons-halflings-regular.eot
  28. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/fonts/glyphicons-halflings-regular.svg
  29. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/fonts/glyphicons-halflings-regular.ttf
  30. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/fonts/glyphicons-halflings-regular.woff
  31. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/js/bootstrap.js
  32. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/bootstrap3/js/bootstrap.min.js
  33. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/css/font-awesome.css
  34. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/css/font-awesome.min.css
  35. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/fonts/FontAwesome.otf
  36. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/fonts/fontawesome-webfont.eot
  37. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/fonts/fontawesome-webfont.svg
  38. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/fonts/fontawesome-webfont.ttf
  39. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/font-awesome4/fonts/fontawesome-webfont.woff
  40. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/libs/jquery2/jquery-2.0.3.min.js
  41. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/public/.gitkeep
  42. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/public/css/.gitkeep
  43. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/static/public/js/.gitkeep
  44. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/401.html
  45. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/404.html
  46. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/500.html
  47. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/footer.html
  48. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/layout.html
  49. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/nav.html
  50. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/about.html
  51. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/home.html
  52. 2
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/public/register.html
  53. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/templates/users/members.html
  54. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/__init__.py
  55. 6
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/base.py
  56. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/factories.py
  57. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/test_models.py
  58. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/tests/webtest_tests.py
  59. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/__init__.py
  60. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/forms.py
  61. 4
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/models.py
  62. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/user/views.py
  63. 0
      {{cookiecutter.app_name}}/{{cookiecutter.app_name}}/utils.py
  64. 1
      {{cookiecutter.repo_name}}/Procfile

@ -3,7 +3,7 @@
"email": "sloria1@gmail.com",
"github_username": "sloria",
"project_name": "My Flask App",
"repo_name": "myflaskapp",
"app_name": "myflaskapp",
"project_short_description": "A flasky app.",
"year": "2013"
}

@ -0,0 +1 @@
web: gunicorn {{cookiecutter.app_name}}.app:create_app\(\) -b 0.0.0.0:$PORT -w 3

@ -10,8 +10,8 @@ Quickstart
::
git clone https://github.com/{{cookiecutter.github_username}}/{{ cookiecutter.repo_name }}
cd {{cookiecutter.repo_name}}
git clone https://github.com/{{cookiecutter.github_username}}/{{ cookiecutter.app_name }}
cd {{cookiecutter.app_name}}
pip install -r requirements/dev.txt
python manage.py db init
python manage.py db migrate
@ -23,7 +23,7 @@ Quickstart
Deployment
----------
In your production environment, make sure the ``{{cookiecutter.repo_name|upper}}_ENV`` environment variable is set to ``"prod"``.
In your production environment, make sure the ``{{cookiecutter.app_name|upper}}_ENV`` environment variable is set to ``"prod"``.
Shell

@ -6,11 +6,11 @@ import subprocess
from flask.ext.script import Manager, Shell, Server
from flask.ext.migrate import MigrateCommand
from {{cookiecutter.repo_name}}.app import create_app
from {{cookiecutter.repo_name}}.settings import DevConfig, ProdConfig
from {{cookiecutter.repo_name}}.database import db
from {{cookiecutter.app_name}}.app import create_app
from {{cookiecutter.app_name}}.settings import DevConfig, ProdConfig
from {{cookiecutter.app_name}}.database import db
if os.environ.get("{{cookiecutter.repo_name | upper}}_ENV") == 'prod':
if os.environ.get("{{cookiecutter.app_name | upper}}_ENV") == 'prod':
app = create_app(ProdConfig)
else:
app = create_app(DevConfig)

@ -3,11 +3,11 @@
from flask import Flask, render_template
from flask_debugtoolbar import DebugToolbarExtension
from {{cookiecutter.repo_name}}.settings import ProdConfig
from {{cookiecutter.repo_name}}.assets import assets
from {{cookiecutter.repo_name}}.extensions import (db, login_manager, migrate,
from {{cookiecutter.app_name}}.settings import ProdConfig
from {{cookiecutter.app_name}}.assets import assets
from {{cookiecutter.app_name}}.extensions import (db, login_manager, migrate,
cache)
from {{cookiecutter.repo_name}} import public, user
from {{cookiecutter.app_name}} import public, user
def create_app(config_object=ProdConfig):

@ -2,7 +2,7 @@ from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms.validators import DataRequired
from {{cookiecutter.repo_name}}.user.models import User
from {{cookiecutter.app_name}}.user.models import User
class LoginForm(Form):
username = TextField('Username', validators=[DataRequired()])

@ -4,12 +4,12 @@ from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session)
from flask.ext.login import login_user, login_required, logout_user
from {{cookiecutter.repo_name}}.extensions import login_manager
from {{cookiecutter.repo_name}}.user.models import User
from {{cookiecutter.repo_name}}.public.forms import LoginForm
from {{cookiecutter.repo_name}}.user.forms import RegisterForm
from {{cookiecutter.repo_name}}.utils import flash_errors
from {{cookiecutter.repo_name}}.database import db
from {{cookiecutter.app_name}}.extensions import login_manager
from {{cookiecutter.app_name}}.user.models import User
from {{cookiecutter.app_name}}.public.forms import LoginForm
from {{cookiecutter.app_name}}.user.forms import RegisterForm
from {{cookiecutter.app_name}}.utils import flash_errors
from {{cookiecutter.app_name}}.database import db
blueprint = Blueprint('public', __name__, static_folder="../static")

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block page_title %}Unauthorized{% endblock %}

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block page_title %}Page Not Found{% endblock %}

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block page_title %}Server error{% endblock %}

@ -31,7 +31,7 @@
<body class="{% block body_class %}{% endblock %}">
{% block body %}
{% with form=form %}
{% include "_layouts/nav.html" %}
{% include "nav.html" %}
{% endwith %}
<header>{% block header %}{% endblock %}</header>
@ -58,7 +58,7 @@
</div><!-- end container -->
{% include "_layouts/footer.html" %}
{% include "footer.html" %}
<!-- JavaScript at the bottom for fast page loading -->
{% assets "js_all" %}

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block content %}
<div class="body-content">
@ -9,4 +9,4 @@
</div>
</div>
{% endblock %}
{% endraw %}
{% endraw %}

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block content %}
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">

@ -1,5 +1,5 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block content %}
<div class="container-narrow">
<h1>Register</h1>

@ -1,7 +1,7 @@
{% raw %}
{% extends "_layouts/base.html" %}
{% extends "layout.html" %}
{% block content %}
<h1>Welcome {{ session.username }}</h1>
<h3>This is the members-only page.</h3>
{% endblock %}
{% endraw%}
{% endraw%}

@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
from flask.ext.testing import TestCase
from {{ cookiecutter.repo_name }}.settings import Config
from {{ cookiecutter.repo_name }}.app import create_app
from {{ cookiecutter.repo_name }}.database import db
from {{ cookiecutter.app_name }}.settings import Config
from {{ cookiecutter.app_name }}.app import create_app
from {{ cookiecutter.app_name }}.database import db
class TestConfig(Config):

@ -2,8 +2,8 @@
from factory import Sequence, PostGenerationMethodCall
from factory.alchemy import SQLAlchemyModelFactory
from {{cookiecutter.repo_name}}.user.models import User
from {{cookiecutter.repo_name}}.database import db
from {{cookiecutter.app_name}}.user.models import User
from {{cookiecutter.app_name}}.database import db
class UserFactory(SQLAlchemyModelFactory):

@ -2,8 +2,8 @@
import unittest
from nose.tools import * # PEP8 asserts
from {{ cookiecutter.repo_name }}.database import db
from {{ cookiecutter.repo_name }}.user.models import User
from {{ cookiecutter.app_name }}.database import db
from {{ cookiecutter.app_name }}.user.models import User
from .base import DbTestCase
from .factories import UserFactory

@ -3,8 +3,8 @@ import datetime as dt
from flask.ext.login import UserMixin
from {{cookiecutter.repo_name}}.database import db, CRUDMixin
from {{cookiecutter.repo_name}}.extensions import bcrypt
from {{cookiecutter.app_name}}.database import db, CRUDMixin
from {{cookiecutter.app_name}}.extensions import bcrypt
class User(UserMixin, CRUDMixin, db.Model):

@ -1 +0,0 @@
web: gunicorn {{cookiecutter.repo_name}}.app:create_app\(\) -b 0.0.0.0:$PORT -w 3
Loading…
Cancel
Save