Skip to content

Commit 80ad738

Browse files
committed
switch to mysql
1 parent 2e16782 commit 80ad738

38 files changed

+303
-85
lines changed

.idea/workspace.xml

Lines changed: 163 additions & 77 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Camera/settings.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,12 @@
7878

7979
DATABASES = {
8080
'default': {
81-
'ENGINE': 'django.db.backends.sqlite3',
82-
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81+
'ENGINE': 'django.db.backends.mysql',#'django.db.backends.sqlite3',
82+
'NAME': 'tedcamera_db',#os.path.join(BASE_DIR, 'db.sqlite3'),
83+
'USE': 'ted',
84+
'PASSWORD': 'zyy',
85+
'HOST': 'localhost',
86+
'PORT': ''
8387
}
8488
}
8589

@@ -102,3 +106,5 @@
102106
# https://docs.djangoproject.com/en/1.8/howto/static-files/
103107

104108
STATIC_URL = '/static/'
109+
110+
#MEDIA_ROOT = '/home/ted/Python/Django/Camera/cam/static/cam/image'

Camera/settings.pyc

95 Bytes
Binary file not shown.

D750_zbzkuUG.jpg

4.74 MB
Loading

cam/admin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class CameraAdim(admin.ModelAdmin):
1111

1212
fieldsets = [
1313
(None, {'fields': ['brand', 'camera_model']}),
14-
('stars', {'fields': ['stars']}),
15-
('comments', {'fields': ['comment'], 'classes': ['collapse']}),
14+
('Info', {'fields': ['stars', 'price', 'comment']}),
15+
#('picture', {'fields': ['camera_picture']}),
1616
]
1717
inlines = [ReviewInline]
1818
list_display = ('brand', 'camera_model', 'comment')

cam/admin.pyc

-44 Bytes
Binary file not shown.

cam/migrations/0006_user.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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', '0005_camera_price'),
11+
]
12+
13+
operations = [
14+
migrations.CreateModel(
15+
name='User',
16+
fields=[
17+
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
18+
('firstName', models.CharField(max_length=20)),
19+
('lastName', models.CharField(max_length=20)),
20+
('email', models.EmailField(max_length=254)),
21+
],
22+
),
23+
]

cam/migrations/0006_user.pyc

1003 Bytes
Binary file not shown.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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', '0006_user'),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name='camera',
16+
name='camera_model',
17+
field=models.CharField(max_length=255, serialize=False, primary_key=True),
18+
),
19+
migrations.AlterField(
20+
model_name='camera',
21+
name='comment',
22+
field=models.CharField(default=b'Nice DLSR Camera', max_length=255),
23+
),
24+
]
950 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)