Skip to content
This repository has been archived by the owner on Mar 21, 2022. It is now read-only.

Django 1.8 Support #55

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion drip/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from drip.drips import configured_message_classes, message_class_for
from drip.utils import get_user_model


class QuerySetRuleInline(admin.TabularInline):
model = QuerySetRule

Expand Down
181 changes: 59 additions & 122 deletions drip/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,128 +1,65 @@
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from __future__ import unicode_literals

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

class Migration(SchemaMigration):

def forwards(self, orm):
# Adding model 'Drip'
db.create_table('drip_drip', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('lastchanged', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('name', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255)),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
('subject_template', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
('body_html_template', self.gf('django.db.models.fields.TextField')(null=True, blank=True)),
))
db.send_create_signal('drip', ['Drip'])
class Migration(migrations.Migration):

# Adding model 'SentDrip'
db.create_table('drip_sentdrip', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('drip', self.gf('django.db.models.fields.related.ForeignKey')(related_name='sent_drips', to=orm['drip.Drip'])),
('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='sent_drips', to=orm['auth.User'])),
('subject', self.gf('django.db.models.fields.TextField')()),
('body', self.gf('django.db.models.fields.TextField')()),
))
db.send_create_signal('drip', ['SentDrip'])
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

# Adding model 'QuerySetRule'
db.create_table('drip_querysetrule', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('lastchanged', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('drip', self.gf('django.db.models.fields.related.ForeignKey')(related_name='queryset_rules', to=orm['drip.Drip'])),
('method_type', self.gf('django.db.models.fields.CharField')(default='filter', max_length=12)),
('field_name', self.gf('django.db.models.fields.CharField')(max_length=128)),
('lookup_type', self.gf('django.db.models.fields.CharField')(default='exact', max_length=12)),
('field_value', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('drip', ['QuerySetRule'])


def backwards(self, orm):
# Deleting model 'Drip'
db.delete_table('drip_drip')

# Deleting model 'SentDrip'
db.delete_table('drip_sentdrip')

# Deleting model 'QuerySetRule'
db.delete_table('drip_querysetrule')


models = {
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
'auth.permission': {
'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
'drip.drip': {
'Meta': {'object_name': 'Drip'},
'body_html_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lastchanged': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
'subject_template': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'})
},
'drip.querysetrule': {
'Meta': {'object_name': 'QuerySetRule'},
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'drip': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'queryset_rules'", 'to': "orm['drip.Drip']"}),
'field_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'field_value': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'lastchanged': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'lookup_type': ('django.db.models.fields.CharField', [], {'default': "'exact'", 'max_length': '12'}),
'method_type': ('django.db.models.fields.CharField', [], {'default': "'filter'", 'max_length': '12'})
},
'drip.sentdrip': {
'Meta': {'object_name': 'SentDrip'},
'body': ('django.db.models.fields.TextField', [], {}),
'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'drip': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sent_drips'", 'to': "orm['drip.Drip']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'subject': ('django.db.models.fields.TextField', [], {}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'sent_drips'", 'to': "orm['auth.User']"})
}
}

complete_apps = ['drip']
operations = [
migrations.CreateModel(
name='Drip',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date', models.DateTimeField(auto_now_add=True)),
('lastchanged', models.DateTimeField(auto_now=True)),
('name', models.CharField(help_text=b'A unique name for this drip.', unique=True, max_length=255, verbose_name=b'Drip Name')),
('enabled', models.BooleanField(default=False)),
('from_email', models.EmailField(help_text=b'Set a custom from email.', max_length=254, null=True, blank=True)),
('from_email_name', models.CharField(help_text=b'Set a name for a custom from email.', max_length=150, null=True, blank=True)),
('subject_template', models.TextField(null=True, blank=True)),
('body_html_template', models.TextField(help_text=b'You will have settings and user in the context.', null=True, blank=True)),
('message_class', models.CharField(default=b'default', max_length=120, blank=True)),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='QuerySetRule',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date', models.DateTimeField(auto_now_add=True)),
('lastchanged', models.DateTimeField(auto_now=True)),
('method_type', models.CharField(default=b'filter', max_length=12, choices=[(b'filter', b'Filter'), (b'exclude', b'Exclude')])),
('field_name', models.CharField(max_length=128, verbose_name=b'Field name of User')),
('lookup_type', models.CharField(default=b'exact', max_length=12, choices=[(b'exact', b'exactly'), (b'iexact', b'exactly (case insensitive)'), (b'contains', b'contains'), (b'icontains', b'contains (case insensitive)'), (b'regex', b'regex'), (b'iregex', b'contains (case insensitive)'), (b'gt', b'greater than'), (b'gte', b'greater than or equal to'), (b'lt', b'less than'), (b'lte', b'less than or equal to'), (b'startswith', b'starts with'), (b'endswith', b'starts with'), (b'istartswith', b'ends with (case insensitive)'), (b'iendswith', b'ends with (case insensitive)')])),
('field_value', models.CharField(help_text=b'Can be anything from a number, to a string. Or, do `now-7 days` or `today+3 days` for fancy timedelta.', max_length=255)),
('drip', models.ForeignKey(related_name='queryset_rules', to='drip.Drip')),
],
options={
},
bases=(models.Model,),
),
migrations.CreateModel(
name='SentDrip',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('date', models.DateTimeField(auto_now_add=True)),
('subject', models.TextField()),
('body', models.TextField()),
('from_email', models.EmailField(default=None, max_length=254, null=True)),
('from_email_name', models.CharField(default=None, max_length=150, null=True)),
('drip', models.ForeignKey(related_name='sent_drips', to='drip.Drip')),
('user', models.ForeignKey(related_name='sent_drips', to=settings.AUTH_USER_MODEL)),
],
options={
},
bases=(models.Model,),
),
]
Loading