Skip to content
This repository has been archived by the owner on Jul 17, 2018. It is now read-only.

Commit

Permalink
Merge pull request #15 from texas/django-upgrade
Browse files Browse the repository at this point in the history
Django upgrade
  • Loading branch information
rdmurphy committed Mar 29, 2016
2 parents 813408a + 2e76903 commit defdaaa
Show file tree
Hide file tree
Showing 11 changed files with 268 additions and 665 deletions.
8 changes: 4 additions & 4 deletions example/project/settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals

# Django settings for example project.

# Setup a ``project_dir`` function
Expand Down Expand Up @@ -97,7 +100,7 @@
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)

ROOT_URLCONF = 'example.urls'
# ROOT_URLCONF = 'example.project.urls'

# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION = 'example.wsgi.application'
Expand All @@ -121,9 +124,6 @@
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',

# Third-party dependencies
'south',

# Custom application being tested
'tx_people',

Expand Down
10 changes: 4 additions & 6 deletions example/project/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
try:
from django.conf.urls import patterns, include, url
except ImportError:
# We get here with Django 1.3.x. You can safely remove this if
# your application only supports Django >= 1.4
from django.conf.urls.defaults import patterns, include, url
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals

from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
Expand Down
7 changes: 3 additions & 4 deletions example/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Django>=1.4.2
South>=0.8.3
dj-database-url==0.2.1
Django>=1.9.4
dj-database-url==0.4.0
dj-settings-helpers==1.0.0
factory-boy==2.1.2
factory-boy==2.6.1
-r ../requirements.txt
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
django-appconf>=0.6
django-model-utils>=1.4.0,<2.0
Pillow==2.5.1
Pillow==3.1.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

setup(
name='tx_people',
version='1.3.0',
version='2.0.0',
description='Texas Tribune: tx_people',
author='Tribune Tech',
author_email='tech@texastribune.org',
Expand Down
1 change: 0 additions & 1 deletion tx_people/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class OptionalManyToManyField(models.ManyToManyField):
def __init__(self, *args, **kwargs):
defaults = {
'blank': True,
'null': True,
}
defaults.update(**kwargs)
return super(OptionalManyToManyField, self).__init__(*args, **defaults)
Expand Down
685 changes: 220 additions & 465 deletions tx_people/migrations/0001_initial.py

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions tx_people/migrations/0002_auto_20160329_0155.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-29 06:55
from __future__ import unicode_literals

from django.db import migrations, models
import tx_people.fields
import tx_people.utils


class Migration(migrations.Migration):

dependencies = [
('tx_people', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='organization',
name='name',
field=models.CharField(db_index=True, max_length=250),
),
migrations.AlterField(
model_name='person',
name='name',
field=models.CharField(db_index=True, max_length=250),
),
migrations.AlterIndexTogether(
name='identifier',
index_together=set([('identifier', 'scheme')]),
),
]
182 changes: 0 additions & 182 deletions tx_people/migrations/0002_auto__add_race__add_ethnicity.py

This file was deleted.

2 changes: 1 addition & 1 deletion tx_people/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class NameMixin(models.Model):
class Meta:
abstract = True

name = models.CharField(max_length=250)
name = models.CharField(max_length=250, db_index=True)
other_name = fields.OptionalManyToManyField('OtherNames',
related_name=related_name)

Expand Down
3 changes: 3 additions & 0 deletions tx_people/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class Identifier(models.Model):

objects = InheritanceManager()

class Meta:
index_together = ('identifier', 'scheme',)

def __unicode__(self):
return u'{scheme}://{identifier}'.format(scheme=self.scheme,
identifier=self.identifier)
Expand Down

0 comments on commit defdaaa

Please sign in to comment.