Skip to content

Commit

Permalink
Merge pull request #62 from arthur-wsw/starter_app
Browse files Browse the repository at this point in the history
New pinax-starter app requirements
  • Loading branch information
paltman committed Mar 21, 2016
2 parents 6abe606 + 20eef38 commit 085f6da
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ build
dist
.coverage
.tox
.idea
MANIFEST
*.pyc
*.egg-info
Expand Down
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
language: python
sudo: false
language: python
python:
- "2.7"
- "3.3"
- "3.4"
- "3.5"
env:
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=master
Expand All @@ -16,8 +15,6 @@ matrix:
env: DJANGO=1.9
- python: "3.3"
env: DJANGO=master
- python: "3.5"
env: DJANGO=1.7
install:
- pip install tox coveralls
script:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to Contribute

There are many ways you can help contribute to this project. Contributing
There are many ways you can help contribute to pinax-notifications. Contributing
code, writing documentation, reporting bugs, as well as reading and providing
feedback on issues and pull requests, all are valid and necessary ways to
help.
Expand Down Expand Up @@ -54,7 +54,7 @@ if appropriate.

## Coding style

When writing code to be included in django-user-accounts keep our style in mind:
When writing code to be included in pinax-notifications keep our style in mind:

* Follow [PEP8](http://www.python.org/dev/peps/pep-0008/) there are some
cases where we do not follow PEP8. It is an excellent starting point.
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2012-2015 James Tauber and contributors
# Copyright (c) 2012-2016 James Tauber and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -16,4 +16,4 @@
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# THE SOFTWARE.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include AUTHORS
include LICENSE
include README.rst
recursive-include pinax/notifications/locale *
recursive-include pinax/notifications/static *
recursive-include pinax/notifications/templates *
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ test:

docs:
mkdocs build

.PHONY: docs
2 changes: 1 addition & 1 deletion makemigrations.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def run(*args):

django.core.management.call_command(
"makemigrations",
"notifications",
"pinax_notifications",
*args
)

Expand Down
3 changes: 1 addition & 2 deletions pinax/notifications/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import pkg_resources


__version__ = pkg_resources.get_distribution("pinax-notifications").version

default_app_config = "pinax.notifications.apps.AppConfig"
__version__ = pkg_resources.get_distribution("pinax-notifications").version
4 changes: 3 additions & 1 deletion pinax/notifications/apps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
from django.apps import AppConfig as BaseAppConfig
from django.utils.translation import ugettext_lazy as _


class AppConfig(BaseAppConfig):

name = "pinax.notifications"
verbose_name = "Pinax Notifications"
label = "pinax_notifications"
verbose_name = _("Pinax Notifications")
31 changes: 15 additions & 16 deletions pinax/notifications/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-03-19 11:36
from __future__ import unicode_literals

import django

from django.db import models, migrations
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('contenttypes', '__latest__'),
('contenttypes', '0002_remove_content_type_name'),
]
if django.VERSION >= (1, 8, 0):
dependencies.insert(0,
('contenttypes', '0002_remove_content_type_name'))

operations = [
migrations.CreateModel(
name='NoticeQueueBatch',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('pickled_data', models.TextField()),
],
),
migrations.CreateModel(
name='NoticeSetting',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('medium', models.CharField(max_length=1, verbose_name='medium', choices=[(0, 'email')])),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('medium', models.CharField(choices=[(0, 'email')], max_length=1, verbose_name='medium')),
('send', models.BooleanField(default=False, verbose_name='send')),
('scoping_object_id', models.PositiveIntegerField(null=True, blank=True)),
('scoping_object_id', models.PositiveIntegerField(blank=True, null=True)),
],
options={
'verbose_name': 'notice setting',
Expand All @@ -41,31 +40,31 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='NoticeType',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('label', models.CharField(max_length=40, verbose_name='label')),
('display', models.CharField(max_length=50, verbose_name='display')),
('description', models.CharField(max_length=100, verbose_name='description')),
('default', models.IntegerField(verbose_name='default')),
],
options={
'verbose_name': 'notice type',
'verbose_name_plural': 'notice types',
'verbose_name': 'notice type',
},
),
migrations.AddField(
model_name='noticesetting',
name='notice_type',
field=models.ForeignKey(verbose_name='notice type', to='notifications.NoticeType'),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pinax_notifications.NoticeType', verbose_name='notice type'),
),
migrations.AddField(
model_name='noticesetting',
name='scoping_content_type',
field=models.ForeignKey(blank=True, to='contenttypes.ContentType', null=True),
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType'),
),
migrations.AddField(
model_name='noticesetting',
name='user',
field=models.ForeignKey(verbose_name='user', to=settings.AUTH_USER_MODEL),
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='user'),
),
migrations.AlterUniqueTogether(
name='noticesetting',
Expand Down
7 changes: 7 additions & 0 deletions pinax/notifications/tests/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.test import TestCase


class Tests(TestCase):

def setUp(self):
pass
4 changes: 1 addition & 3 deletions runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ def runtests(*test_args):
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)

# Compatibility with Django 1.7's stricter initialization
if hasattr(django, "setup"):
django.setup()
django.setup()

parent = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, parent)
Expand Down
7 changes: 3 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ def read(*parts):
license="MIT",
packages=find_packages(),
package_data={
"pinax.notifications": [
"locale/**/**/*",
"templates/pinax/notifications/*"
]
"notifications": []
},
install_requires=[
"django-appconf>=1.0.1"
],
test_suite="runtests.runtests",
tests_require=[
],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
Expand Down
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,19 @@
ignore = E265,E501
max-line-length = 100
max-complexity = 10
exclude = */migrations/*,docs/*
exclude = migrations/*,docs/*

[tox]
envlist =
py27-{1.7,1.8,1.9,master},
py33-{1.7,1.8},
py34-{1.7,1.8,1.9,master},
py27-{1.8,1.9,master},
py33-{1.8},
py34-{1.8,1.9,master},
py35-{1.8,1.9,master}

[testenv]
deps =
coverage == 4.0.2
flake8 == 2.5.0
1.7: Django>=1.7,<1.8
1.8: Django>=1.8,<1.9
1.9: Django>=1.9,<1.10
master: https://github.com/django/django/tarball/master
Expand Down

0 comments on commit 085f6da

Please sign in to comment.