Commit e470feb1 authored by Felizia Tiburcio's avatar Felizia Tiburcio

Changes to homepage and profile frontend

parent e634f39e
...@@ -12,11 +12,17 @@ body { ...@@ -12,11 +12,17 @@ body {
color: #3d3838; color: #3d3838;
} }
h1,h2 {
font-weight: bold;
}
.carousel-item img { .carousel-item img {
max-height: 600px; max-height: 600px;
min-width: auto; min-width: auto;
} }
/* nav bar */ /* nav bar */
nav { nav {
background: black; background: black;
...@@ -118,7 +124,7 @@ nav a { ...@@ -118,7 +124,7 @@ nav a {
} }
.about-text {background-color: #f0f0f0; box-shadow:1rem 1rem #333fcd; padding:1rem 2rem;} .about-text {background-color: #f0f0f0; padding:1rem 2rem;}
.about-text p { font-size: 18px; } .about-text p { font-size: 18px; }
#btn-read-more { #btn-read-more {
...@@ -199,7 +205,7 @@ nav a { ...@@ -199,7 +205,7 @@ nav a {
width: 80px; width: 80px;
height: 80px; height: 80px;
border-radius: 100%; border-radius: 100%;
border: 2px dotted black; border: 2px solid black;
shape-outside: circle(50%); shape-outside: circle(50%);
} }
...@@ -236,7 +242,6 @@ nav a { ...@@ -236,7 +242,6 @@ nav a {
.product-info { .product-info {
padding: 8px 16px 8px 0; padding: 8px 16px 8px 0;
border: 2px dotted black;
} }
.form-group.placebid { .form-group.placebid {
...@@ -288,8 +293,7 @@ nav a { ...@@ -288,8 +293,7 @@ nav a {
.store-info { .store-info {
position: absolute; position: absolute;
color: white; color: white;
border: 2px solid black; bottom: 20px;
bottom: 8px;
left: 4rem; left: 4rem;
text-align: left !important; text-align: left !important;
min-width: 50%; min-width: 50%;
...@@ -298,6 +302,10 @@ nav a { ...@@ -298,6 +302,10 @@ nav a {
} }
.store-info a {
color: white;
}
.store-info img { .store-info img {
float: left; float: left;
display: block; display: block;
...@@ -342,8 +350,8 @@ nav a { ...@@ -342,8 +350,8 @@ nav a {
.store-item { .store-item {
background-color: skyblue; background-color: white;
border: 2px dotted black; /* border: 2px dotted black; */
} }
...@@ -371,6 +379,7 @@ nav a { ...@@ -371,6 +379,7 @@ nav a {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 4rem;
} }
/* item detail view / add, edit item */ /* item detail view / add, edit item */
...@@ -394,6 +403,20 @@ nav a { ...@@ -394,6 +403,20 @@ nav a {
margin-bottom: .5rem; margin-bottom: .5rem;
} }
.profile-image.profile-element img {
border-radius: 50%;
height:100px;
}
.profile-btn {
background-color: black;
color:white;
}
.profile-btn a {
color:white;
}
/*===== EDIT PROFILE FORM =====*/ /*===== EDIT PROFILE FORM =====*/
.edit-profile-container { .edit-profile-container {
margin: 0 auto; margin: 0 auto;
...@@ -414,3 +437,4 @@ nav a { ...@@ -414,3 +437,4 @@ nav a {
padding: .3rem; padding: .3rem;
background-color: #F9BD82; background-color: #F9BD82;
} }
...@@ -68,14 +68,14 @@ ...@@ -68,14 +68,14 @@
<!-- latest bids / history --> <!-- latest bids / history -->
<div class="bid-header"> <div class="bid-header">
<h1>Latest Bids </h1> <h1>Latest Bids </h1>
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#placeBidModal" <button type="button" class="btn profile-btn" data-toggle="modal" data-target="#placeBidModal"
data-whatever="@mdo">Place Bid</button> data-whatever="@mdo">Place Bid</button>
</div> </div>
<ul class="cards"> <ul class="cards">
{% if auction_bids %} {% if auction_bids %}
{% for bid in auction_bids %} {% for bid in auction_bids %}
<li><img src="" alt=""> <li><img src="https://minimaltoolkit.com/images/randomdata/female/64.jpg" alt="">
<p>{{bid.userid.username}} offered {{ bid.amount }}</p> <p>{{bid.userid.username}} offered {{ bid.amount }}</p>
<p> &nbsp | &nbsp </p> <p> &nbsp | &nbsp </p>
<p>{{bid.bidtime | timesince}} ago </p> <p>{{bid.bidtime | timesince}} ago </p>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
<body> <body>
<nav id="main"> <nav id="main">
<h1>Hello, {{request.user}}</h1>
<ul> <ul>
<li><a href="/">Home</a></li> <li><a href="/">Home</a></li>
<li><a href="#">About</a></li> <li><a href="#">About</a></li>
......
...@@ -15,32 +15,37 @@ ...@@ -15,32 +15,37 @@
<div class="carousel-inner"> <div class="carousel-inner">
<div class="carousel-item active"> <div class="carousel-item active">
<img class="d-block w-100" <img class="d-block w-100"
src="https://media.istockphoto.com/photos/face-cream-serum-lotion-moisturizer-and-sea-salt-among-bamboo-leaves-picture-id1136422297?k=20&m=1136422297&s=612x612&w=0&h=fk-Du8-BxBYn4rtint_HULFN5FpUWNeaBQye9DoSzpc=" src="https://images.unsplash.com/photo-1588345921523-c2dcdb7f1dcd?ixlib=rb-1.2.1&raw_url=true&q=80&fm=jpg&crop=entropy&cs=tinysrgb&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2070"
alt="First slide"> alt="First slide">
<div class="carousel-content"> <div class="carousel-content">
<h3>— Hello, {{request.user}}. </h3>
<h1>Welcome to Boodle.</h1> <h1>Welcome to Boodle.</h1>
<p>Your ultimate online auctioning platform.</p> <p>Your ultimate online auctioning platform.</p>
<button id="btn-shop-now" onclick="scrollDown()">Shop now</button> <button class="btn profile-btn" onclick="scrollDown()">Shop now</button>
</div> </div>
</div> </div>
<div class="carousel-item"> <div class="carousel-item">
<img class="d-block w-100" <img class="d-block w-100"
src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8&w=1000&q=80" src="https://images.unsplash.com/photo-1570747408017-38b4c5959378?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2069"
alt="Second slide"> alt="Second slide">
<div class="carousel-content"> <div class="carousel-content">
<h1>Slide 2.</h1>
<p>Lorem ipsum</p> <h3>— Hello, {{request.user}}. </h3>
<button onclick="scrollDown()">Shop now</button> <h1>Welcome to Boodle.</h1>
<p>Your ultimate online auctioning platform.</p>
<button class="btn profile-btn" onclick="scrollDown()">Shop now</button>
</div> </div>
</div> </div>
<div class="carousel-item"> <div class="carousel-item">
<img class="d-block w-100" <img class="d-block w-100"
src="https://images.unsplash.com/photo-1507525428034-b723cf961d3e?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxleHBsb3JlLWZlZWR8MXx8fGVufDB8fHx8&w=1000&q=80" src="https://images.unsplash.com/photo-1546387903-6d82d96ccca6?crop=entropy&cs=tinysrgb&fm=jpg&ixlib=rb-1.2.1&q=80&raw_url=true&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=2071"
alt="Third slide"> alt="Third slide">
<div class="carousel-content"> <div class="carousel-content">
<h1>Slide 3.</h1>
<p>Lorem ipsum</p> <h3>— Hello, {{request.user}}. </h3>
<button onclick="scrollDown()">Shop now</button> <h1>Welcome to Boodle.</h1>
<p>Your ultimate online auctioning platform.</p>
<button class="btn profile-btn" onclick="scrollDown()">Shop now</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -59,7 +64,7 @@ ...@@ -59,7 +64,7 @@
<div class="container-fluid about"> <div class="container-fluid about">
<div class="row container-about"> <div class="row container-about">
<div class="col-lg-5 col-md-6 about-left"> <div class="col-lg-5 col-md-6 about-left">
<img src="https://media.istockphoto.com/vectors/mobile-shopping-vector-id1152401093?b=1&k=20&m=1152401093&s=612x612&w=0&h=rE_UnLvBcOmq32s4mX0mZSaidfeGkgLOe5EiI7DbJ4Q="> <img src="https://images.unsplash.com/photo-1454117096348-e4abbeba002c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=870&q=80">
</div> </div>
<div class="col-lg-7 col-md-6 about-right"> <div class="col-lg-7 col-md-6 about-right">
<div class="about-text"> <div class="about-text">
...@@ -108,7 +113,6 @@ ...@@ -108,7 +113,6 @@
{% if auctions_soon %} {% if auctions_soon %}
{% for auction in auctions_soon %} {% for auction in auctions_soon %}
<div class="event"> <div class="event">
<!-- <img src="../static/media/beast.jpg" alt=""> -->
<img src="http://via.placeholder.com/640x360" alt=""> <img src="http://via.placeholder.com/640x360" alt="">
<div class="event-text"> <div class="event-text">
......
...@@ -10,29 +10,29 @@ ...@@ -10,29 +10,29 @@
{% block content %} {% block content %}
<div class="profile-container"> <div class="profile-container">
<div class="username-section displayname profile-element"> <div class="username-section displayname profile-element">
<h2>This is {{ displayname }}'s profile</h2> <!-- <h2>This is {{ displayname }}'s profile</h2> -->
</div> </div>
<div class-"user-img userimage profile-element"> <div class="profile-image profile-element">
<img src="https://minimaltoolkit.com/images/randomdata/female/64.jpg" alt="profile-image"> <img src="https://minimaltoolkit.com/images/randomdata/female/64.jpg" alt="profile-image">
</div> </div>
<div class "username profile-element"> <div class="username profile-element">
<h4> {{ username }} </h4> <h4> {{ username }}'s profile </h4>
</div> </div>
<div class="btn-group profile-element" role="group" aria-label="Basic example"> <div class="btn-group profile-element">
<!--If a user owns a store, they can access the store--> <!--If a user owns a store, they can access the store-->
{% if store %} {% if store %}
<button type="button" class="btn btn-primary"> <button type="button" class="btn profile-btn">
<a href= "{% url 'storeid' store %}" > <a href= "{% url 'storeid' store %}" >
My Store My Store
</a> </a>
</button> </button>
<!--If a user does not own a store, they can create a store--> <!--If a user does not own a store, they can create a store-->
{% else %} {% else %}
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#createStoreModal" <button type="button" class="btn profile-btn" data-toggle="modal" data-target="#createStoreModal"
data-whatever="@mdo">Create Store</button> data-whatever="@mdo">Create Store</button>
{% endif %} {% endif %}
<button type="button" class="btn btn-primary"> <button type="button" class="btn profile-btn">
<a href= "{% url 'editProfile' user %}" > <a href= "{% url 'editProfile' user %}" >
Edit Profile Edit Profile
</a></button> </a></button>
...@@ -40,7 +40,9 @@ ...@@ -40,7 +40,9 @@
</div> </div>
<!--Change auctions_now, auction to like favorites, favorite--> <!--Change auctions_now, auction to like favorites, favorite-->
<h2> Items {{displayname}} bid on </h2> <div class="header-container">
<h2> Current Biddings</h2>
</div>
<div class="event-container"> <div class="event-container">
{% if auctions_of_user %} {% if auctions_of_user %}
{% for id in ids_of_auction %} {% for id in ids_of_auction %}
...@@ -56,7 +58,7 @@ ...@@ -56,7 +58,7 @@
{% endfor %} {% endfor %}
{% else %} {% else %}
<h3> No Favorites.</h3> <h4> {{displayname}} has no current biddings.</h4>
{% endif %} {% endif %}
</div> </div>
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<div class="store-info"> <div class="store-info">
<img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png"> <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_1280.png">
<h1>{{ current_store.storename }}</h1> <h1>{{ current_store.storename }}</h1>
<p>@username</p> <p>@<a href="{% url 'profileid' store_owner.id %}">{{ store_owner.username }}</a> </p>
<!-- EDIT STORE STUFF --> <!-- EDIT STORE STUFF -->
<button class="edit-shop-btn" type="button"> <button class="btn profile-btn" type="button">
<a href="{% url 'editstoreid' current_store.storeid %}">Edit Store Info</a> <a href="{% url 'editstoreid' current_store.storeid %}">Edit Store Info</a>
</button> </button>
</div> </div>
...@@ -46,12 +46,14 @@ ...@@ -46,12 +46,14 @@
<h4 id="item-name">{{ item.itemname }}</h4> <h4 id="item-name">{{ item.itemname }}</h4>
<p id="item-price">₱ {{item.floorprice}} </p> <p id="item-price">₱ {{item.floorprice}} </p>
</div> </div>
<div class="item-btns"> <button>Auction</button> <button><a <div class="btn-group item-btns">
<button class="btn profile-btn"><a
href="{% url 'edititemid' item.itemid %}">Edit</a></button> href="{% url 'edititemid' item.itemid %}">Edit</a></button>
<!-- <button>Delete</button> --> <button type="button" class="btn profile-btn" data-toggle="modal"
<button type="button" class="btn btn-primary" data-toggle="modal"
data-target="#delete_{{ item.itemid }}" data-whatever="@mdo">Delete</button> data-target="#delete_{{ item.itemid }}" data-whatever="@mdo">Delete</button>
</div>
<div class="modal fade" id="delete_{{ item.itemid }}" tabindex="-1" role="dialog" <div class="modal fade" id="delete_{{ item.itemid }}" tabindex="-1" role="dialog"
...@@ -95,15 +97,7 @@ ...@@ -95,15 +97,7 @@
{% else %} {% else %}
<h4 text-align="center"> Your Inventory is empty. </h4> <h4 text-align="center"> Your Inventory is empty. </h4>
{% endif %} {% endif %}
<!-- <div class="store-item">
<img src="https://www.kurin.com/wp-content/uploads/placeholder-square.jpg">
<div class="item-info">
<h4>Itemname</h4>
<p>Itemdescription <span class="item-price">PHP 500</span></p>
</div>
<div class="item-btns"> <button>Auction</button> <button>Edit</button> <button>Delete</button>
</div>
</div> -->
...@@ -113,10 +107,14 @@ ...@@ -113,10 +107,14 @@
</div> </div>
<div class="store-btns-container"> <div class="store-btns-container">
<div class="btn-group">
<button class="btn profile-btn" type="button"><a href="{% url 'startauctionid' current_store.storeid %}">Start Auction</a></button>
<button class="btn profile-btn" type="button"><a href="{% url 'additemid' current_store.storeid %}">Add Item</a></button>
</div>
<button type="button"><a href="{% url 'startauctionid' current_store.storeid %}">Start Auction</a></button>
<button type="button"><a href="{% url 'additemid' current_store.storeid %}">Add Item</a></button>
</div> </div>
</div> </div>
......
# Generated by Django 4.0.3 on 2022-03-12 07:26 # Generated by Django 4.0.3 on 2022-05-18 03:50
from django.db import migrations, models from django.db import migrations, models
...@@ -25,4 +25,167 @@ class Migration(migrations.Migration): ...@@ -25,4 +25,167 @@ class Migration(migrations.Migration):
'managed': False, 'managed': False,
}, },
), ),
migrations.CreateModel(
name='AuctionBid',
fields=[
('bidno', models.AutoField(primary_key=True, serialize=False)),
('amount', models.DecimalField(decimal_places=4, max_digits=15)),
('bidtime', models.DateTimeField(blank=True, null=True)),
],
options={
'db_table': 'auctionbid',
'managed': False,
},
),
migrations.CreateModel(
name='AuthGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150, unique=True)),
],
options={
'db_table': 'auth_group',
'managed': False,
},
),
migrations.CreateModel(
name='AuthGroupPermissions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_group_permissions',
'managed': False,
},
),
migrations.CreateModel(
name='AuthPermission',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('codename', models.CharField(max_length=100)),
],
options={
'db_table': 'auth_permission',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUser',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128)),
('last_login', models.DateTimeField(blank=True, null=True)),
('is_superuser', models.BooleanField()),
('username', models.CharField(max_length=150, unique=True)),
('first_name', models.CharField(max_length=150)),
('last_name', models.CharField(max_length=150)),
('email', models.CharField(max_length=254)),
('is_staff', models.BooleanField()),
('is_active', models.BooleanField()),
('date_joined', models.DateTimeField()),
],
options={
'db_table': 'auth_user',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUserGroups',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_user_groups',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUserUserPermissions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_user_user_permissions',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoAdminLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('action_time', models.DateTimeField()),
('object_id', models.TextField(blank=True, null=True)),
('object_repr', models.CharField(max_length=200)),
('action_flag', models.SmallIntegerField()),
('change_message', models.TextField()),
],
options={
'db_table': 'django_admin_log',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoContentType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app_label', models.CharField(max_length=100)),
('model', models.CharField(max_length=100)),
],
options={
'db_table': 'django_content_type',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoMigrations',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app', models.CharField(max_length=255)),
('name', models.CharField(max_length=255)),
('applied', models.DateTimeField()),
],
options={
'db_table': 'django_migrations',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoSession',
fields=[
('session_key', models.CharField(max_length=40, primary_key=True, serialize=False)),
('session_data', models.TextField()),
('expire_date', models.DateTimeField()),
],
options={
'db_table': 'django_session',
'managed': False,
},
),
migrations.CreateModel(
name='Item',
fields=[
('itemid', models.AutoField(primary_key=True, serialize=False)),
('itemname', models.CharField(max_length=255)),
('itemspecs', models.CharField(max_length=700)),
('floorprice', models.DecimalField(decimal_places=4, max_digits=15)),
('sellprice', models.DecimalField(blank=True, decimal_places=4, max_digits=15, null=True)),
],
options={
'db_table': 'item',
'managed': False,
},
),
migrations.CreateModel(
name='Store',
fields=[
('storeid', models.AutoField(primary_key=True, serialize=False)),
('storename', models.CharField(max_length=255)),
('storedesc', models.CharField(max_length=700)),
],
options={
'db_table': 'store',
'managed': False,
},
),
] ]
# Generated by Django 4.0.3 on 2022-03-26 08:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='AuctionBid',
fields=[
('bidno', models.AutoField(primary_key=True, serialize=False)),
('amount', models.DecimalField(decimal_places=4, max_digits=15)),
('bidtime', models.DateTimeField(blank=True, null=True)),
],
options={
'db_table': 'auctionbid',
'managed': False,
},
),
migrations.CreateModel(
name='AuthGroup',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150, unique=True)),
],
options={
'db_table': 'auth_group',
'managed': False,
},
),
migrations.CreateModel(
name='AuthGroupPermissions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_group_permissions',
'managed': False,
},
),
migrations.CreateModel(
name='AuthPermission',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('codename', models.CharField(max_length=100)),
],
options={
'db_table': 'auth_permission',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUser',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128)),
('last_login', models.DateTimeField(blank=True, null=True)),
('is_superuser', models.BooleanField()),
('username', models.CharField(max_length=150, unique=True)),
('first_name', models.CharField(max_length=150)),
('last_name', models.CharField(max_length=150)),
('email', models.CharField(max_length=254)),
('is_staff', models.BooleanField()),
('is_active', models.BooleanField()),
('date_joined', models.DateTimeField()),
],
options={
'db_table': 'auth_user',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUserGroups',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_user_groups',
'managed': False,
},
),
migrations.CreateModel(
name='AuthUserUserPermissions',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
options={
'db_table': 'auth_user_user_permissions',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoAdminLog',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('action_time', models.DateTimeField()),
('object_id', models.TextField(blank=True, null=True)),
('object_repr', models.CharField(max_length=200)),
('action_flag', models.SmallIntegerField()),
('change_message', models.TextField()),
],
options={
'db_table': 'django_admin_log',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoContentType',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app_label', models.CharField(max_length=100)),
('model', models.CharField(max_length=100)),
],
options={
'db_table': 'django_content_type',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoMigrations',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('app', models.CharField(max_length=255)),
('name', models.CharField(max_length=255)),
('applied', models.DateTimeField()),
],
options={
'db_table': 'django_migrations',
'managed': False,
},
),
migrations.CreateModel(
name='DjangoSession',
fields=[
('session_key', models.CharField(max_length=40, primary_key=True, serialize=False)),
('session_data', models.TextField()),
('expire_date', models.DateTimeField()),
],
options={
'db_table': 'django_session',
'managed': False,
},
),
migrations.CreateModel(
name='Item',
fields=[
('itemid', models.AutoField(primary_key=True, serialize=False)),
('itemname', models.CharField(max_length=255)),
('itemspecs', models.CharField(max_length=700)),
('floorprice', models.DecimalField(decimal_places=4, max_digits=15)),
('sellprice', models.DecimalField(blank=True, decimal_places=4, max_digits=15, null=True)),
],
options={
'db_table': 'item',
'managed': False,
},
),
]
# Generated by Django 4.0.3 on 2022-04-05 08:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auctionbid_authgroup_authgrouppermissions_and_more'),
]
operations = [
migrations.CreateModel(
name='Boodleuser',
fields=[
('userid', models.AutoField(primary_key=True, serialize=False)),
('displayname', models.CharField(max_length=255)),
('pword', models.CharField(max_length=255)),
('username', models.CharField(max_length=255)),
],
options={
'db_table': 'boodleuser',
'managed': False,
},
),
migrations.CreateModel(
name='Store',
fields=[
('storeid', models.AutoField(primary_key=True, serialize=False)),
('storename', models.CharField(max_length=255)),
('storedesc', models.CharField(max_length=700)),
],
options={
'db_table': 'store',
'managed': False,
},
),
migrations.CreateModel(
name='Userfavorites',
fields=[
('favoriteid', models.AutoField(primary_key=True, serialize=False)),
],
options={
'db_table': 'userfavorites',
'managed': False,
},
),
]
# Generated by Django 4.0.3 on 2022-04-19 12:09
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0003_boodleuser_store_userfavorites'),
]
operations = [
migrations.DeleteModel(
name='Userfavorites',
),
]
...@@ -148,6 +148,7 @@ def mystore(request, pk): ...@@ -148,6 +148,7 @@ def mystore(request, pk):
#### Access to store 1 [ edit accordingly when it becomes accessible thru a user ] #### #### Access to store 1 [ edit accordingly when it becomes accessible thru a user ] ####
# pk is storeid # pk is storeid
current_store = Store.objects.get(pk=pk) current_store = Store.objects.get(pk=pk)
store_owner = current_store.userid
store_items = Item.objects.filter(storeid=pk) store_items = Item.objects.filter(storeid=pk)
all_auctions = Auction.objects.all() all_auctions = Auction.objects.all()
...@@ -169,6 +170,7 @@ def mystore(request, pk): ...@@ -169,6 +170,7 @@ def mystore(request, pk):
context = { context = {
'current_store':current_store, 'current_store':current_store,
'store_owner':store_owner,
'store_items':store_items, 'store_items':store_items,
'form':form 'form':form
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment