Skip to content
Browse files

fix for South and update on dilla settings

  • Loading branch information...
1 parent 1f2aa50 commit 206dbdf20924ada351c8041dca328cfb34254695 @areski areski committed Oct 5, 2010
Showing with 15 additions and 26 deletions.
  1. +0 −1 INSTALL
  2. +10 −23 cdr_stats/cdr/migrations/0001_initial.py
  3. +5 −2 cdr_stats/cdr/models.py
View
1 INSTALL
@@ -23,7 +23,6 @@ Set Permission on Sqlite DB :
chmod -R 777 database
create the database then :
- python manage.py schemamigration cdr --initial
python manage.py syncdb
python manage.py migrate
View
33 cdr_stats/cdr/migrations/0001_initial.py
@@ -8,22 +8,12 @@ class Migration(SchemaMigration):
def forwards(self, orm):
- # Adding model 'Company'
- db.create_table('cdr_company', (
- ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
- ('name', self.gf('django.db.models.fields.CharField')(max_length=50, null=True, blank=True)),
- ('address', self.gf('django.db.models.fields.TextField')(max_length=400, null=True, blank=True)),
- ('phone', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
- ('fax', self.gf('django.db.models.fields.CharField')(max_length=30, null=True, blank=True)),
- ))
- db.send_create_signal('cdr', ['Company'])
-
# Adding model 'UserProfile'
db.create_table('cdr_userprofile', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('user', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['auth.User'], unique=True)),
('accountcode', self.gf('django.db.models.fields.PositiveIntegerField')(null=True, blank=True)),
- ('company', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['cdr.Company'], unique=True, null=True, blank=True)),
+ ('company', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['Company.Company'], unique=True, null=True, blank=True)),
))
db.send_create_signal('cdr', ['UserProfile'])
@@ -52,9 +42,6 @@ def forwards(self, orm):
def backwards(self, orm):
- # Deleting model 'Company'
- db.delete_table('cdr_company')
-
# Deleting model 'UserProfile'
db.delete_table('cdr_userprofile')
@@ -63,6 +50,14 @@ def backwards(self, orm):
models = {
+ 'Company.company': {
+ 'Meta': {'object_name': 'Company', 'db_table': "'cdr_company'"},
+ 'address': ('django.db.models.fields.TextField', [], {'max_length': '400', 'null': 'True', 'blank': 'True'}),
+ 'fax': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'})
+ },
'auth.group': {
'Meta': {'object_name': 'Group'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
@@ -112,18 +107,10 @@ def backwards(self, orm):
'uniqueid': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'userfield': ('django.db.models.fields.CharField', [], {'max_length': '80'})
},
- 'cdr.company': {
- 'Meta': {'object_name': 'Company'},
- 'address': ('django.db.models.fields.TextField', [], {'max_length': '400', 'null': 'True', 'blank': 'True'}),
- 'fax': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
- 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
- 'name': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
- 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'})
- },
'cdr.userprofile': {
'Meta': {'object_name': 'UserProfile'},
'accountcode': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
- 'company': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['cdr.Company']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
+ 'company': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['Company.Company']", 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['auth.User']", 'unique': 'True'})
},
View
7 cdr_stats/cdr/models.py
@@ -114,7 +114,10 @@ class Dilla:
# 'generator':'generate_EmailField', #can point to a callable, which must return the desired value. If this is a string, it looks for a method in the dilla.py file.
# },
'acctid':{
- 'integer_range':(1, 20)
+ 'integer_range':(1, 99999999)
+ },
+ 'accountcode':{
+ 'integer_range':(10000, 99999)
},
'disposition':{
'integer_range':(1, 9)
@@ -133,7 +136,7 @@ class Dilla:
},
'calldate':{
'day_delta': 10, #The day delta to generate the date, minus today
- 'hour_delta': 12, #The day delta to generate the date, minus the current hour
+ 'hour_delta': 24, #The day delta to generate the date, minus the current hour
},
}

0 comments on commit 206dbdf

Please sign in to comment.
Something went wrong with that request. Please try again.