Commit 2ff25eec authored by Adrián Ribao's avatar Adrián Ribao
Browse files

initial commit

parents
dist
build
*.pyc
.project
.pydevproject
*.swp
env/
.ropeproject
.sass-cache
.coverage
.noseids
/docs/build
_build
*egg-info
Copyright (c) 2012, Adrián Ribao
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the author nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
recursive-include docs *
recursive-include {{ app_name }}/locale *
recursive-include {{ app_name }}/templates *
prune docs/build
# {{ app_name }}
**Author:** Adrián Ribao. [Twitter](http://twitter.com/AdrianRibao).
## Changelog
### v 0.1
# -*- coding: utf-8 -*-
#from django.contrib.gis import admin
from django.contrib import admin
#from mptt.admin import MPTTModelAdmin
from django.utils.translation import ugettext_lazy as _
from cartero.models import Contact, EmailTemplate, Campaign
from django.conf.urls.defaults import patterns, include, url
from cartero.views import CreateTemplateView, UpdateTemplateView
#StackedInline o TabularInline
#class ModelInline(admin.TabularInline):
#model = Model
class ContactAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
list_display = [
'first_name',
'last_name',
'email',
'sent',
'testing',
'bounced',
]
list_filter = [
'sent',
'testing',
'bounced',
]
search_fields = [
'first_name',
'last_name',
'email',
]
#inlines = [
#]
#prepopulated_fields = {"slug": ("name", )}
admin.site.register(Contact, ContactAdmin)
class EmailTemplateAdmin(admin.ModelAdmin):
date_hierarchy = 'created'
list_display = [
'name',
'template',
]
list_filter = [
]
search_fields = [
'name',
'html',
'plain',
]
def get_urls(self):
urls = super(EmailTemplateAdmin, self).get_urls()
my_urls = patterns('',
(r'^add/$', self.admin_site.admin_view(CreateTemplateView.as_view())),
(r'^(?P<pk>\d+)/$', self.admin_site.admin_view(UpdateTemplateView.as_view()))
)
return my_urls + urls
admin.site.register(EmailTemplate, EmailTemplateAdmin)
class CampaignAdmin(admin.ModelAdmin):
date_hierarchy = 'start'
list_display = [
'name',
'start',
'subject',
'reply_to',
'site',
'ready',
'sent',
]
list_filter = [
'ready',
'sent',
]
search_fields = [
'name',
'subject',
'reply_to',
]
#inlines = [
#]
#prepopulated_fields = {"slug": ("name", )}
actions = ['send_test']
def send_test(self, request, queryset):
from cartero.utils.sending import CampaignDeliver
for campaign in queryset:
cd = CampaignDeliver(campaign)
cd.send()
send_test.short_description = _(u'Send test')
admin.site.register(Campaign, CampaignAdmin)
#admin.site.register(simplemodel, admin.ModelAdmin)
# -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
#from crispy_forms.helper import FormHelper
#from crispy_forms.layout import Layout, Div, ButtonHolder, Submit, Fieldset, MultiField
#from django.forms.formsets import formset_factory
#from django.forms.models import modelformset_factory
#from django.forms.models import inlineformset_factory
#from mptt.forms import TreeNodeChoiceField
from cartero.models import EmailTemplate
import os
APP_ROOT = os.path.abspath(os.path.dirname(__file__))
class EmailTemplateForm(forms.ModelForm):
#template = forms.FilePathField(path=os.path.join(APP_ROOT, 'templates/cartero/'), match='\.html$', recursive=False)
class Meta:
model = EmailTemplate
fields = (
'name',
'template',
)
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Contact'
db.create_table('cartero_contact', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('first_name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('last_name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('email', self.gf('django.db.models.fields.EmailField')(max_length=200)),
('data', self.gf('django.db.models.fields.TextField')(blank=True)),
('sent', self.gf('django.db.models.fields.BooleanField')(default=False)),
('bounced', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('cartero', ['Contact'])
# Adding model 'EmailTemplate'
db.create_table('cartero_emailtemplate', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='*.html')),
('html', self.gf('django.db.models.fields.TextField')(blank=True)),
('plain', self.gf('django.db.models.fields.TextField')(blank=True)),
))
db.send_create_signal('cartero', ['EmailTemplate'])
# Adding model 'Campaign'
db.create_table('cartero_campaign', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
('site', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['sites.Site'])),
('name', self.gf('django.db.models.fields.CharField')(max_length=150)),
('subject', self.gf('django.db.models.fields.CharField')(max_length=150)),
('reply_to', self.gf('django.db.models.fields.CharField')(max_length=150, blank=True)),
('email_template', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['cartero.EmailTemplate'])),
('sent', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('cartero', ['Campaign'])
# Adding M2M table for field contacts on 'Campaign'
db.create_table('cartero_campaign_contacts', (
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
('campaign', models.ForeignKey(orm['cartero.campaign'], null=False)),
('contact', models.ForeignKey(orm['cartero.contact'], null=False))
))
db.create_unique('cartero_campaign_contacts', ['campaign_id', 'contact_id'])
def backwards(self, orm):
# Deleting model 'Contact'
db.delete_table('cartero_contact')
# Deleting model 'EmailTemplate'
db.delete_table('cartero_emailtemplate')
# Deleting model 'Campaign'
db.delete_table('cartero_campaign')
# Removing M2M table for field contacts on 'Campaign'
db.delete_table('cartero_campaign_contacts')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'*.html'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Contact.testing'
db.add_column('cartero_contact', 'testing',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Contact.testing'
db.delete_column('cartero_contact', 'testing')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'*.html'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Campaign.start'
db.add_column('cartero_campaign', 'start',
self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime(2013, 1, 25, 0, 0)),
keep_default=False)
# Changing field 'EmailTemplate.template'
db.alter_column('cartero_emailtemplate', 'template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='\\.html$'))
def backwards(self, orm):
# Deleting field 'Campaign.start'
db.delete_column('cartero_campaign', 'start')
# Changing field 'EmailTemplate.template'
db.alter_column('cartero_emailtemplate', 'template', self.gf('django.db.models.fields.FilePathField')(path='/home/antares/paginas_web/adcxml/cartero/templates/cartero/', max_length=255, match='*.html'))
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 0, 0)'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'\\\\.html$'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'EmailTemplate.context'
db.add_column('cartero_emailtemplate', 'context',
self.gf('django.db.models.fields.TextField')(default='', blank=True),
keep_default=False)
def backwards(self, orm):
# Deleting field 'EmailTemplate.context'
db.delete_column('cartero_emailtemplate', 'context')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 25, 0, 0)'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '200'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'testing': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
'cartero.emailtemplate': {
'Meta': {'object_name': 'EmailTemplate'},
'context': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'html': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'plain': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'template': ('django.db.models.fields.FilePathField', [], {'path': "'/home/antares/paginas_web/adcxml/cartero/templates/cartero/'", 'max_length': '255', 'match': "'\\\\.html$'"})
},
'sites.site': {
'Meta': {'ordering': "('domain',)", 'object_name': 'Site', 'db_table': "'django_site'"},
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
}
}
complete_apps = ['cartero']
\ No newline at end of file
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Campaign.ready'
db.add_column('cartero_campaign', 'ready',
self.gf('django.db.models.fields.BooleanField')(default=False),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Campaign.ready'
db.delete_column('cartero_campaign', 'ready')
models = {
'cartero.campaign': {
'Meta': {'object_name': 'Campaign'},
'contacts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['cartero.Contact']", 'symmetrical': 'False', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'email_template': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['cartero.EmailTemplate']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
'ready': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'reply_to': ('django.db.models.fields.CharField', [], {'max_length': '150', 'blank': 'True'}),
'sent': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
'start': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2013, 1, 30, 0, 0)'}),
'subject': ('django.db.models.fields.CharField', [], {'max_length': '150'})
},
'cartero.contact': {
'Meta': {'object_name': 'Contact'},
'bounced': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'data': ('django.db.models.fields.TextField', [], {'blank': 'True'}),