Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add more missing files

Artur Smęta4c95202e34e
diff --git a/saleor/order/migrations/0001_initial.py b/saleor/order/migrations/0001_initial.py
new file mode 100644
index 0000000000..7a726ff127
--- /dev/null
+++ b/saleor/order/migrations/0001_initial.py
@@ -0,0 +1,240 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as 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 'Order'
+ db.create_table(u'order_order', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('status', self.gf('django.db.models.fields.CharField')(default=u'new', max_length=32)),
+ ('created', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
+ ('last_status_change', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'orders', null=True, to=orm['userprofile.User'])),
+ ('tracking_client_id', self.gf('django.db.models.fields.CharField')(max_length=36, blank=True)),
+ ('billing_address', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', to=orm['userprofile.Address'])),
+ ('anonymous_user_email', self.gf('django.db.models.fields.EmailField')(default=u'', max_length=75, blank=True)),
+ ('token', self.gf('django.db.models.fields.CharField')(default=u'', max_length=36, blank=True)),
+ ))
+ db.send_create_signal(u'order', ['Order'])
+
+ # Adding model 'DeliveryGroup'
+ db.create_table(u'order_deliverygroup', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('status', self.gf('django.db.models.fields.CharField')(default=u'new', max_length=32)),
+ ('method', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'groups', to=orm['order.Order'])),
+ ('price', self.gf('django_prices.models.PriceField')(default=0, currency='AED', max_digits=12, decimal_places=4)),
+ ))
+ db.send_create_signal(u'order', ['DeliveryGroup'])
+
+ # Adding model 'ShippedDeliveryGroup'
+ db.create_table(u'order_shippeddeliverygroup', (
+ (u'deliverygroup_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['order.DeliveryGroup'], unique=True, primary_key=True)),
+ ('address', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'+', to=orm['userprofile.Address'])),
+ ))
+ db.send_create_signal(u'order', ['ShippedDeliveryGroup'])
+
+ # Adding model 'DigitalDeliveryGroup'
+ db.create_table(u'order_digitaldeliverygroup', (
+ (u'deliverygroup_ptr', self.gf('django.db.models.fields.related.OneToOneField')(to=orm['order.DeliveryGroup'], unique=True, primary_key=True)),
+ ('email', self.gf('django.db.models.fields.EmailField')(max_length=75)),
+ ))
+ db.send_create_signal(u'order', ['DigitalDeliveryGroup'])
+
+ # Adding model 'OrderedItem'
+ db.create_table(u'order_ordereditem', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('delivery_group', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'items', to=orm['order.DeliveryGroup'])),
+ ('product', self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name=u'+', null=True, on_delete=models.SET_NULL, to=orm['product.Product'])),
+ ('product_name', self.gf('django.db.models.fields.CharField')(max_length=128)),
+ ('product_sku', self.gf('django.db.models.fields.CharField')(max_length=32)),
+ ('quantity', self.gf('django.db.models.fields.IntegerField')()),
+ ('unit_price_net', self.gf('django.db.models.fields.DecimalField')(max_digits=12, decimal_places=4)),
+ ('unit_price_gross', self.gf('django.db.models.fields.DecimalField')(max_digits=12, decimal_places=4)),
+ ))
+ db.send_create_signal(u'order', ['OrderedItem'])
+
+ # Adding model 'Payment'
+ db.create_table(u'order_payment', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('variant', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('status', self.gf('django.db.models.fields.CharField')(default=u'waiting', max_length=10)),
+ ('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)),
+ ('transaction_id', self.gf('django.db.models.fields.CharField')(max_length=255, blank=True)),
+ ('currency', self.gf('django.db.models.fields.CharField')(max_length=10)),
+ ('total', self.gf('django.db.models.fields.DecimalField')(default=u'0.0', max_digits=9, decimal_places=2)),
+ ('delivery', self.gf('django.db.models.fields.DecimalField')(default=u'0.0', max_digits=9, decimal_places=2)),
+ ('tax', self.gf('django.db.models.fields.DecimalField')(default=u'0.0', max_digits=9, decimal_places=2)),
+ ('description', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
+ ('billing_first_name', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_last_name', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_address_1', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_address_2', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_city', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_postcode', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('billing_country_code', self.gf('django.db.models.fields.CharField')(max_length=2, blank=True)),
+ ('billing_country_area', self.gf('django.db.models.fields.CharField')(max_length=256, blank=True)),
+ ('extra_data', self.gf('django.db.models.fields.TextField')(default=u'', blank=True)),
+ ('token', self.gf('django.db.models.fields.CharField')(default=u'', max_length=36, blank=True)),
+ ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'payments', to=orm['order.Order'])),
+ ))
+ db.send_create_signal(u'order', ['Payment'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'Order'
+ db.delete_table(u'order_order')
+
+ # Deleting model 'DeliveryGroup'
+ db.delete_table(u'order_deliverygroup')
+
+ # Deleting model 'ShippedDeliveryGroup'
+ db.delete_table(u'order_shippeddeliverygroup')
+
+ # Deleting model 'DigitalDeliveryGroup'
+ db.delete_table(u'order_digitaldeliverygroup')
+
+ # Deleting model 'OrderedItem'
+ db.delete_table(u'order_ordereditem')
+
+ # Deleting model 'Payment'
+ db.delete_table(u'order_payment')
+
+
+ models = {
+ u'order.deliverygroup': {
+ 'Meta': {'object_name': 'DeliveryGroup'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'method': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'groups'", 'to': u"orm['order.Order']"}),
+ 'price': ('django_prices.models.PriceField', [], {'default': '0', 'currency': "'AED'", 'max_digits': '12', 'decimal_places': '4'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'})
+ },
+ u'order.digitaldeliverygroup': {
+ 'Meta': {'object_name': 'DigitalDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'})
+ },
+ u'order.order': {
+ 'Meta': {'ordering': "(u'-last_status_change',)", 'object_name': 'Order'},
+ 'anonymous_user_email': ('django.db.models.fields.EmailField', [], {'default': "u''", 'max_length': '75', 'blank': 'True'}),
+ 'billing_address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_status_change': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'tracking_client_id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'orders'", 'null': 'True', 'to': u"orm['userprofile.User']"})
+ },
+ u'order.ordereditem': {
+ 'Meta': {'object_name': 'OrderedItem'},
+ 'delivery_group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'items'", 'to': u"orm['order.DeliveryGroup']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['product.Product']"}),
+ 'product_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'product_sku': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'quantity': ('django.db.models.fields.IntegerField', [], {}),
+ 'unit_price_gross': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'}),
+ 'unit_price_net': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'})
+ },
+ u'order.payment': {
+ 'Meta': {'object_name': 'Payment'},
+ 'billing_address_1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_address_2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_city': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_area': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
+ 'billing_first_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_last_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_postcode': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'currency': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'delivery': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'description': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ 'extra_data': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'payments'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'waiting'", 'max_length': '10'}),
+ 'tax': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'total': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'transaction_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'variant': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'order.shippeddeliverygroup': {
+ 'Meta': {'object_name': 'ShippedDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ u'product.brand': {
+ 'Meta': {'object_name': 'Brand'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'})
+ },
+ u'product.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['product.Category']"}),
+ u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+ },
+ u'product.product': {
+ 'Meta': {'object_name': 'Product'},
+ 'brand': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['product.Brand']"}),
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'products'", 'to': u"orm['product.Category']"}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_organic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
+ 'package_size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sku': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
+ 'unit': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
+ 'unit_value': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'})
+ },
+ u'userprofile.address': {
+ 'Meta': {'object_name': 'Address'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'street_address': ('django.db.models.fields.CharField', [], {'max_length': '256'})
+ },
+ u'userprofile.addressbook': {
+ 'Meta': {'unique_together': "((u'user', u'alias'),)", 'object_name': 'AddressBook'},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'unique': 'True', 'to': u"orm['userprofile.Address']"}),
+ 'alias': ('django.db.models.fields.CharField', [], {'default': "u'Home'", 'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'address_book'", 'to': u"orm['userprofile.User']"})
+ },
+ u'userprofile.user': {
+ 'Meta': {'object_name': 'User'},
+ 'addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['userprofile.Address']", 'through': u"orm['userprofile.AddressBook']", 'symmetrical': 'False'}),
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_billing_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'default_shipping_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ }
+ }
+
+ complete_apps = ['order']
\ No newline at end of file
diff --git a/saleor/order/migrations/0002_auto__add_orderstatuschange.py b/saleor/order/migrations/0002_auto__add_orderstatuschange.py
new file mode 100644
index 0000000000..b8d6646db3
--- /dev/null
+++ b/saleor/order/migrations/0002_auto__add_orderstatuschange.py
@@ -0,0 +1,165 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as 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 'OrderStatusChange'
+ db.create_table(u'order_orderstatuschange', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('date', self.gf('django.db.models.fields.DateTimeField')(default=datetime.datetime.now)),
+ ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'status_history', to=orm['order.Order'])),
+ ('status', self.gf('django.db.models.fields.CharField')(max_length=32)),
+ ('comment', self.gf('django.db.models.fields.CharField')(max_length=100, null=True, blank=True)),
+ ))
+ db.send_create_signal(u'order', ['OrderStatusChange'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'OrderStatusChange'
+ db.delete_table(u'order_orderstatuschange')
+
+
+ models = {
+ u'order.deliverygroup': {
+ 'Meta': {'object_name': 'DeliveryGroup'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'method': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'groups'", 'to': u"orm['order.Order']"}),
+ 'price': ('django_prices.models.PriceField', [], {'default': '0', 'currency': "'AED'", 'max_digits': '12', 'decimal_places': '4'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'})
+ },
+ u'order.digitaldeliverygroup': {
+ 'Meta': {'object_name': 'DigitalDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'})
+ },
+ u'order.order': {
+ 'Meta': {'ordering': "(u'-last_status_change',)", 'object_name': 'Order'},
+ 'anonymous_user_email': ('django.db.models.fields.EmailField', [], {'default': "u''", 'max_length': '75', 'blank': 'True'}),
+ 'billing_address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_status_change': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'tracking_client_id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'orders'", 'null': 'True', 'to': u"orm['userprofile.User']"})
+ },
+ u'order.ordereditem': {
+ 'Meta': {'object_name': 'OrderedItem'},
+ 'delivery_group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'items'", 'to': u"orm['order.DeliveryGroup']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['product.Product']"}),
+ 'product_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'product_sku': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'quantity': ('django.db.models.fields.IntegerField', [], {}),
+ 'unit_price_gross': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'}),
+ 'unit_price_net': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'})
+ },
+ u'order.orderstatuschange': {
+ 'Meta': {'object_name': 'OrderStatusChange'},
+ 'comment': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'status_history'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'})
+ },
+ u'order.payment': {
+ 'Meta': {'object_name': 'Payment'},
+ 'billing_address_1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_address_2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_city': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_area': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
+ 'billing_first_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_last_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_postcode': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'currency': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'delivery': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'description': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ 'extra_data': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'payments'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'waiting'", 'max_length': '10'}),
+ 'tax': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'total': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'transaction_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'variant': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'order.shippeddeliverygroup': {
+ 'Meta': {'object_name': 'ShippedDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ u'product.brand': {
+ 'Meta': {'object_name': 'Brand'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'})
+ },
+ u'product.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['product.Category']"}),
+ u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+ },
+ u'product.product': {
+ 'Meta': {'object_name': 'Product'},
+ 'brand': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['product.Brand']"}),
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'products'", 'to': u"orm['product.Category']"}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_organic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
+ 'package_size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sku': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
+ 'unit': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
+ 'unit_value': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'})
+ },
+ u'userprofile.address': {
+ 'Meta': {'object_name': 'Address'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'street_address': ('django.db.models.fields.CharField', [], {'max_length': '256'})
+ },
+ u'userprofile.addressbook': {
+ 'Meta': {'unique_together': "((u'user', u'alias'),)", 'object_name': 'AddressBook'},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'unique': 'True', 'to': u"orm['userprofile.Address']"}),
+ 'alias': ('django.db.models.fields.CharField', [], {'default': "u'Home'", 'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'address_book'", 'to': u"orm['userprofile.User']"})
+ },
+ u'userprofile.user': {
+ 'Meta': {'object_name': 'User'},
+ 'addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['userprofile.Address']", 'through': u"orm['userprofile.AddressBook']", 'symmetrical': 'False'}),
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_billing_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'default_shipping_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ }
+ }
+
+ complete_apps = ['order']
\ No newline at end of file
diff --git a/saleor/order/migrations/0003_auto__add_ordernote.py b/saleor/order/migrations/0003_auto__add_ordernote.py
new file mode 100644
index 0000000000..28c109b1d6
--- /dev/null
+++ b/saleor/order/migrations/0003_auto__add_ordernote.py
@@ -0,0 +1,173 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as 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 'OrderNote'
+ db.create_table(u'order_ordernote', (
+ (u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['userprofile.User'])),
+ ('date', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('order', self.gf('django.db.models.fields.related.ForeignKey')(related_name=u'notes', to=orm['order.Order'])),
+ ('content', self.gf('django.db.models.fields.CharField')(max_length=250)),
+ ))
+ db.send_create_signal(u'order', ['OrderNote'])
+
+
+ def backwards(self, orm):
+ # Deleting model 'OrderNote'
+ db.delete_table(u'order_ordernote')
+
+
+ models = {
+ u'order.deliverygroup': {
+ 'Meta': {'object_name': 'DeliveryGroup'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'method': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'groups'", 'to': u"orm['order.Order']"}),
+ 'price': ('django_prices.models.PriceField', [], {'default': '0', 'currency': "'AED'", 'max_digits': '12', 'decimal_places': '4'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'})
+ },
+ u'order.digitaldeliverygroup': {
+ 'Meta': {'object_name': 'DigitalDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'})
+ },
+ u'order.order': {
+ 'Meta': {'ordering': "(u'-last_status_change',)", 'object_name': 'Order'},
+ 'anonymous_user_email': ('django.db.models.fields.EmailField', [], {'default': "u''", 'max_length': '75', 'blank': 'True'}),
+ 'billing_address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_status_change': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'tracking_client_id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'orders'", 'null': 'True', 'to': u"orm['userprofile.User']"})
+ },
+ u'order.ordereditem': {
+ 'Meta': {'object_name': 'OrderedItem'},
+ 'delivery_group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'items'", 'to': u"orm['order.DeliveryGroup']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['product.Product']"}),
+ 'product_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'product_sku': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'quantity': ('django.db.models.fields.IntegerField', [], {}),
+ 'unit_price_gross': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'}),
+ 'unit_price_net': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'})
+ },
+ u'order.ordernote': {
+ 'Meta': {'object_name': 'OrderNote'},
+ 'content': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
+ 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'notes'", 'to': u"orm['order.Order']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['userprofile.User']"})
+ },
+ u'order.orderstatuschange': {
+ 'Meta': {'ordering': "[u'date']", 'object_name': 'OrderStatusChange'},
+ 'comment': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'status_history'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'})
+ },
+ u'order.payment': {
+ 'Meta': {'object_name': 'Payment'},
+ 'billing_address_1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_address_2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_city': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_area': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
+ 'billing_first_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_last_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_postcode': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'currency': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'delivery': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'description': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ 'extra_data': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'payments'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'waiting'", 'max_length': '10'}),
+ 'tax': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'total': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'transaction_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'variant': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'order.shippeddeliverygroup': {
+ 'Meta': {'object_name': 'ShippedDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ u'product.brand': {
+ 'Meta': {'object_name': 'Brand'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'})
+ },
+ u'product.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['product.Category']"}),
+ u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+ },
+ u'product.product': {
+ 'Meta': {'object_name': 'Product'},
+ 'brand': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['product.Brand']"}),
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'products'", 'to': u"orm['product.Category']"}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_organic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
+ 'package_size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sku': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
+ 'unit': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
+ 'unit_value': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'})
+ },
+ u'userprofile.address': {
+ 'Meta': {'object_name': 'Address'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'street_address': ('django.db.models.fields.CharField', [], {'max_length': '256'})
+ },
+ u'userprofile.addressbook': {
+ 'Meta': {'unique_together': "((u'user', u'alias'),)", 'object_name': 'AddressBook'},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'unique': 'True', 'to': u"orm['userprofile.Address']"}),
+ 'alias': ('django.db.models.fields.CharField', [], {'default': "u'Home'", 'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'address_book'", 'to': u"orm['userprofile.User']"})
+ },
+ u'userprofile.user': {
+ 'Meta': {'object_name': 'User'},
+ 'addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['userprofile.Address']", 'through': u"orm['userprofile.AddressBook']", 'symmetrical': 'False'}),
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_billing_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'default_shipping_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ }
+ }
+
+ complete_apps = ['order']
\ No newline at end of file
diff --git a/saleor/order/migrations/0004_auto__add_field_payment_billing_email__add_field_payment_customer_ip_a.py b/saleor/order/migrations/0004_auto__add_field_payment_billing_email__add_field_payment_customer_ip_a.py
new file mode 100644
index 0000000000..798a962718
--- /dev/null
+++ b/saleor/order/migrations/0004_auto__add_field_payment_billing_email__add_field_payment_customer_ip_a.py
@@ -0,0 +1,196 @@
+# -*- coding: utf-8 -*-
+from south.utils import datetime_utils as 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 'Payment.billing_email'
+ db.add_column(u'order_payment', 'billing_email',
+ self.gf('django.db.models.fields.EmailField')(default='', max_length=75, blank=True),
+ keep_default=False)
+
+ # Adding field 'Payment.customer_ip_address'
+ db.add_column(u'order_payment', 'customer_ip_address',
+ self.gf('django.db.models.fields.IPAddressField')(default='127.0.0.1', max_length=15, blank=True),
+ keep_default=False)
+
+ # Adding field 'Payment.message'
+ db.add_column(u'order_payment', 'message',
+ self.gf('django.db.models.fields.TextField')(default=u'', blank=True),
+ keep_default=False)
+
+ # Adding field 'Payment.captured_amount'
+ db.add_column(u'order_payment', 'captured_amount',
+ self.gf('django.db.models.fields.DecimalField')(default=u'0.0', max_digits=9, decimal_places=2),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Payment.billing_email'
+ db.delete_column(u'order_payment', 'billing_email')
+
+ # Deleting field 'Payment.customer_ip_address'
+ db.delete_column(u'order_payment', 'customer_ip_address')
+
+ # Deleting field 'Payment.message'
+ db.delete_column(u'order_payment', 'message')
+
+ # Deleting field 'Payment.captured_amount'
+ db.delete_column(u'order_payment', 'captured_amount')
+
+
+ models = {
+ u'order.deliverygroup': {
+ 'Meta': {'object_name': 'DeliveryGroup'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'method': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'groups'", 'to': u"orm['order.Order']"}),
+ 'price': ('django_prices.models.PriceField', [], {'default': '0', 'currency': "'AED'", 'max_digits': '12', 'decimal_places': '4'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'})
+ },
+ u'order.digitaldeliverygroup': {
+ 'Meta': {'object_name': 'DigitalDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'})
+ },
+ u'order.order': {
+ 'Meta': {'ordering': "(u'-last_status_change',)", 'object_name': 'Order'},
+ 'anonymous_user_email': ('django.db.models.fields.EmailField', [], {'default': "u''", 'max_length': '75', 'blank': 'True'}),
+ 'billing_address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'last_status_change': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'new'", 'max_length': '32'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'tracking_client_id': ('django.db.models.fields.CharField', [], {'max_length': '36', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'orders'", 'null': 'True', 'to': u"orm['userprofile.User']"})
+ },
+ u'order.ordereditem': {
+ 'Meta': {'object_name': 'OrderedItem'},
+ 'delivery_group': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'items'", 'to': u"orm['order.DeliveryGroup']"}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'product': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['product.Product']"}),
+ 'product_name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'product_sku': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
+ 'quantity': ('django.db.models.fields.IntegerField', [], {}),
+ 'unit_price_gross': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'}),
+ 'unit_price_net': ('django.db.models.fields.DecimalField', [], {'max_digits': '12', 'decimal_places': '4'})
+ },
+ u'order.ordernote': {
+ 'Meta': {'object_name': 'OrderNote'},
+ 'content': ('django.db.models.fields.CharField', [], {'max_length': '250'}),
+ 'date': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'notes'", 'to': u"orm['order.Order']"}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['userprofile.User']"})
+ },
+ u'order.orderstatuschange': {
+ 'Meta': {'ordering': "[u'date']", 'object_name': 'OrderStatusChange'},
+ 'comment': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'date': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'status_history'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'max_length': '32'})
+ },
+ u'order.payment': {
+ 'Meta': {'object_name': 'Payment'},
+ 'billing_address_1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_address_2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_city': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_area': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_country_code': ('django.db.models.fields.CharField', [], {'max_length': '2', 'blank': 'True'}),
+ 'billing_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'billing_first_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_last_name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'billing_postcode': ('django.db.models.fields.CharField', [], {'max_length': '256', 'blank': 'True'}),
+ 'captured_amount': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'currency': ('django.db.models.fields.CharField', [], {'max_length': '10'}),
+ 'customer_ip_address': ('django.db.models.fields.IPAddressField', [], {'max_length': '15', 'blank': 'True'}),
+ 'delivery': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'description': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ 'extra_data': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'message': ('django.db.models.fields.TextField', [], {'default': "u''", 'blank': 'True'}),
+ 'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'order': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'payments'", 'to': u"orm['order.Order']"}),
+ 'status': ('django.db.models.fields.CharField', [], {'default': "u'waiting'", 'max_length': '10'}),
+ 'tax': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'token': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '36', 'blank': 'True'}),
+ 'total': ('django.db.models.fields.DecimalField', [], {'default': "u'0.0'", 'max_digits': '9', 'decimal_places': '2'}),
+ 'transaction_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'variant': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ u'order.shippeddeliverygroup': {
+ 'Meta': {'object_name': 'ShippedDeliveryGroup', '_ormbases': [u'order.DeliveryGroup']},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'to': u"orm['userprofile.Address']"}),
+ u'deliverygroup_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['order.DeliveryGroup']", 'unique': 'True', 'primary_key': 'True'})
+ },
+ u'product.brand': {
+ 'Meta': {'object_name': 'Brand'},
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'null': 'True'})
+ },
+ u'product.category': {
+ 'Meta': {'object_name': 'Category'},
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ u'level': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ u'lft': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'children'", 'null': 'True', 'to': u"orm['product.Category']"}),
+ u'rght': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50'}),
+ u'tree_id': ('django.db.models.fields.PositiveIntegerField', [], {'db_index': 'True'})
+ },
+ u'product.product': {
+ 'Meta': {'object_name': 'Product'},
+ 'brand': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['product.Brand']"}),
+ 'category': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'products'", 'to': u"orm['product.Category']"}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_organic': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'default': "u''", 'max_length': '128', 'blank': 'True'}),
+ 'package_size': ('django.db.models.fields.IntegerField', [], {}),
+ 'sku': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
+ 'unit': ('django.db.models.fields.CharField', [], {'max_length': '3'}),
+ 'unit_value': ('django.db.models.fields.DecimalField', [], {'max_digits': '6', 'decimal_places': '2'})
+ },
+ u'userprofile.address': {
+ 'Meta': {'object_name': 'Address'},
+ 'city': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'country': ('django.db.models.fields.CharField', [], {'max_length': '2'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '20'}),
+ 'street_address': ('django.db.models.fields.CharField', [], {'max_length': '256'})
+ },
+ u'userprofile.addressbook': {
+ 'Meta': {'unique_together': "((u'user', u'alias'),)", 'object_name': 'AddressBook'},
+ 'address': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'+'", 'unique': 'True', 'to': u"orm['userprofile.Address']"}),
+ 'alias': ('django.db.models.fields.CharField', [], {'default': "u'Home'", 'max_length': '30'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'address_book'", 'to': u"orm['userprofile.User']"})
+ },
+ u'userprofile.user': {
+ 'Meta': {'object_name': 'User'},
+ 'addresses': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['userprofile.Address']", 'through': u"orm['userprofile.AddressBook']", 'symmetrical': 'False'}),
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'default_billing_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'default_shipping_address': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "u'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['userprofile.AddressBook']"}),
+ 'email': ('django.db.models.fields.EmailField', [], {'unique': 'True', 'max_length': '75'}),
+ u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'})
+ }
+ }
+
+ complete_apps = ['order']
\ No newline at end of file
diff --git a/saleor/order/migrations/__init__.py b/saleor/order/migrations/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/saleor/static/less/dashboard.less b/saleor/static/less/dashboard.less
new file mode 100644
index 0000000000..06d2736c2f
--- /dev/null
+++ b/saleor/static/less/dashboard.less
@@ -0,0 +1,368 @@
+/* Global Styles */
+
+/* ------------------------------- */
+
+body {
+ padding-top: 100px;
+ background-color: #f8f8f8;
+}
+
+@media(min-width:768px) {
+ body {
+ padding-top: 50px;
+ }
+}
+
+/* Wrappers */
+
+/* ------------------------------- */
+
+#wrapper {
+ width: 100%;
+}
+
+#page-wrapper {
+ padding: 0 15px;
+ min-height: 568px;
+ background-color: #fff;
+}
+
+@media(min-width:768px) {
+ #page-wrapper {
+ position: inherit;
+ margin: 0 0 0 250px;
+ padding: 0 30px;
+ min-height: 1300px;
+ border-left: 1px solid #e7e7e7;
+ }
+}
+
+/* Navigation */
+
+/* ------------------------------- */
+
+/* Top Right Navigation Dropdown Styles */
+
+.navbar-top-links li {
+ display: inline-block;
+}
+
+.navbar-top-links li:last-child {
+ margin-right: 15px;
+}
+
+.navbar-top-links li a {
+ padding: 15px;
+ min-height: 50px;
+}
+
+.navbar-top-links .dropdown-menu li {
+ display: block;
+}
+
+.navbar-top-links .dropdown-menu li:last-child {
+ margin-right: 0;
+}
+
+.navbar-top-links .dropdown-menu li a {
+ padding: 3px 20px;
+ min-height: 0;
+}
+
+.navbar-top-links .dropdown-menu li a div {
+ white-space: normal;
+}
+
+.navbar-top-links .dropdown-messages,
+.navbar-top-links .dropdown-tasks,
+.navbar-top-links .dropdown-alerts {
+ width: 310px;
+ min-width: 0;
+}
+
+.navbar-top-links .dropdown-messages {
+ margin-left: 5px;
+}
+
+.navbar-top-links .dropdown-tasks {
+ margin-left: -59px;
+}
+
+.navbar-top-links .dropdown-alerts {
+ margin-left: -123px;
+}
+
+.navbar-top-links .dropdown-user {
+ right: 0;
+ left: auto;
+}
+
+/* Sidebar Menu Styles */
+
+.navbar-static-side ul li {
+ border-bottom: 1px solid #e7e7e7;
+}
+
+.sidebar-search {
+ padding: 15px;
+}
+
+.arrow {
+ float: right;
+}
+
+.fa.arrow:before {
+ content: "\f104";
+}
+
+.active > a > .fa.arrow:before {
+ content: "\f107";
+}
+
+.nav-second-level li,
+.nav-third-level li {
+ border-bottom: none !important;
+}
+
+.nav-second-level li a {
+ padding-left: 37px;
+}
+
+.nav-third-level li a {
+ padding-left: 52px;
+}
+
+@media(min-width:768px) {
+ .navbar-static-side {
+ z-index: 1;
+ position: absolute;
+ width: 250px;
+ margin-top: 51px;
+ }
+
+ .navbar-top-links .dropdown-messages,
+ .navbar-top-links .dropdown-tasks,
+ .navbar-top-links .dropdown-alerts {
+ margin-left: auto;
+ }
+}
+
+@media(max-height:600px) and (max-width:767px) {
+ .sidebar-collapse {
+ max-height: 300px;
+ overflow-y: scroll;
+ }
+}
+
+@media(max-height:400px) and (max-width:767px) {
+ .sidebar-collapse {
+ max-height: 200px;
+ overflow-y: scroll;
+ }
+}
+
+/* Buttons */
+
+/* ------------------------------- */
+
+.btn-outline {
+ color: inherit;
+ background-color: transparent;
+ transition: all .5s;
+}
+
+.btn-primary.btn-outline {
+ color: #428bca;
+}
+
+.btn-success.btn-outline {
+ color: #5cb85c;
+}
+
+.btn-info.btn-outline {
+ color: #5bc0de;
+}
+
+.btn-warning.btn-outline {
+ color: #f0ad4e;
+}
+
+.btn-danger.btn-outline {
+ color: #d9534f;
+}
+
+.btn-primary.btn-outline:hover,
+.btn-success.btn-outline:hover,
+.btn-info.btn-outline:hover,
+.btn-warning.btn-outline:hover,
+.btn-danger.btn-outline:hover {
+ color: #fff;
+}
+
+/* Pages */
+
+/* ------------------------------- */
+
+/* Dashboard Chat */
+
+.chat {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.chat li {
+ margin-bottom: 10px;
+ padding-bottom: 5px;
+ border-bottom: 1px dotted #B3A9A9;
+}
+
+.chat li.left .chat-body {
+ margin-left: 60px;
+}
+
+.chat li.right .chat-body {
+ margin-right: 60px;
+}
+
+.chat li .chat-body p {
+ margin: 0;
+ color: #777777;
+}
+
+.panel .slidedown .glyphicon,
+.chat .glyphicon {
+ margin-right: 5px;
+}
+
+.chat-panel .panel-body {
+ height: 350px;
+ overflow-y: scroll;
+}
+
+/* Login Page */
+
+.login-panel {
+ margin-top: 25%;
+}
+
+/* Flot Chart Containers */
+
+.flot-chart {
+ display: block;
+ height: 400px;
+}
+
+.flot-chart-content {
+ width: 100%;
+ height: 100%;
+}
+
+/* DataTables Overrides */
+
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+ background: transparent;
+}
+
+table.dataTable thead .sorting_asc:after {
+ content: "\f0de";
+ float: right;
+ font-family: fontawesome;
+}
+
+table.dataTable thead .sorting_desc:after {
+ content: "\f0dd";
+ float: right;
+ font-family: fontawesome;
+}
+
+table.dataTable thead .sorting:after {
+ content: "\f0dc";
+ float: right;
+ font-family: fontawesome;
+ color: rgba(50,50,50,.5);
+}
+
+/* Circle Buttons */
+
+.btn-circle {
+ width: 30px;
+ height: 30px;
+ padding: 6px 0;
+ border-radius: 15px;
+ text-align: center;
+ font-size: 12px;
+ line-height: 1.428571429;
+}
+
+.btn-circle.btn-lg {
+ width: 50px;
+ height: 50px;
+ padding: 10px 16px;
+ border-radius: 25px;
+ font-size: 18px;
+ line-height: 1.33;
+}
+
+.btn-circle.btn-xl {
+ width: 70px;
+ height: 70px;
+ padding: 10px 16px;
+ border-radius: 35px;
+ font-size: 24px;
+ line-height: 1.33;
+}
+
+.show-grid [class^="col-"] {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ border: 1px solid #ddd;
+ background-color: #eee !important;
+}
+
+.show-grid {
+ margin: 15px 0;
+}
+
+.box {
+ background: #fff;
+ border: solid 1px #dee5eb;
+ padding: 0;
+ border-radius: 4px;
+ margin-top: 2em;
+
+ .box-header {
+ position: relative;
+ background-color: #fafcfc;
+ border-bottom: solid 1px #e9eff3;
+ padding: 10px;
+ border-radius: 4px 4px 0 0;
+ font-weight: 400;
+ color: #96a7b6;
+ margin: 0;
+ }
+ * {
+ padding-left: 0.5em;
+ }
+ img {
+ margin-left: auto;
+ margin-right: auto;
+ padding: 1em;
+ }
+}
+
+#order-notes {
+ .form-group, .form-control {
+ margin: 0;
+ padding: 0.5em;
+ }
+}
+
+#messages {
+ padding-top: 2em;
+ margin-bottom: -3em;
+}