From 5290aed9a17f3691b28dfeacbd0596831dedc09a Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Tue, 12 Nov 2013 07:58:28 -0800 Subject: [PATCH] integration of submissions from @luzfcb and @syst3ml00t --- README.rst | 6 ---- {{cookiecutter.repo_name}}/.gitignore | 26 +++++++++++++++ {{cookiecutter.repo_name}}/README.rst | 10 ++++++ .../requirements/base.txt | 8 ++--- .../requirements/local.txt | 3 +- .../static/css/project.css | 32 +++++++++++++++++++ .../templates/account/email.html | 6 ++-- .../templates/base.html | 6 ++++ 8 files changed, 82 insertions(+), 15 deletions(-) create mode 100644 {{cookiecutter.repo_name}}/.gitignore diff --git a/README.rst b/README.rst index d2e4f3a9..76ce3859 100644 --- a/README.rst +++ b/README.rst @@ -25,12 +25,6 @@ Constraints * PostgreSQL everywhere * Environment variables for configuration (This won't work with Apache/mod_wsgi). -Caution: Bleeding Edge Requirements ------------------------------------- - -The cookiecutter-django project is bleeding edge in that it uses the Django 1.6c1 release candidate. - -Consider yourself warned. Usage ------ diff --git a/{{cookiecutter.repo_name}}/.gitignore b/{{cookiecutter.repo_name}}/.gitignore new file mode 100644 index 00000000..92d6be51 --- /dev/null +++ b/{{cookiecutter.repo_name}}/.gitignore @@ -0,0 +1,26 @@ +# Basics +*.py[cod] +*.pyc +__pycache__ + +# Logs +*.log +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox +nosetests.xml + +# Translations +*.mo +*.pot + +# Pycharm +.idea + +# Vim + +*~ +*.swp +*.swo \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/README.rst b/{{cookiecutter.repo_name}}/README.rst index 6439a4af..82c69d4b 100644 --- a/{{cookiecutter.repo_name}}/README.rst +++ b/{{cookiecutter.repo_name}}/README.rst @@ -35,6 +35,16 @@ DJANGO_SESSION_COOKIE_SECURE SESSION_COOKIE_SECURE n/a * TODO: Add vendor-added settings in another table +Developer Installation +----------------------- + +For getting this running on your local machine: + +1. Set up a virtualenv. +2. Install all the supporting libraries into your virtualenv:: + + pip install -r requirements/local.txt + Deployment ------------ diff --git a/{{cookiecutter.repo_name}}/requirements/base.txt b/{{cookiecutter.repo_name}}/requirements/base.txt index b45127a5..094b1f74 100644 --- a/{{cookiecutter.repo_name}}/requirements/base.txt +++ b/{{cookiecutter.repo_name}}/requirements/base.txt @@ -1,5 +1,5 @@ # Bleeding edge Django -https://github.com/django/django/archive/1.6c1.tar.gz +django==1.6 # Configuration django-configurations==0.5.1 @@ -14,9 +14,7 @@ django-floppyforms==1.1 # Models South==0.8.2 -# hack so django-model-utils doesn't override Django 1.6b4 install -git+git://github.com/pydanny/django-model-utils@d71bf2db7581d91dcc8e0a66fd4859eb8969d256 - +django-model-utils==1.5.0 # images Pillow==2.1.0 @@ -30,7 +28,7 @@ psycopg2==2.5 # Unicode slugification unicode-slugify==0.1.1 -django-autoslug==1.7.1 +django-autoslug==1.7.1 # Useful things django-avatar==2.0 diff --git a/{{cookiecutter.repo_name}}/requirements/local.txt b/{{cookiecutter.repo_name}}/requirements/local.txt index 716e3473..c95883af 100644 --- a/{{cookiecutter.repo_name}}/requirements/local.txt +++ b/{{cookiecutter.repo_name}}/requirements/local.txt @@ -6,5 +6,4 @@ Sphinx # django-debug-toolbar that works with Django 1.5+ -git+git://github.com/django-debug-toolbar/django-debug-toolbar@7e4ecfd04cfe61b51e1fd6fdf0ce1c800a3ebb3b - +django-debug-toolbar==0.11.0 \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css index 5be52864..e6f35107 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/static/css/project.css @@ -1 +1,33 @@ /*! project specific CSS goes here. */ + +/* bootstrap alert CSS, translated to the django-standard levels of +** debug, info, success, warning, error */ +.alert-debug { + color: black; + background-color: white; + border-color: #d6e9c6; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-warning { + color: black; + background-color: orange; + border-color: #d6e9c6; +} + +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} \ No newline at end of file diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/email.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/email.html index 38acaabc..51c50298 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/email.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/account/email.html @@ -52,12 +52,14 @@

{% trans "Add E-mail Address" %}

-
+ {% csrf_token %} {{ form|crispy }}
- + + + {% endblock %} diff --git a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html index 8ff4b7be..3e3b1af6 100644 --- a/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html +++ b/{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/templates/base.html @@ -52,6 +52,12 @@
+ + {% if messages %} + {% for message in messages %} +
{{ message }}
+ {% endfor %} + {% endif %} {% block content %}

Use this document as a way to quick start any new project.