Skip to content

Commit 75d3321

Browse files
committed
Ted Camera Site
0 parents  commit 75d3321

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+12343
-0
lines changed

.idea/.name

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

.idea/Camera.iml

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

.idea/misc.xml

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

.idea/modules.xml

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

.idea/vcs.xml

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

.idea/workspace.xml

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

5D3.jpg

43.3 KB
Loading

6D.jpg

289 KB
Loading

70D.jpg

251 KB
Loading

A6000.JPG

107 KB
Loading

A7.JPG

107 KB
Loading

A7R.jpg

72.4 KB
Loading

Camera/__init__.py

Whitespace-only changes.

Camera/__init__.pyc

136 Bytes
Binary file not shown.

Camera/settings.py

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
"""
2+
Django settings for Camera project.
3+
4+
Generated by 'django-admin startproject' using Django 1.8.2.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/1.8/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/1.8/ref/settings/
11+
"""
12+
13+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
14+
import os
15+
16+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = 'gx(k_9c$pjandd+_$*^5^2lb%$7n6b)_7fcsv=s@-zl9*!0j_a'
24+
25+
# SECURITY WARNING: don't run with debug turned on in production!
26+
DEBUG = True
27+
28+
ALLOWED_HOSTS = []
29+
30+
31+
# Application definition
32+
33+
INSTALLED_APPS = (
34+
'django.contrib.admin',
35+
'django.contrib.auth',
36+
'django.contrib.contenttypes',
37+
'django.contrib.sessions',
38+
'django.contrib.messages',
39+
'django.contrib.staticfiles',
40+
41+
'cam',
42+
)
43+
44+
MIDDLEWARE_CLASSES = (
45+
'django.contrib.sessions.middleware.SessionMiddleware',
46+
'django.middleware.common.CommonMiddleware',
47+
'django.middleware.csrf.CsrfViewMiddleware',
48+
'django.contrib.auth.middleware.AuthenticationMiddleware',
49+
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
50+
'django.contrib.messages.middleware.MessageMiddleware',
51+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
52+
'django.middleware.security.SecurityMiddleware',
53+
)
54+
55+
ROOT_URLCONF = 'Camera.urls'
56+
57+
TEMPLATES = [
58+
{
59+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
60+
'DIRS': [os.path.join(BASE_DIR, 'templates')],
61+
'APP_DIRS': True,
62+
'OPTIONS': {
63+
'context_processors': [
64+
'django.template.context_processors.debug',
65+
'django.template.context_processors.request',
66+
'django.contrib.auth.context_processors.auth',
67+
'django.contrib.messages.context_processors.messages',
68+
],
69+
},
70+
},
71+
]
72+
73+
WSGI_APPLICATION = 'Camera.wsgi.application'
74+
75+
76+
# Database
77+
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
78+
79+
DATABASES = {
80+
'default': {
81+
'ENGINE': 'django.db.backends.sqlite3',
82+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
83+
}
84+
}
85+
86+
87+
# Internationalization
88+
# https://docs.djangoproject.com/en/1.8/topics/i18n/
89+
90+
LANGUAGE_CODE = 'en-us'
91+
92+
TIME_ZONE = 'UTC'
93+
94+
USE_I18N = True
95+
96+
USE_L10N = True
97+
98+
USE_TZ = True
99+
100+
101+
# Static files (CSS, JavaScript, Images)
102+
# https://docs.djangoproject.com/en/1.8/howto/static-files/
103+
104+
STATIC_URL = '/static/'

Camera/settings.pyc

2.83 KB
Binary file not shown.

Camera/urls.py

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
"""Camera URL Configuration
2+
3+
The `urlpatterns` list routes URLs to views. For more information please see:
4+
https://docs.djangoproject.com/en/1.8/topics/http/urls/
5+
Examples:
6+
Function views
7+
1. Add an import: from my_app import views
8+
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
9+
Class-based views
10+
1. Add an import: from other_app.views import Home
11+
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
12+
Including another URLconf
13+
1. Add an import: from blog import urls as blog_urls
14+
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
15+
"""
16+
from django.conf.urls import include, url
17+
from django.contrib import admin
18+
19+
urlpatterns = [
20+
url(r'^camera/', include('cam.urls', namespace = "camera")),
21+
url(r'^admin/', include(admin.site.urls)),
22+
]

Camera/urls.pyc

1.04 KB
Binary file not shown.

Camera/wsgi.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for Camera project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.wsgi import get_wsgi_application
13+
14+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Camera.settings")
15+
16+
application = get_wsgi_application()

Camera/wsgi.pyc

591 Bytes
Binary file not shown.

D7200.jpg

340 KB
Loading

D750.jpg

4.74 MB
Loading

D810.jpg

1.39 MB
Loading

app.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
application: tedcamera360
2+
version: 1
3+
runtime: python27
4+
api_version: 1
5+
threadsafe: true
6+
7+
handlers:
8+
- url: .*
9+
script: Camera.wsgi.application
10+
11+
libraries:
12+
- name: django
13+
version: latest

app.yaml~

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
application: tedcamera360
2+
version: 1
3+
runtime: python27
4+
api_version: 1
5+
threadsafe: true
6+
7+
handlers:
8+
- url: .*
9+
script: myproject.wsgi.application
10+
11+
libraries:
12+
- name: django
13+
version: latest

cam/__init__.py

Whitespace-only changes.

cam/__init__.pyc

133 Bytes
Binary file not shown.

cam/admin.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.
4+
from .models import Camera
5+
6+
class CameraAdim(admin.ModelAdmin):
7+
fieldsets = [
8+
(None, {'fields': ['brand', 'camera_model']}),
9+
('stars', {'fields': ['stars']}),
10+
('review', {'fields': ['review'], 'classes': ['collapse']}),
11+
12+
]
13+
14+
admin.site.register(Camera, CameraAdim)

cam/admin.pyc

685 Bytes
Binary file not shown.

cam/migrations/0001_initial.py

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
]
11+
12+
operations = [
13+
migrations.CreateModel(
14+
name='Camera',
15+
fields=[
16+
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
17+
('camera_model', models.CharField(max_length=256)),
18+
('brand', models.CharField(max_length=20)),
19+
('camera_picture', models.ImageField(height_field=20, width_field=20, upload_to=b'')),
20+
('stars', models.IntegerField(default=0)),
21+
],
22+
),
23+
migrations.CreateModel(
24+
name='Lens',
25+
fields=[
26+
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
27+
('lens_model', models.CharField(max_length=256)),
28+
('brand', models.CharField(max_length=20)),
29+
('lens_picture', models.ImageField(height_field=10, width_field=10, upload_to=b'')),
30+
('stars', models.IntegerField(default=0)),
31+
('Camera', models.ForeignKey(to='cam.Camera')),
32+
],
33+
),
34+
]

cam/migrations/0001_initial.pyc

1.33 KB
Binary file not shown.
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# -*- coding: utf-8 -*-
2+
from __future__ import unicode_literals
3+
4+
from django.db import models, migrations
5+
6+
7+
class Migration(migrations.Migration):
8+
9+
dependencies = [
10+
('cam', '0001_initial'),
11+
]
12+
13+
operations = [
14+
migrations.RemoveField(
15+
model_name='lens',
16+
name='Camera',
17+
),
18+
migrations.RemoveField(
19+
model_name='camera',
20+
name='id',
21+
),
22+
migrations.AddField(
23+
model_name='camera',
24+
name='review',
25+
field=models.TextField(default=b'no review'),
26+
),
27+
migrations.AlterField(
28+
model_name='camera',
29+
name='camera_model',
30+
field=models.CharField(max_length=256, serialize=False, primary_key=True),
31+
),
32+
migrations.DeleteModel(
33+
name='Lens',
34+
),
35+
]
1.08 KB
Binary file not shown.

cam/migrations/__init__.py

Whitespace-only changes.

cam/migrations/__init__.pyc

144 Bytes
Binary file not shown.

cam/models.py

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
from django.db import models
2+
from django.core.validators import MaxValueValidator, MinValueValidator
3+
# Create your models here.
4+
5+
class Camera(models.Model):
6+
7+
camera_model = models.CharField(max_length=256, primary_key=True)
8+
brand = models.CharField(max_length=20)
9+
10+
camera_picture = models.ImageField()
11+
stars = models.IntegerField(default=0, validators=[MinValueValidator(0),
12+
MaxValueValidator(5)])
13+
14+
#release_date = models.DateField(auto_now=False, auto_now_add=False)
15+
review = models.TextField(default="no review")
16+
17+
18+
def __unicode__(self):
19+
return ': '.join([self.brand, self.camera_model])
20+
21+
# class Lens(models.Model):
22+
#
23+
# Camera = models.ForeignKey(Camera)
24+
#
25+
# lens_model = models.CharField(max_length=256)
26+
# brand = models.CharField(max_length=20)
27+
#
28+
# lens_picture = models.ImageField(height_field=10, width_field=10)
29+
# stars = models.IntegerField(default=0,)
30+
#
31+
# def __unicode__(self):
32+
# return ': '.join([self.brand, self.lens_model])

cam/models.pyc

1.04 KB
Binary file not shown.

0 commit comments

Comments
 (0)