gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-codeless] branch master updated: testcase added and


From: gnunet
Subject: [GNUnet-SVN] [taler-codeless] branch master updated: testcase added and improved user interface
Date: Mon, 23 Jul 2018 00:59:34 +0200

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

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

The following commit(s) were added to refs/heads/master by this push:
     new c60f075  testcase added and improved user interface
c60f075 is described below

commit c60f075634178d2212364c842552c256f22dae92
Author: shivam kohli <address@hidden>
AuthorDate: Mon Jul 23 04:29:14 2018 +0530

    testcase added and improved user interface
---
 .gitignore                                    |   1 +
 Makefile.in                                   |   6 ++
 inventory/forms.py                            |  18 ++--
 inventory/migrations/0002_merchant_website.py |  19 ++++
 inventory/models.py                           |   2 +
 inventory/tests.py                            |  68 +++++++++++-
 inventory/views.py                            |  63 ++++++-----
 templates/inventory/digital_inventory.html    |  52 ++++++++-
 templates/inventory/fulfillment.html          |   2 +
 templates/inventory/home.html                 |   9 +-
 templates/inventory/login.html                |  51 ++++++++-
 templates/inventory/order.html                |   1 +
 templates/inventory/product.html              | 145 +++++++++++++++++++++++++-
 templates/inventory/signup.html               |   7 ++
 14 files changed, 395 insertions(+), 49 deletions(-)

diff --git a/.gitignore b/.gitignore
index 08b6f47..19768a9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@ configure
 install-sh
 missing
 media/
+geckodriver
diff --git a/Makefile.in b/Makefile.in
index 8918ed0..0a8376a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,6 +27,12 @@ createuser:
 run:
        @./manage.py runserver
 
+.PHONY: driver_install
+run:
+       @json=$(curl -s 
https://api.github.com/repos/mozilla/geckodriver/releases/latest)
+       @url=$(echo "$json" | jq -r '.assets[].browser_download_url | 
select(contains("macos"))')
+       @curl -s -L "$url" | tar -xz
+
 .PHONY: pyc-clean
 pyc-clean:
        @find . -name "*.pyc" -exec rm -f {} \;
diff --git a/inventory/forms.py b/inventory/forms.py
index b4b35e6..1fbfa43 100644
--- a/inventory/forms.py
+++ b/inventory/forms.py
@@ -26,10 +26,20 @@ from django.contrib.auth.models import User
 from inventory.models import Merchant, Product
 
 
+ADDRESS_CHOICES= [
+    ('SEPA', 'sepa'),
+    ('UPI', 'upi'),
+    ('BITCOIN', 'bitcoin'),
+    ('ACH', 'ach'),
+    ]
+
+
 class SignUpForm(UserCreationForm):
     first_name = forms.CharField(max_length=30, required=False)
     last_name = forms.CharField(max_length=30, required=False)
     email = forms.EmailField(max_length=254)
+    website =  forms.URLField(label='Enter website URL', max_length=250, 
required=False)
+    address = forms.CharField(label='What is your favorite fruit?', 
widget=forms.Select(choices=ADDRESS_CHOICES))
 
     class Meta:
         model = User
@@ -40,6 +50,8 @@ class SignUpForm(UserCreationForm):
             'email',
             'password1',
             'password2',
+            'address',
+            'website'
             )
 
     def __init__(self, *args, **kwargs):
@@ -49,12 +61,6 @@ class SignUpForm(UserCreationForm):
             self.fields[fieldname].help_text = None
 
 
-class MerchantDetailForm(forms.ModelForm):
-    class Meta:
-        model = Merchant
-        fields = ("address",)
-
-
 class LoginForm(forms.ModelForm):
     class Meta:
         model = User
diff --git a/inventory/migrations/0002_merchant_website.py 
b/inventory/migrations/0002_merchant_website.py
new file mode 100644
index 0000000..8cc270f
--- /dev/null
+++ b/inventory/migrations/0002_merchant_website.py
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+from __future__ import unicode_literals
+
+from django.db import models, migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('inventory', '0001_initial'),
+    ]
+
+    operations = [
+        migrations.AddField(
+            model_name='merchant',
+            name='website',
+            field=models.URLField(max_length=250, default='NULL'),
+        ),
+    ]
diff --git a/inventory/models.py b/inventory/models.py
index 9fc1539..a65142c 100644
--- a/inventory/models.py
+++ b/inventory/models.py
@@ -33,6 +33,8 @@ class Merchant(models.Model):
     user = models.OneToOneField(User, on_delete=models.CASCADE)
     address = models.TextField()
     pay_url = models.URLField(max_length=250, default='NULL')
+    website = models.URLField(max_length=250, default='NULL')
+
 
     def __str__(self):
         return self.user.username
diff --git a/inventory/tests.py b/inventory/tests.py
index 7ce503c..276cfdc 100644
--- a/inventory/tests.py
+++ b/inventory/tests.py
@@ -1,3 +1,69 @@
 from django.test import TestCase
+from django.test import LiveServerTestCase
+from selenium import webdriver
+from selenium.webdriver.common.keys import Keys
+import time
 
-# Create your tests here.
+
+class SignUpTestCase(LiveServerTestCase):
+
+    def setUp(self):
+        self.selenium = webdriver.Firefox(executable_path=r'/geckodriver')
+        super(SignUpTestCase, self).setUp()
+
+    def tearDown(self):
+        self.selenium.quit()
+        super(SignUpTestCase, self).tearDown()
+
+    def test_register(self):
+        selenium = self.selenium
+        #Opening the link we want to test
+        selenium.get('http://localhost:8000/signup/')
+        username = selenium.find_element_by_id('id_username')
+        first_name = selenium.find_element_by_id('id_first_name')
+        last_name = selenium.find_element_by_id('id_last_name')
+        email = selenium.find_element_by_id('id_email')
+        password1 = selenium.find_element_by_id('id_password1')
+        password2 = selenium.find_element_by_id('id_password2')
+        submit = selenium.find_element_by_name('add_product')
+        #Fill the form with data
+        first_name.send_keys('eeeeee')
+        last_name.send_keys('Unaryk')
+        username.send_keys('test1')
+        email.send_keys('address@hidden')
+        password1.send_keys('123456')
+        password2.send_keys('123456')
+        #submitting the form
+        submit.send_keys(Keys.RETURN)
+        #check the returned result
+        time.sleep(1)
+        # print(selenium.page_source)
+        assert 'DIGITAL INVENTORY' in selenium.page_source
+
+
+class LoginTestCase(LiveServerTestCase):
+
+    def setUp(self):
+        self.selenium = webdriver.Firefox(executable_path=r'/geckodriver')
+        super(LoginTestCase, self).setUp()
+
+    def tearDown(self):
+        self.selenium.quit()
+        super(LoginTestCase, self).tearDown()
+
+    def test_register(self):
+        selenium = self.selenium
+        #Opening the link we want to test
+        selenium.get('http://localhost:8000/accounts/login/')
+        username = selenium.find_element_by_id('id_username')
+        password = selenium.find_element_by_id('id_password')
+        submit = selenium.find_element_by_name('add_product')
+        #Fill the form with data
+        username.send_keys('admin')
+        password.send_keys('admin')
+        #submitting the form
+        submit.send_keys(Keys.RETURN)
+        #check the returned result
+        time.sleep(1)
+        # print(selenium.page_source)
+        assert 'DIGITAL INVENTORY' in selenium.page_source
diff --git a/inventory/views.py b/inventory/views.py
index e8b4686..e4e6a4c 100644
--- a/inventory/views.py
+++ b/inventory/views.py
@@ -21,7 +21,7 @@
 # @author Shivam Kohli
 
 
-from inventory.forms import SignUpForm, MerchantDetailForm, LoginForm, 
DocumentForm
+from inventory.forms import SignUpForm, LoginForm, DocumentForm
 from inventory.models import Merchant, Product, Order
 from django.contrib.auth.models import User
 from django.contrib.auth import authenticate
@@ -126,6 +126,11 @@ def fulfillment(request):
             context_dict['price'] = product[item].price
             context_dict['delivery_date'] = order_instance.order_date
             context_dict['address'] = order_instance.address
+            merchant = order_instance.merchant
+            user = User.objects.get(username=merchant)
+            primary_key = user.pk
+            merchant_instance = Merchant.objects.get(pk=primary_key)
+            context_dict['website'] = merchant_instance.website
             if order_instance.status=='order_processing':
                 context_dict['order_processing'] = 'True'
                 context_dict['pre_production'] = 'False'
@@ -156,7 +161,6 @@ def fulfillment(request):
                 context_dict['in_production'] = 'True'
                 context_dict['shipped'] = 'True'
                 context_dict['delivered'] = 'True'
-            print(context_dict)
             return render(request, 'inventory/fulfillment.html', context_dict)
 
 
@@ -195,6 +199,7 @@ def order(request):
         data['summary'] = i.summary
         data['order_date'] = i.order_date
         data['address'] = i.address
+        data['status'] = i.status
         data['url'] = "/update_status/"+str(i.uid)
         array.append(data)
     context_dict['data'] = array
@@ -361,6 +366,10 @@ def home(request):
         data['price'] = i.price
         data['inventory_on_hand'] = i.inventory_on_hand
         data['url'] = '/home/product/' + str(i.product_id)
+        if i.document:
+            data['digital'] = 'True'
+        else:
+            data['digital'] = 'False'
         array.append(data)
     context_dict['data'] = array
     return render(request, 'inventory/home.html', context_dict)
@@ -371,15 +380,8 @@ def update_stock(request, uid):
     product_instance = Product.objects.get(name=uid)
     product_instance.inventory_on_hand = request.POST.get('stock_updated')
     product_instance.save()
-    product_instance = Product.objects.get(name=uid)
-    context_dict = {}
-    context_dict['name'] = product_instance.name
-    context_dict['description'] = product_instance.description
-    context_dict['price'] = product_instance.price
-    context_dict['inventory_on_hand'] = product_instance.inventory_on_hand
-    url_update_inventory = str('/update_stock/') + product_instance.name
-    context_dict['url_update_inventory'] = url_update_inventory
-    return render(request, 'inventory/product.html', context_dict)
+    base_url = request.build_absolute_uri().rsplit('/', 3)[0]
+    return redirect(base_url+'home/product/'+str(product_instance.product_id))
 
 
 @login_required
@@ -411,19 +413,8 @@ def add_product(request):
     user_instance = User.objects.get(username=current_merchant)
     product_instance.user = user_instance
     product_instance.save()
-    product = Product.objects.filter(user=user_instance)
-    context_dict = {}
-    array = []
-    for i in product:
-        data = {}
-        data['name'] = i.name
-        data['description'] = i.description
-        data['price'] = i.price
-        data['inventory_on_hand'] = i.inventory_on_hand
-        data['url'] = '/home/product/' + str(i.product_id)
-        array.append(data)
-    context_dict['data'] = array
-    return render(request, 'inventory/home.html', context_dict)
+    base_url = request.build_absolute_uri().rsplit('/', 3)[0]
+    return redirect(base_url+'home/')
 
 
 @login_required
@@ -444,8 +435,17 @@ def product(request, uid):
     parameters = "name="+item.name+'&price='+item.price+'&merchant='+merchant
     if item.document:
         context_dict['href'] = base_url+"/payment?"+parameters
+        context_dict['digital'] = 'True'
     else:
         context_dict['href'] = base_url+"/shipment?"+parameters
+        context_dict['digital'] = 'False'
+    user_instance = User.objects.get(username=merchant)
+    order = Order.objects.filter(merchant=user_instance)
+    count = 0
+    for i in order:
+        product = i.product_id.filter(name=item.name)
+        count = count+1
+    context_dict['count'] = count
     return render(request, 'inventory/product.html', context_dict)
 
 
@@ -483,7 +483,6 @@ def digital_inventory(request):
 def signup(request):
     if request.method == 'POST':
         form = SignUpForm(request.POST)
-        details_form = MerchantDetailForm(request.POST)
         if form.is_valid():
             form.save()
             username = form.cleaned_data.get('username')
@@ -491,17 +490,13 @@ def signup(request):
             user = authenticate(username=username, password=raw_password)
             auth_login(request, user)
             instance = get_object_or_404(Merchant, user=user)
-            if details_form.is_valid():
-                instance.address = details_form.cleaned_data.get('address')
-                instance.save()
-            else:
-                print("somethings wrong with the form")
-            # Redirect to a success page.
+            instance.address = form.cleaned_data.get('address')
+            instance.website = form.cleaned_data.get('website')
+            instance.save()
             return redirect('home')
     else:
         form = SignUpForm()
-        details_form = MerchantDetailForm()
-    dictionary = {'form': form, 'details_form': details_form}
+    dictionary = {'form': form}
     return render(request, 'inventory/signup.html', dictionary)
 
 
@@ -521,7 +516,7 @@ def login(request):
             # Redirect to a success page.
             return redirect('home')
         else:
-            error_message = "You are not a registered user please sign up"
+            error_message = "Incorrect username or password"
             form = LoginForm()
             context_dict['form'] = form
             context_dict['error_message'] = error_message
diff --git a/templates/inventory/digital_inventory.html 
b/templates/inventory/digital_inventory.html
index da015a0..9eb462d 100644
--- a/templates/inventory/digital_inventory.html
+++ b/templates/inventory/digital_inventory.html
@@ -129,6 +129,45 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
         #contact .container form .required {
           color:#b43838;}
     </style>
+    <style>
+      .tooltip {
+          position: relative;
+          display: inline-block;
+      }
+
+      .tooltip .tooltiptext {
+          visibility: hidden;
+          width: 300px;
+          background-color: #555;
+          color: #fff;
+          text-align: center;
+          border-radius: 6px;
+          padding: 5px 0;
+          position: absolute;
+          z-index: 1;
+          bottom: 125%;
+          left: 50%;
+          margin-left: -60px;
+          opacity: 0;
+          transition: opacity 0.3s;
+      }
+
+      .tooltip .tooltiptext::after {
+          content: "";
+          position: absolute;
+          top: 100%;
+          left: 50%;
+          margin-left: -5px;
+          border-width: 5px;
+          border-style: solid;
+          border-color: #555 transparent transparent transparent;
+      }
+
+      .tooltip:hover .tooltiptext {
+          visibility: visible;
+          opacity: 1;
+      }
+    </style>
 </head>
 <body>
 
@@ -149,7 +188,18 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
           <form method="post" enctype="multipart/form-data">
           <h1>FOR DIGITAL INVENTORY</h1>
           {% csrf_token %}
-          {{ form.as_p }}
+          <!-- {{ form.as_p }} -->
+
+          {% for field in form %}
+                  {% if field.label == 'Price'%}
+                     <label class="tooltip">{{ field.label }}<font 
size="1"><span class="tooltiptext">Enter the price of the product. Remeber to 
write price in English texts. For Example 100 or 99.95</span></font></label>
+                     {{ field }}
+                  {% else %}
+                    <label class="mylabel">{{ field.label }}</label>
+                    {{ field }}
+                  {% endif %}
+          {% endfor %}
+
           <button name="add_product" type="submit" class="submit">Add 
Product</button>
           </form>
       </div>
diff --git a/templates/inventory/fulfillment.html 
b/templates/inventory/fulfillment.html
index 14d9e46..a108d58 100644
--- a/templates/inventory/fulfillment.html
+++ b/templates/inventory/fulfillment.html
@@ -113,6 +113,8 @@ Thank you for purchasing {{  name }} of price {{  price }}. 
The Product was succ
            <li class="progtrckr-todo">Delivered</li>
        {% endif %}
 
+       <a href="{{ website }}">Back to homepage</a>
+
 </ol>
 </body>
 </html>
\ No newline at end of file
diff --git a/templates/inventory/home.html b/templates/inventory/home.html
index 14bcd47..a64be0d 100644
--- a/templates/inventory/home.html
+++ b/templates/inventory/home.html
@@ -155,8 +155,13 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
                    <div class="card">
                      <div class="card__content">
                        <div class="card__title"><a href="{{ item.url }}">{{ 
item.name }}</a></div>
+                       {% if  item.digital == 'True' %}
+                               <p class="card__text">Digital Inventory</p>
+                       {% endif %}
                        <p class="card__text">{{ item.description }}</p><br>
-                       <p class="card__text"><b>Inventory on hand: </b>{{ 
item.inventory_on_hand }}</p>
+                       {% if  item.digital == 'False' %}
+                               <p class="card__text"><b>Inventory on hand: 
</b>{{ item.inventory_on_hand }}</p>
+                       {% endif %}
                        <!-- <button class="btn btnblock 
card__btn">Button</button> -->
                      </div>
                    </div>
@@ -165,7 +170,7 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
        </ul>
 
 
-       <center><a href="/new_product">ADD PRODUCT</a></center></br>
+       <center><a id='add_new_product' href="/new_product">ADD 
PRODUCT</a></center></br>
        <center><a href="/digital_inventory">ADD DIGITAL INVENTORY</a></center>
 
 </div>
diff --git a/templates/inventory/login.html b/templates/inventory/login.html
index ac447ea..e7e6120 100644
--- a/templates/inventory/login.html
+++ b/templates/inventory/login.html
@@ -138,6 +138,8 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
 </div>
 
 <div class="main">
+
+
     <center>
         <h1>LOGIN</h1>
     </center>
@@ -147,11 +149,58 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
           <form method="post" enctype="multipart/form-data">
           {% csrf_token %}
           {{ form.as_p }}
+          {{ details_form.as_p }}
+          <center><p style="color:red; 
font-size:70%;">{{error_message}}</p></center>
+          <div>
           <button name="add_product" type="submit" 
class="submit">LOGIN</button>
           </form>
       </div>
     </section>
-</div>
+
+<!-- <div>
+  <div>
+    <div>
+      <p>Login</p>
+    </div>
+    
+    <form method="post">
+      {% csrf_token %}
+   
+      <fieldset>
+        {% for field in form %}
+        <div>
+          <p>
+        {{ field.label_tag }}<br>
+        {{ field }}
+        {% if field.help_text %}
+          <small style="color: grey">{{ field.help_text }}</small>
+        {% endif %}
+        </div>
+        
+        {% endfor %}
+        
+      </fieldset>
+      <fieldset>
+        {{error_message}}
+        <button type="submit">Log in</button>
+        <div>
+      <div>
+        <span>New User?</span>
+        <a href="/signup">Create Account</a>
+      </div>
+      <div>
+        <span>Forget Password?</span>
+        <a href="/password_reset">RESET</a>
+    </div>
+        
+      </fieldset>
+    </form>
+    
+  </div>
+ -->
+
+
+
 </div>
 </body>
 </html>
\ No newline at end of file
diff --git a/templates/inventory/order.html b/templates/inventory/order.html
index 97ae43f..7cf6daf 100644
--- a/templates/inventory/order.html
+++ b/templates/inventory/order.html
@@ -154,6 +154,7 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
               <div class="card__content">
                 <div class="card__title">{{ item.order_id }}</div>
                 <p class="card__text">{{ item.summary }}</p><br>
+                <p class="card__text">Current order status:{{ item.status 
}}</p><br>
                 <p class="card__text">PRODUCT IN THE ORDER</p><br>
                 <ol>
                     {% for i in item.array_product %}
diff --git a/templates/inventory/product.html b/templates/inventory/product.html
index 2081adb..4ac9a20 100644
--- a/templates/inventory/product.html
+++ b/templates/inventory/product.html
@@ -73,6 +73,120 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
           .sidenav a {font-size: 18px;}
         }
     </style>
+    <style type="text/css">
+     .table-fill {
+        background: white;
+        border-radius:3px;
+        border-collapse: collapse;
+        height: 320px;
+        margin: auto;
+        max-width: 600px;
+        padding:5px;
+        width: 100%;
+        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
+        animation: float 5s infinite;
+      }
+       
+      th {
+        color:#D5DDE5;;
+        background:#1b1e24;
+        border-bottom:4px solid #9ea7af;
+        border-right: 1px solid #343a45;
+        font-size:23px;
+        font-weight: 100;
+        padding:24px;
+        text-align:left;
+        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+        vertical-align:middle;
+      }
+
+      th:first-child {
+        border-top-left-radius:3px;
+      }
+       
+      th:last-child {
+        border-top-right-radius:3px;
+        border-right:none;
+      }
+        
+      tr {
+        border-top: 1px solid #C1C3D1;
+        border-bottom-: 1px solid #C1C3D1;
+        color:#45485a;
+        font-size:16px;
+        font-weight:normal;
+        text-shadow: 0 1px 1px rgba(256, 256, 256, 0.1);
+      }
+       
+      tr:hover td {
+        background:#4E5066;
+        color:#FFFFFF;
+        border-top: 1px solid #22262e;
+      }
+       
+      tr:first-child {
+        border-top:none;
+      }
+
+      tr:last-child {
+        border-bottom:none;
+      }
+       
+      tr:nth-child(odd) td {
+        background:#EBEBEB;
+      }
+       
+      tr:nth-child(odd):hover td {
+        background:#4E5066;
+      }
+
+      tr:last-child td:first-child {
+        border-bottom-left-radius:3px;
+      }
+       
+      tr:last-child td:last-child {
+        border-bottom-right-radius:3px;
+      }
+       
+      td {
+        background:#FFFFFF;
+        padding:20px;
+        text-align:left;
+        vertical-align:middle;
+        font-weight:300;
+        font-size:18px;
+        text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.1);
+        border-right: 1px solid #C1C3D1;
+      }
+
+      td:last-child {
+        border-right: 0px;
+      }
+
+      th.text-left {
+        text-align: left;
+      }
+
+      th.text-center {
+        text-align: center;
+      }
+
+      th.text-right {
+        text-align: right;
+      }
+
+      td.text-left {
+        text-align: left;
+      }
+
+      td.text-center {
+        text-align: center;
+      }
+
+      td.text-right {
+        text-align: right;
+      }
+    </style>
 </head>
 <body>
 
@@ -85,6 +199,9 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
 <div class="main">
     <center>
         <h1 style="text-transform: uppercase;" id="name">{{ name }}</h1>
+        {% if  digital == 'True' %}
+          <h5 color="black">Digital Inventory</h5>
+        {% endif %}
     </center>
 
     <h5 color="black">The code for the pay now button is:</h5>
@@ -97,16 +214,36 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
     <a href="{{ href }}" style="text-decoration: none;" 
onmouseover="this.style.textDecoration = 'underline'" 
onmouseout="this.style.textDecoration = 'none'">buy now</a>
 
 
-    <h5 color="black">Description:</h5><h6>{{ description }}</h6><br>
-    <h5 color="black">Price:</h5><h6>{{ price }}</h6><br>
-    <h5 color="black">The Cuurent Inventory on Hand is:- {{ inventory_on_hand 
}}</h5>
+    <table class="table-fill">
+    <tbody class="table-hover">
+    <tr>
+    <td class="text-left">Description</td>
+    <td class="text-left">{{ description }}</td>
+    </tr>
+    {% if  digital == 'False' %}
+    <tr>
+    <td class="text-left">The Cuurent Inventory on Hand</td>
+    <td class="text-left">{{ inventory_on_hand }}</td>
+    </tr>
+    {% endif %}
+    <tr>
+    <td class="text-left">Price</td>
+    <td class="text-left">{{ price }}</td>
+    </tr>
+    <tr>
+    <td class="text-left">Total number of prducts sold</td>
+    <td class="text-left">{{ count }}</td>
+    </tr>
+    </tbody>
+    </table>
+
+
 
     <form name="update_stock" action="{{ url_update_inventory }}" 
method="post" enctype="multipart/form-data">
         {% csrf_token %}
         <input type="number" name="stock_updated" id="stock_updated" 
placeholder="Update Stock" required>
         <button name="update_stock" type="submit" 
class="submit">Update</button>
     </form>
-
 </div>
 
 </body>
diff --git a/templates/inventory/signup.html b/templates/inventory/signup.html
index 25f2811..098336f 100644
--- a/templates/inventory/signup.html
+++ b/templates/inventory/signup.html
@@ -128,6 +128,13 @@ with the Taler Codeless Merchant.  If not, see 
<https://www.gnu.org/licenses/>.
 
         #contact .container form .required {
           color:#b43838;}
+
+        ul {
+          color:red;
+          font-size:20px;
+          list-style-type: none;
+          margin: 0;
+          padding: 0;}
     </style>
 </head>
 <body>

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



reply via email to

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