Basic branding
This commit is contained in:
223
core/settings.py
223
core/settings.py
@@ -1,223 +0,0 @@
|
||||
import os
|
||||
|
||||
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
|
||||
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
||||
# Quick-start development settings - unsuitable for production
|
||||
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'a$mpn=bgpoa^))l#_29*icq1cwf*_1-p!i9e$xy%1p-#hqja%w'
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
|
||||
ALLOWED_HOSTS = []
|
||||
|
||||
# Internationalization
|
||||
# https://docs.djangoproject.com/en/2.2/topics/i18n/
|
||||
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
USE_I18N = True
|
||||
|
||||
USE_L10N = True
|
||||
|
||||
USE_TZ = True
|
||||
|
||||
LANGUAGES = [
|
||||
('en', 'English'),
|
||||
('fi', 'Finnish'),
|
||||
('it', 'Italian'),
|
||||
('ja', 'Japanese'),
|
||||
('pt-br', 'Brazilian Portuguese'),
|
||||
('ru', 'Russian'),
|
||||
('sv', 'Swedish'),
|
||||
('zh-hans', 'Simplified Chinese'),
|
||||
('es', 'Spanish'),
|
||||
]
|
||||
|
||||
PARLER_DEFAULT_LANGUAGE_CODE = "en"
|
||||
|
||||
PARLER_LANGUAGES = {
|
||||
None: [{"code": c, "name": n} for (c, n) in LANGUAGES],
|
||||
'default': {
|
||||
'hide_untranslated': False,
|
||||
}
|
||||
}
|
||||
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
# Shuuuuuuuuuuuuuuuuup
|
||||
'easy_thumbnails',
|
||||
'shuup.themes.classic_gray',
|
||||
'shuup.core',
|
||||
'shuup.admin',
|
||||
'shuup.addons',
|
||||
'shuup.default_tax',
|
||||
'shuup.front',
|
||||
'shuup.front.apps.auth',
|
||||
'shuup.front.apps.carousel',
|
||||
'shuup.front.apps.customer_information',
|
||||
'shuup.front.apps.personal_order_history',
|
||||
'shuup.front.apps.saved_carts',
|
||||
'shuup.front.apps.registration',
|
||||
'shuup.front.apps.simple_order_notification',
|
||||
'shuup.front.apps.simple_search',
|
||||
'shuup.front.apps.recently_viewed_products',
|
||||
'shuup.notify',
|
||||
'shuup.simple_cms',
|
||||
'shuup.customer_group_pricing',
|
||||
'shuup.campaigns',
|
||||
'shuup.simple_supplier',
|
||||
'shuup.order_printouts',
|
||||
'shuup.utils',
|
||||
'shuup.xtheme',
|
||||
'shuup.reports',
|
||||
'shuup.default_reports',
|
||||
'shuup.regions',
|
||||
'shuup.importer',
|
||||
'shuup.default_importer',
|
||||
'shuup.gdpr',
|
||||
'shuup.tasks',
|
||||
'shuup.discounts',
|
||||
|
||||
# external apps
|
||||
'bootstrap3',
|
||||
'django_countries',
|
||||
'django_jinja',
|
||||
'django_filters',
|
||||
'filer',
|
||||
'reversion',
|
||||
'registration',
|
||||
'rest_framework',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
'django.middleware.security.SecurityMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.clickjacking.XFrameOptionsMiddleware',
|
||||
'shuup.front.middleware.ProblemMiddleware',
|
||||
'shuup.core.middleware.ShuupMiddleware',
|
||||
'shuup.front.middleware.ShuupFrontMiddleware',
|
||||
'shuup.xtheme.middleware.XthemeMiddleware',
|
||||
'shuup.admin.middleware.ShuupAdminMiddleware'
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'core.urls'
|
||||
|
||||
TCP = [
|
||||
"django.contrib.auth.context_processors.auth",
|
||||
"django.template.context_processors.debug",
|
||||
"django.template.context_processors.i18n",
|
||||
"django.template.context_processors.media",
|
||||
"django.template.context_processors.static",
|
||||
"django.template.context_processors.request",
|
||||
"django.template.context_processors.tz",
|
||||
"django.contrib.messages.context_processors.messages"
|
||||
]
|
||||
|
||||
TEMPLATES = [
|
||||
{
|
||||
"BACKEND": "django_jinja.backend.Jinja2",
|
||||
"APP_DIRS": True,
|
||||
"OPTIONS": {
|
||||
"match_extension": ".jinja",
|
||||
"context_processors": TCP,
|
||||
"newstyle_gettext": True,
|
||||
"environment": "shuup.xtheme.engine.XthemeEnvironment",
|
||||
},
|
||||
"NAME": "jinja2",
|
||||
},
|
||||
{
|
||||
"BACKEND": "django.template.backends.django.DjangoTemplates",
|
||||
"DIRS": [],
|
||||
"APP_DIRS": True,
|
||||
"OPTIONS": {
|
||||
"context_processors": TCP,
|
||||
"debug": DEBUG
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
# set login url here because of `login_required` decorators
|
||||
LOGIN_URL = "/login/"
|
||||
|
||||
SESSION_SERIALIZER = "django.contrib.sessions.serializers.PickleSerializer"
|
||||
|
||||
SHUUP_PRICING_MODULE = "customer_group_pricing"
|
||||
|
||||
SHUUP_SETUP_WIZARD_PANE_SPEC = [
|
||||
"shuup.admin.modules.shops.views:ShopWizardPane",
|
||||
"shuup.admin.modules.service_providers.views.PaymentWizardPane",
|
||||
"shuup.admin.modules.service_providers.views.CarrierWizardPane",
|
||||
"shuup.xtheme.admin_module.views.ThemeWizardPane",
|
||||
"shuup.testing.modules.sample_data.views.SampleObjectsWizardPane" if DEBUG else "",
|
||||
"shuup.admin.modules.system.views.TelemetryWizardPane"
|
||||
]
|
||||
|
||||
|
||||
SHUUP_ERROR_PAGE_HANDLERS_SPEC = [
|
||||
"shuup.admin.error_handlers:AdminPageErrorHandler",
|
||||
"shuup.front.error_handlers:FrontPageErrorHandler"
|
||||
]
|
||||
|
||||
SHUUP_SIMPLE_SEARCH_LIMIT = 150
|
||||
|
||||
if os.environ.get("SHUUP_WORKBENCH_DISABLE_MIGRATIONS") == "1":
|
||||
from .utils import get_disabled_migrations
|
||||
MIGRATION_MODULES = get_disabled_migrations()
|
||||
|
||||
|
||||
def configure(setup):
|
||||
setup.commit(globals())
|
||||
|
||||
WSGI_APPLICATION = 'core.wsgi.application'
|
||||
|
||||
|
||||
# Database
|
||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.sqlite3',
|
||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Password validation
|
||||
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
|
||||
|
||||
AUTH_PASSWORD_VALIDATORS = [
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
|
||||
},
|
||||
{
|
||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
# Static files (CSS, JavaScript, Images)
|
||||
# https://docs.djangoproject.com/en/2.2/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
10
core/urls.py
10
core/urls.py
@@ -1,10 +0,0 @@
|
||||
from django.conf import settings
|
||||
from django.contrib import admin
|
||||
from django.urls import path, include
|
||||
from django.conf.urls.static import static
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('sa/', include('shuup.admin.urls', namespace="shuup_admin")),
|
||||
path('', include('shuup.front.urls', namespace="shuup")),
|
||||
]
|
||||
16
core/wsgi.py
16
core/wsgi.py
@@ -1,16 +0,0 @@
|
||||
"""
|
||||
WSGI config for empire project.
|
||||
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
4914
package-lock.json
generated
Normal file
4914
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
368
weirdlittleempire/migrations/0001_initial.py
Normal file
368
weirdlittleempire/migrations/0001_initial.py
Normal file
@@ -0,0 +1,368 @@
|
||||
# Generated by Django 3.0.13 on 2021-02-23 23:00
|
||||
|
||||
import cms.models.fields
|
||||
from django.conf import settings
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import django.db.models.manager
|
||||
import django.utils.timezone
|
||||
import django_fsm
|
||||
import djangocms_text_ckeditor.fields
|
||||
import filer.fields.image
|
||||
import shop.models.address
|
||||
import shop.models.fields
|
||||
import shop.models.product
|
||||
import shop.money.fields
|
||||
import shop.payment.workflows
|
||||
import shop.shipping.workflows
|
||||
import shop_stripe.workflows
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.FILER_IMAGE_MODEL),
|
||||
('cms', '0022_auto_20180620_1551'),
|
||||
('email_auth', '0005_auto_20191123_2051'),
|
||||
('contenttypes', '0002_remove_content_type_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BillingAddress',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('priority', models.SmallIntegerField(db_index=True, default=0, help_text='Priority for using this address')),
|
||||
('name', models.CharField(max_length=1024, verbose_name='Full name')),
|
||||
('address1', models.CharField(max_length=1024, verbose_name='Address line 1')),
|
||||
('address2', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Address line 2')),
|
||||
('zip_code', models.CharField(max_length=12, verbose_name='ZIP / Postal code')),
|
||||
('city', models.CharField(max_length=1024, verbose_name='City')),
|
||||
('country', shop.models.address.CountryField(verbose_name='Country')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Billing Address',
|
||||
'verbose_name_plural': 'Billing Addresses',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Cart',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
|
||||
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
|
||||
('extra', shop.models.fields.JSONField(verbose_name='Arbitrary information for this cart')),
|
||||
('billing_address', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='+', to='weirdlittleempire.BillingAddress')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Customer',
|
||||
fields=[
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='customer', serialize=False, to=settings.AUTH_USER_MODEL)),
|
||||
('recognized', shop.models.fields.ChoiceEnumField(help_text='Designates the state the customer is recognized as.', verbose_name='Recognized as')),
|
||||
('last_access', models.DateTimeField(default=django.utils.timezone.now, verbose_name='Last accessed')),
|
||||
('extra', shop.models.fields.JSONField(editable=False, verbose_name='Extra information about this customer')),
|
||||
('number', models.PositiveIntegerField(default=None, null=True, unique=True, verbose_name='Customer Number')),
|
||||
('salutation', models.CharField(choices=[('mrs', 'Mrs.'), ('mr', 'Mr.'), ('na', '(n/a)')], max_length=5, verbose_name='Salutation')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Delivery',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('shipping_id', models.CharField(blank=True, help_text="The transaction processor's reference", max_length=255, null=True, verbose_name='Shipping ID')),
|
||||
('fulfilled_at', models.DateTimeField(blank=True, help_text='Timestamp of delivery fulfillment', null=True, verbose_name='Fulfilled at')),
|
||||
('shipped_at', models.DateTimeField(blank=True, help_text='Timestamp of delivery shipment', null=True, verbose_name='Shipped at')),
|
||||
('shipping_method', models.CharField(help_text='The shipping backend used to deliver items of this order', max_length=50, verbose_name='Shipping method')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Delivery',
|
||||
'verbose_name_plural': 'Deliveries',
|
||||
'get_latest_by': 'shipped_at',
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Manufacturer',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=50, unique=True, verbose_name='Name')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OperatingSystem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=50, unique=True, verbose_name='Name')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Order',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('status', django_fsm.FSMField(default='new', max_length=50, protected=True, verbose_name='Status')),
|
||||
('currency', models.CharField(editable=False, help_text='Currency in which this order was concluded', max_length=7)),
|
||||
('_subtotal', models.DecimalField(decimal_places=2, max_digits=30, verbose_name='Subtotal')),
|
||||
('_total', models.DecimalField(decimal_places=2, max_digits=30, verbose_name='Total')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
|
||||
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
|
||||
('extra', shop.models.fields.JSONField(help_text='Arbitrary information for this order object on the moment of purchase.', verbose_name='Extra fields')),
|
||||
('stored_request', shop.models.fields.JSONField(help_text='Parts of the Request objects on the moment of purchase.')),
|
||||
('number', models.PositiveIntegerField(default=None, null=True, unique=True, verbose_name='Order Number')),
|
||||
('shipping_address_text', models.TextField(blank=True, help_text='Shipping address at the moment of purchase.', null=True, verbose_name='Shipping Address')),
|
||||
('billing_address_text', models.TextField(blank=True, help_text='Billing address at the moment of purchase.', null=True, verbose_name='Billing Address')),
|
||||
('token', models.CharField(editable=False, help_text='Secret key to verify ownership on detail view without requiring authentication.', max_length=40, null=True, verbose_name='Token')),
|
||||
('customer', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='orders', to='weirdlittleempire.Customer', verbose_name='Customer')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Order',
|
||||
'verbose_name_plural': 'Orders',
|
||||
},
|
||||
bases=(shop.payment.workflows.ManualPaymentWorkflowMixin, shop.payment.workflows.CancelOrderWorkflowMixin, shop.shipping.workflows.PartialDeliveryWorkflowMixin, shop_stripe.workflows.OrderWorkflowMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Product',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Created at')),
|
||||
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
|
||||
('active', models.BooleanField(default=True, help_text='Is this product publicly visible.', verbose_name='Active')),
|
||||
('product_name', models.CharField(max_length=255, verbose_name='Product Name')),
|
||||
('slug', models.SlugField(unique=True, verbose_name='Slug')),
|
||||
('caption', djangocms_text_ckeditor.fields.HTMLField(blank=True, help_text="Short description used in the catalog's list view of products.", null=True, verbose_name='Caption')),
|
||||
('order', models.PositiveIntegerField(db_index=True, verbose_name='Sort by')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Product',
|
||||
'verbose_name_plural': 'Products',
|
||||
'ordering': ('order',),
|
||||
},
|
||||
bases=(shop.models.product.CMSPageReferenceMixin, models.Model),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SmartCard',
|
||||
fields=[
|
||||
('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='weirdlittleempire.Product')),
|
||||
('unit_price', shop.money.fields.MoneyField(decimal_places=3, help_text='Net price for this product', verbose_name='Unit price')),
|
||||
('card_type', models.CharField(choices=[('SD', 'SD'), ('micro SD', 'micro SD'), ('SDXC', 'SDXC'), ('micro SDXC', 'micro SDXC'), ('SDHC', 'SDHC'), ('micro SDHC', 'micro SDHC'), ('SDHC II', 'SDHC II'), ('micro SDHC II', 'micro SDHC II')], max_length=15, verbose_name='Card Type')),
|
||||
('speed', models.CharField(choices=[('4', '4 MB/s'), ('20', '20 MB/s'), ('30', '30 MB/s'), ('40', '40 MB/s'), ('48', '48 MB/s'), ('80', '80 MB/s'), ('95', '95 MB/s'), ('280', '280 MB/s')], max_length=8, verbose_name='Transfer Speed')),
|
||||
('product_code', models.CharField(max_length=255, unique=True, verbose_name='Product code')),
|
||||
('storage', models.PositiveIntegerField(help_text='Storage capacity in GB', verbose_name='Storage Capacity')),
|
||||
('description', djangocms_text_ckeditor.fields.HTMLField(help_text='Long description for the detail view of this product.', verbose_name='Description')),
|
||||
('quantity', models.PositiveIntegerField(default=0, help_text='Available quantity in stock', validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Smart Card',
|
||||
'verbose_name_plural': 'Smart Cards',
|
||||
'ordering': ['order'],
|
||||
},
|
||||
bases=(shop.models.product.AvailableProductMixin, 'weirdlittleempire.product'),
|
||||
managers=[
|
||||
('default_manager', django.db.models.manager.Manager()),
|
||||
('objects', django.db.models.manager.Manager()),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SmartPhoneModel',
|
||||
fields=[
|
||||
('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='weirdlittleempire.Product')),
|
||||
('battery_type', models.PositiveSmallIntegerField(choices=[(1, 'Lithium Polymer (Li-Poly)'), (2, 'Lithium Ion (Li-Ion)')], verbose_name='Battery type')),
|
||||
('battery_capacity', models.PositiveIntegerField(help_text='Battery capacity in mAh', verbose_name='Capacity')),
|
||||
('ram_storage', models.PositiveIntegerField(help_text='RAM storage in MB', verbose_name='RAM')),
|
||||
('wifi_connectivity', models.PositiveIntegerField(choices=[(1, '802.11 b/g/n')], help_text='WiFi Connectivity', verbose_name='WiFi')),
|
||||
('bluetooth', models.PositiveIntegerField(choices=[(1, 'Bluetooth 4.0'), (2, 'Bluetooth 3.0'), (3, 'Bluetooth 2.1')], help_text='Bluetooth Connectivity', verbose_name='Bluetooth')),
|
||||
('gps', models.BooleanField(default=False, help_text='GPS integrated', verbose_name='GPS')),
|
||||
('width', models.DecimalField(decimal_places=1, help_text='Width in mm', max_digits=4, verbose_name='Width')),
|
||||
('height', models.DecimalField(decimal_places=1, help_text='Height in mm', max_digits=4, verbose_name='Height')),
|
||||
('weight', models.DecimalField(decimal_places=1, help_text='Weight in gram', max_digits=5, verbose_name='Weight')),
|
||||
('screen_size', models.DecimalField(decimal_places=2, help_text='Diagonal screen size in inch', max_digits=4, verbose_name='Screen size')),
|
||||
('description', djangocms_text_ckeditor.fields.HTMLField(help_text="Full description used in the catalog's detail view of Smart Phones.", verbose_name='Description')),
|
||||
('operating_system', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.OperatingSystem', verbose_name='Operating System')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Smart Phone',
|
||||
'verbose_name_plural': 'Smart Phones',
|
||||
},
|
||||
bases=('weirdlittleempire.product',),
|
||||
managers=[
|
||||
('default_manager', django.db.models.manager.Manager()),
|
||||
('objects', django.db.models.manager.Manager()),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ShippingAddress',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('priority', models.SmallIntegerField(db_index=True, default=0, help_text='Priority for using this address')),
|
||||
('name', models.CharField(max_length=1024, verbose_name='Full name')),
|
||||
('address1', models.CharField(max_length=1024, verbose_name='Address line 1')),
|
||||
('address2', models.CharField(blank=True, max_length=1024, null=True, verbose_name='Address line 2')),
|
||||
('zip_code', models.CharField(max_length=12, verbose_name='ZIP / Postal code')),
|
||||
('city', models.CharField(max_length=1024, verbose_name='City')),
|
||||
('country', shop.models.address.CountryField(verbose_name='Country')),
|
||||
('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Customer')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Shipping Address',
|
||||
'verbose_name_plural': 'Shipping Addresses',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ProductPage',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cms.Page')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Product')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Category',
|
||||
'verbose_name_plural': 'Categories',
|
||||
'abstract': False,
|
||||
'unique_together': {('page', 'product')},
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='ProductImage',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('order', models.SmallIntegerField(default=0)),
|
||||
('image', filer.fields.image.FilerImageField(on_delete=django.db.models.deletion.CASCADE, to=settings.FILER_IMAGE_MODEL)),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Product')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Product Image',
|
||||
'verbose_name_plural': 'Product Images',
|
||||
'ordering': ['order'],
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='cms_pages',
|
||||
field=models.ManyToManyField(help_text='Choose list view this product shall appear on.', through='weirdlittleempire.ProductPage', to='cms.Page'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='images',
|
||||
field=models.ManyToManyField(through='weirdlittleempire.ProductImage', to=settings.FILER_IMAGE_MODEL),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='manufacturer',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Manufacturer', verbose_name='Manufacturer'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='product',
|
||||
name='polymorphic_ctype',
|
||||
field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='polymorphic_weirdlittleempire.product_set+', to='contenttypes.ContentType'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OrderPayment',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('amount', shop.money.fields.MoneyField(help_text='How much was paid with this particular transfer.', verbose_name='Amount paid')),
|
||||
('transaction_id', models.CharField(help_text="The transaction processor's reference", max_length=255, verbose_name='Transaction ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Received at')),
|
||||
('payment_method', models.CharField(help_text='The payment backend used to process the purchase', max_length=50, verbose_name='Payment method')),
|
||||
('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Order', verbose_name='Order')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Order payment',
|
||||
'verbose_name_plural': 'Order payments',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='OrderItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('product_name', models.CharField(blank=True, help_text='Product name at the moment of purchase.', max_length=255, null=True, verbose_name='Product name')),
|
||||
('product_code', models.CharField(blank=True, help_text='Product code at the moment of purchase.', max_length=255, null=True, verbose_name='Product code')),
|
||||
('_unit_price', models.DecimalField(decimal_places=2, help_text='Products unit price at the moment of purchase.', max_digits=30, null=True, verbose_name='Unit price')),
|
||||
('_line_total', models.DecimalField(decimal_places=2, help_text='Line total on the invoice at the moment of purchase.', max_digits=30, null=True, verbose_name='Line Total')),
|
||||
('extra', shop.models.fields.JSONField(help_text='Arbitrary information for this order item', verbose_name='Extra fields')),
|
||||
('quantity', models.PositiveIntegerField(verbose_name='Ordered quantity')),
|
||||
('canceled', models.BooleanField(default=False, verbose_name='Item canceled ')),
|
||||
('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='weirdlittleempire.Order', verbose_name='Order')),
|
||||
('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='weirdlittleempire.Product', verbose_name='Product')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='DeliveryItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('quantity', models.IntegerField(default=0, verbose_name='Delivered quantity')),
|
||||
('delivery', models.ForeignKey(help_text='Refer to the shipping provider used to ship this item', on_delete=django.db.models.deletion.CASCADE, related_name='items', to='weirdlittleempire.Delivery', verbose_name='Delivery')),
|
||||
('item', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='deliver_item', to='weirdlittleempire.OrderItem', verbose_name='Ordered item')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='delivery',
|
||||
name='order',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Order'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='CartItem',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('product_code', models.CharField(blank=True, help_text='Product code of added item.', max_length=255, null=True, verbose_name='Product code')),
|
||||
('updated_at', models.DateTimeField(auto_now=True, verbose_name='Updated at')),
|
||||
('extra', shop.models.fields.JSONField(verbose_name='Arbitrary information for this cart item')),
|
||||
('quantity', models.PositiveIntegerField()),
|
||||
('cart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='weirdlittleempire.Cart')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Product')),
|
||||
],
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='cart',
|
||||
name='customer',
|
||||
field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='cart', to='weirdlittleempire.Customer', verbose_name='Customer'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='cart',
|
||||
name='shipping_address',
|
||||
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_DEFAULT, related_name='+', to='weirdlittleempire.ShippingAddress'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='billingaddress',
|
||||
name='customer',
|
||||
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='weirdlittleempire.Customer'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SmartPhoneVariant',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('product_code', models.CharField(max_length=255, unique=True, verbose_name='Product code')),
|
||||
('unit_price', shop.money.fields.MoneyField(decimal_places=3, help_text='Net price for this product', verbose_name='Unit price')),
|
||||
('storage', models.PositiveIntegerField(help_text='Internal storage in GB', verbose_name='Internal Storage')),
|
||||
('quantity', models.PositiveIntegerField(default=0, help_text='Available quantity in stock', validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity')),
|
||||
('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='variants', to='weirdlittleempire.SmartPhoneModel', verbose_name='Smartphone Model')),
|
||||
],
|
||||
bases=(shop.models.product.AvailableProductMixin, models.Model),
|
||||
),
|
||||
migrations.AlterUniqueTogether(
|
||||
name='delivery',
|
||||
unique_together={('shipping_method', 'shipping_id')},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Commodity',
|
||||
fields=[
|
||||
('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='weirdlittleempire.Product')),
|
||||
('unit_price', shop.money.fields.MoneyField(decimal_places=3, help_text='Net price for this product', verbose_name='Unit price')),
|
||||
('product_code', models.CharField(max_length=255, unique=True, verbose_name='Product code')),
|
||||
('quantity', models.PositiveIntegerField(default=0, help_text='Available quantity in stock', validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity')),
|
||||
('placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, slotname='Commodity Details', to='cms.Placeholder')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Commodity',
|
||||
'verbose_name_plural': 'Commodities',
|
||||
},
|
||||
bases=(shop.models.product.AvailableProductMixin, 'weirdlittleempire.product'),
|
||||
managers=[
|
||||
('default_manager', django.db.models.manager.Manager()),
|
||||
('objects', django.db.models.manager.Manager()),
|
||||
],
|
||||
),
|
||||
]
|
||||
@@ -3,3 +3,8 @@
|
||||
@import "shop/css/django-shop";
|
||||
@import "navbar";
|
||||
@import "footer";
|
||||
|
||||
body, header, .navbar {
|
||||
background-color: black !important;
|
||||
color: white;
|
||||
}
|
||||
|
||||
BIN
weirdlittleempire/static/weirdlittleempire/wle.png
Normal file
BIN
weirdlittleempire/static/weirdlittleempire/wle.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 185 KiB |
@@ -64,4 +64,3 @@
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% block navbar-brand %}
|
||||
<div class="shop-brand-icon">
|
||||
<a href="/">
|
||||
<img src="{% static 'weirdlittleempire/django-shop-logo.svg' %}" alt="django-SHOP" aria-hidden="true">
|
||||
<img src="{% static 'weirdlittleempire/wle.png' %}" alt="weird little EMPIRE" aria-hidden="true">
|
||||
</a>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user