Skip to content

Commit 2e16782

Browse files
committedAug 10, 2015
ted camera
1 parent 0daaf5d commit 2e16782

File tree

8 files changed

+80
-108
lines changed

8 files changed

+80
-108
lines changed
 

‎.idea/workspace.xml

+53-105
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎cam/migrations/0005_camera_price.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
import django.core.validators
6+
7+
8+
class Migration(migrations.Migration):
9+
10+
dependencies = [
11+
('cam', '0004_auto_20150809_1515'),
12+
]
13+
14+
operations = [
15+
migrations.AddField(
16+
model_name='camera',
17+
name='price',
18+
field=models.FloatField(default=0, validators=[django.core.validators.MinValueValidator(0)]),
19+
),
20+
]

‎cam/migrations/0005_camera_price.pyc

928 Bytes
Binary file not shown.

‎cam/models.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
from django.db import models
22
from django.core.validators import MaxValueValidator, MinValueValidator
3-
# Create your models here.
43

4+
5+
# Create your models here.
56
class Camera(models.Model):
67

78
camera_model = models.CharField(max_length=256, primary_key=True)
@@ -10,6 +11,7 @@ class Camera(models.Model):
1011
camera_picture = models.ImageField()
1112
stars = models.IntegerField(default=0, validators=[MinValueValidator(0),
1213
MaxValueValidator(5)])
14+
price = models.FloatField(default=0, validators=[MinValueValidator(0)])
1315

1416
#release_date = models.DateField(auto_now=False, auto_now_add=False)
1517
comment = models.CharField(max_length=500, default='Nice DLSR Camera')

‎cam/models.pyc

60 Bytes
Binary file not shown.

‎cam/templates/cam/about.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ <h2 class="featurette-heading"></h2>
1313
<p class="lead">The skills and tools used in this site include:</p>
1414
<ul>
1515
<li> <b>Front-end:</b> HTML, CSS, Javascript, Jquery, Bootstrap, JSON
16-
<li> <b>Server side:</b> Python, Django, Jinja2, AWS
16+
<li> <b>Server side:</b> Python, Django
1717
<li> <b>Database:</b> SQLite
1818
<li> <b>Test:</b> Unit Test
19-
<li> <b>Other:</b> Eclipse, PyCharm, Linux
19+
<li> <b>IDE:</b> Eclipse, PyCharm
2020
</ul>
2121
<p class="lead"> If you want to know more about Ted, please go to his
2222
<a href="https://github.com/YuanyeZ" >github</a>

‎cam/views.py

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
from django.utils import timezone
66
from .models import Camera, Review
77

8+
# Create handlers.
9+
810
# Create your views here.
911
class HomeView(generic.ListView):
1012
model = Camera

‎db.sqlite3

2 KB
Binary file not shown.

0 commit comments

Comments
 (0)
Please sign in to comment.