gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-codeless] 01/01: first commit


From: gnunet
Subject: [GNUnet-SVN] [taler-codeless] 01/01: first commit
Date: Mon, 14 May 2018 21:57:30 +0200

This is an automated email from the git hooks/post-receive script.

shivam-kohli pushed a commit to branch master
in repository codeless.

commit 0eb98c3c5d6fabebe30a0356fd5263ca4303cf02
Author: shivam kohli <address@hidden>
AuthorDate: Tue May 15 00:40:44 2018 +0530

    first commit
---
 codeless/__init__.py                               |   0
 codeless/__pycache__/__init__.cpython-36.pyc       | Bin 0 -> 139 bytes
 codeless/__pycache__/settings.cpython-36.pyc       | Bin 0 -> 2049 bytes
 codeless/__pycache__/urls.cpython-36.pyc           | Bin 0 -> 297 bytes
 codeless/__pycache__/wsgi.cpython-36.pyc           | Bin 0 -> 544 bytes
 codeless/settings.py                               | 103 +++++++++++++++++++++
 codeless/urls.py                                   |  10 ++
 codeless/wsgi.py                                   |  16 ++++
 db.sqlite3                                         | Bin 0 -> 192512 bytes
 inventory/__init__.py                              |   0
 inventory/__pycache__/__init__.cpython-36.pyc      | Bin 0 -> 140 bytes
 inventory/__pycache__/admin.cpython-36.pyc         | Bin 0 -> 394 bytes
 inventory/__pycache__/models.cpython-36.pyc        | Bin 0 -> 2895 bytes
 inventory/admin.py                                 |  10 ++
 inventory/migrations/0001_initial.py               |  75 +++++++++++++++
 inventory/migrations/__init__.py                   |   0
 .../__pycache__/0001_initial.cpython-36.pyc        | Bin 0 -> 1952 bytes
 .../migrations/__pycache__/__init__.cpython-36.pyc | Bin 0 -> 151 bytes
 inventory/models.py                                |  76 +++++++++++++++
 inventory/tests.py                                 |   3 +
 inventory/views.py                                 |   3 +
 manage.py                                          |  10 ++
 22 files changed, 306 insertions(+)

diff --git a/codeless/__init__.py b/codeless/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/codeless/__pycache__/__init__.cpython-36.pyc 
b/codeless/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..60efddb
Binary files /dev/null and b/codeless/__pycache__/__init__.cpython-36.pyc differ
diff --git a/codeless/__pycache__/settings.cpython-36.pyc 
b/codeless/__pycache__/settings.cpython-36.pyc
new file mode 100644
index 0000000..703e644
Binary files /dev/null and b/codeless/__pycache__/settings.cpython-36.pyc differ
diff --git a/codeless/__pycache__/urls.cpython-36.pyc 
b/codeless/__pycache__/urls.cpython-36.pyc
new file mode 100644
index 0000000..16aa3ff
Binary files /dev/null and b/codeless/__pycache__/urls.cpython-36.pyc differ
diff --git a/codeless/__pycache__/wsgi.cpython-36.pyc 
b/codeless/__pycache__/wsgi.cpython-36.pyc
new file mode 100644
index 0000000..d6f0239
Binary files /dev/null and b/codeless/__pycache__/wsgi.cpython-36.pyc differ
diff --git a/codeless/settings.py b/codeless/settings.py
new file mode 100644
index 0000000..c2bd13f
--- /dev/null
+++ b/codeless/settings.py
@@ -0,0 +1,103 @@
+"""
+Django settings for codeless project.
+
+Generated by 'django-admin startproject' using Django 1.8.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.8/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.8/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+
+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/1.8/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = '58c29ykcsc)address@hidden)ce%rk15_c=&uu!k#f!b(l4pbmlryp5s=p'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+    'django.contrib.admin',
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.messages',
+    'django.contrib.staticfiles',
+    'inventory',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'django.middleware.common.CommonMiddleware',
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
+    'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    'django.middleware.security.SecurityMiddleware',
+)
+
+ROOT_URLCONF = 'codeless.urls'
+
+TEMPLATES = [
+    {
+        'BACKEND': 'django.template.backends.django.DjangoTemplates',
+        'DIRS': [],
+        'APP_DIRS': True,
+        'OPTIONS': {
+            'context_processors': [
+                'django.template.context_processors.debug',
+                'django.template.context_processors.request',
+                'django.contrib.auth.context_processors.auth',
+                'django.contrib.messages.context_processors.messages',
+            ],
+        },
+    },
+]
+
+WSGI_APPLICATION = 'codeless.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+    }
+}
+
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.8/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.8/howto/static-files/
+
+STATIC_URL = '/static/'
diff --git a/codeless/urls.py b/codeless/urls.py
new file mode 100644
index 0000000..ebbaa31
--- /dev/null
+++ b/codeless/urls.py
@@ -0,0 +1,10 @@
+from django.conf.urls import include, url
+from django.contrib import admin
+
+urlpatterns = [
+    # Examples:
+    # url(r'^$', 'codeless.views.home', name='home'),
+    # url(r'^blog/', include('blog.urls')),
+
+    url(r'^admin/', include(admin.site.urls)),
+]
diff --git a/codeless/wsgi.py b/codeless/wsgi.py
new file mode 100644
index 0000000..12717af
--- /dev/null
+++ b/codeless/wsgi.py
@@ -0,0 +1,16 @@
+"""
+WSGI config for codeless 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/1.8/howto/deployment/wsgi/
+"""
+
+import os
+
+from django.core.wsgi import get_wsgi_application
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codeless.settings")
+
+application = get_wsgi_application()
diff --git a/db.sqlite3 b/db.sqlite3
new file mode 100644
index 0000000..d17ac95
Binary files /dev/null and b/db.sqlite3 differ
diff --git a/inventory/__init__.py b/inventory/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/inventory/__pycache__/__init__.cpython-36.pyc 
b/inventory/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..dc1f6ea
Binary files /dev/null and b/inventory/__pycache__/__init__.cpython-36.pyc 
differ
diff --git a/inventory/__pycache__/admin.cpython-36.pyc 
b/inventory/__pycache__/admin.cpython-36.pyc
new file mode 100644
index 0000000..fa69c75
Binary files /dev/null and b/inventory/__pycache__/admin.cpython-36.pyc differ
diff --git a/inventory/__pycache__/models.cpython-36.pyc 
b/inventory/__pycache__/models.cpython-36.pyc
new file mode 100644
index 0000000..bc511cd
Binary files /dev/null and b/inventory/__pycache__/models.cpython-36.pyc differ
diff --git a/inventory/admin.py b/inventory/admin.py
new file mode 100644
index 0000000..e5d1df7
--- /dev/null
+++ b/inventory/admin.py
@@ -0,0 +1,10 @@
+from django.contrib import admin
+from inventory.models import product , merchant , order , purchase , 
payment_button
+
+# Register your models here.
+
+admin.site.register(product)
+admin.site.register(merchant)
+admin.site.register(order)
+admin.site.register(purchase)
+admin.site.register(payment_button)
diff --git a/inventory/migrations/0001_initial.py 
b/inventory/migrations/0001_initial.py
new file mode 100644
index 0000000..604d207
--- /dev/null
+++ b/inventory/migrations/0001_initial.py
@@ -0,0 +1,75 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='merchant',
+            fields=[
+                ('merchant_id', models.AutoField(primary_key=True, 
serialize=False)),
+                ('name', models.CharField(max_length=200, blank=True, 
null=True)),
+                ('address', models.CharField(max_length=200, blank=True, 
null=True)),
+                ('pay_url', models.URLField(max_length=250, default='NULL')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='order',
+            fields=[
+                ('order_id', models.AutoField(primary_key=True, 
serialize=False)),
+                ('description', models.CharField(max_length=300, blank=True, 
null=True)),
+                ('order_date', models.DateTimeField(auto_now=True)),
+                ('address', models.CharField(max_length=250, blank=True, 
null=True)),
+                ('fulfillment_url', models.URLField(default='NULL')),
+                ('merchant_id', models.ForeignKey(to='inventory.merchant')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='payment_button',
+            fields=[
+                ('id', models.AutoField(verbose_name='ID', primary_key=True, 
serialize=False, auto_created=True)),
+                ('text', models.CharField(max_length=100, blank=True, 
null=True)),
+                ('font_size', models.CharField(max_length=50, blank=True, 
null=True)),
+                ('color', models.CharField(max_length=50, blank=True, 
null=True)),
+                ('background_color', models.CharField(max_length=50, 
blank=True, null=True)),
+                ('border_radius', models.CharField(max_length=50, blank=True, 
null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='product',
+            fields=[
+                ('product_id', models.AutoField(primary_key=True, 
serialize=False)),
+                ('name', models.CharField(max_length=50, blank=True, 
null=True)),
+                ('description', models.CharField(max_length=300, blank=True, 
null=True)),
+                ('price', models.IntegerField(blank=True, null=True)),
+                ('delivery_date', models.DateTimeField(auto_now=True)),
+                ('starting_inventory', models.IntegerField(blank=True, 
null=True)),
+                ('minimuma_required', models.IntegerField(blank=True, 
null=True)),
+                ('inventory_on_hand', models.IntegerField(blank=True, 
null=True)),
+                ('inventory_recieved', models.IntegerField(blank=True, 
null=True)),
+                ('inventory_shipped', models.IntegerField(blank=True, 
null=True)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='purchase',
+            fields=[
+                ('purchase_id', models.AutoField(primary_key=True, 
serialize=False)),
+                ('description', models.CharField(max_length=300, blank=True, 
null=True)),
+                ('purchase_date', models.DateTimeField(auto_now=True)),
+                ('product_recieved', models.IntegerField(blank=True, 
null=True)),
+                ('supplier', models.CharField(max_length=50, blank=True, 
null=True)),
+                ('product_id', models.ManyToManyField(null=True, 
to='inventory.product')),
+            ],
+        ),
+        migrations.AddField(
+            model_name='order',
+            name='product_id',
+            field=models.ManyToManyField(null=True, to='inventory.product'),
+        ),
+    ]
diff --git a/inventory/migrations/__init__.py b/inventory/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/inventory/migrations/__pycache__/0001_initial.cpython-36.pyc 
b/inventory/migrations/__pycache__/0001_initial.cpython-36.pyc
new file mode 100644
index 0000000..b3c4816
Binary files /dev/null and 
b/inventory/migrations/__pycache__/0001_initial.cpython-36.pyc differ
diff --git a/inventory/migrations/__pycache__/__init__.cpython-36.pyc 
b/inventory/migrations/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..4d9aa4e
Binary files /dev/null and 
b/inventory/migrations/__pycache__/__init__.cpython-36.pyc differ
diff --git a/inventory/models.py b/inventory/models.py
new file mode 100644
index 0000000..643a130
--- /dev/null
+++ b/inventory/models.py
@@ -0,0 +1,76 @@
+from django.db import models
+from django.contrib.auth.models import User
+
+# Create your models here.
+
+
+class product(models.Model):
+    product_id = models.AutoField(primary_key=True)
+    name = models.CharField(max_length = 50 , blank = True , null = True)
+    description = models.CharField(max_length = 300 , blank = True , null = 
True)
+    price = models.IntegerField(blank = True , null = True)
+    delivery_date = models.DateTimeField(auto_now=True)
+    starting_inventory = models.IntegerField(blank = True , null = True)
+    minimuma_required = models.IntegerField(blank = True , null = True)
+    inventory_on_hand = models.IntegerField(blank = True , null = True)
+    inventory_recieved = models.IntegerField(blank = True , null = True)
+    inventory_shipped = models.IntegerField(blank = True , null = True)
+
+    def __str__(self):
+        return self.name
+
+
+class merchant(models.Model):
+    # user = models.OneToOneField(User, on_delete=models.CASCADE)
+    merchant_id = models.AutoField(primary_key=True)
+    name = models.CharField(max_length = 200 , blank = True , null = True)
+    address = models.CharField(max_length = 200 , blank = True , null = True)
+    pay_url = models.URLField(max_length = 250 , default = 'NULL')
+
+    def __str__(self):
+        return self.name
+
+
+class order(models.Model):
+    order_id = models.AutoField(primary_key=True)
+    product_id =models.ManyToManyField(product , null = True)
+    description = models.CharField(max_length = 300 , blank = True , null = 
True)
+    order_date = models.DateTimeField(auto_now=True)
+    address = models.CharField(max_length = 250 , blank = True , null = True)
+    merchant_id = models.ForeignKey(merchant, on_delete=models.CASCADE) 
+    fulfillment_url = models.URLField(max_length = 200 , default = 'NULL')
+
+    def __str__(self):
+        return self.description
+
+
+class purchase(models.Model):
+    purchase_id = models.AutoField(primary_key=True)
+    product_id = models.ManyToManyField(product , null = True)
+    description = models.CharField(max_length = 300 , blank = True , null = 
True)
+    purchase_date = models.DateTimeField(auto_now=True)
+    product_recieved = models.IntegerField(blank = True , null = True)
+    supplier = models.CharField(max_length = 50 , blank = True , null = True)
+
+    def __str__(self):
+        return self.description
+
+
+class payment_button(models.Model):
+    text = models.CharField(max_length = 100 , blank = True , null = True)
+    font_size = models.CharField(max_length = 50 , blank = True , null = True)
+    color = models.CharField(max_length = 50 , blank = True , null = True)
+    background_color = models.CharField(max_length = 50 , blank = True , null 
= True)
+    border_radius = models.CharField(max_length = 50 , blank = True , null = 
True)
+
+
+    def __str__(self):
+        return self.text
+
+
+
+
+
+
+
+
diff --git a/inventory/tests.py b/inventory/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/inventory/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/inventory/views.py b/inventory/views.py
new file mode 100644
index 0000000..91ea44a
--- /dev/null
+++ b/inventory/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/manage.py b/manage.py
new file mode 100755
index 0000000..b812476
--- /dev/null
+++ b/manage.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python3
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "codeless.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]