commit 79376b10e87b57e9e17d67cae0dc9231be3cecee Author: Émile Filteau Date: Thu Jul 9 17:37:26 2015 -0400 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f9606a3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/venv diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..fb15cd1 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +conjure \ No newline at end of file diff --git a/.idea/conjure.iml b/.idea/conjure.iml new file mode 100644 index 0000000..daa011d --- /dev/null +++ b/.idea/conjure.iml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..d821048 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..0fea4f2 --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,15 @@ + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..3b31283 --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..90ab2bb --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..24ebcda --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/scope_settings.xml b/.idea/scopes/scope_settings.xml new file mode 100644 index 0000000..922003b --- /dev/null +++ b/.idea/scopes/scope_settings.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..574e382 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,548 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + 1434740684368 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/blog/__init__.py b/blog/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blog/__init__.pyc b/blog/__init__.pyc new file mode 100644 index 0000000..18b504f Binary files /dev/null and b/blog/__init__.pyc differ diff --git a/blog/admin.py b/blog/admin.py new file mode 100644 index 0000000..705a85c --- /dev/null +++ b/blog/admin.py @@ -0,0 +1,9 @@ +from django.contrib import admin +from blog import models, forms + + +@admin.register(models.Article) +class ArticleAdmin(admin.ModelAdmin): + form = forms.ArticleAdminForm + fields = ['title', 'author', 'text', 'photo'] + list_display = ['title', 'author'] diff --git a/blog/admin.pyc b/blog/admin.pyc new file mode 100644 index 0000000..c38ce7f Binary files /dev/null and b/blog/admin.pyc differ diff --git a/blog/forms.py b/blog/forms.py new file mode 100644 index 0000000..2437079 --- /dev/null +++ b/blog/forms.py @@ -0,0 +1,10 @@ +from django import forms +from ckeditor import widgets +from blog import models + + +class ArticleAdminForm(forms.ModelForm): + text = forms.CharField(widget=widgets.CKEditorWidget()) + class Meta: + model = models.Article + fields = ['title', 'author', 'text', 'photo'] \ No newline at end of file diff --git a/blog/forms.pyc b/blog/forms.pyc new file mode 100644 index 0000000..f98d0fa Binary files /dev/null and b/blog/forms.pyc differ diff --git a/blog/migrations/0001_initial.py b/blog/migrations/0001_initial.py new file mode 100644 index 0000000..892a40b --- /dev/null +++ b/blog/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Article', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('title', models.CharField(max_length=50)), + ('text', models.TextField()), + ('author', models.CharField(max_length=20)), + ('photo', models.ImageField(upload_to=b'article_photos')), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/blog/migrations/0001_initial.pyc b/blog/migrations/0001_initial.pyc new file mode 100644 index 0000000..4860cd2 Binary files /dev/null and b/blog/migrations/0001_initial.pyc differ diff --git a/blog/migrations/__init__.py b/blog/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/blog/migrations/__init__.pyc b/blog/migrations/__init__.pyc new file mode 100644 index 0000000..b560527 Binary files /dev/null and b/blog/migrations/__init__.pyc differ diff --git a/blog/models.py b/blog/models.py new file mode 100644 index 0000000..5b16a64 --- /dev/null +++ b/blog/models.py @@ -0,0 +1,8 @@ +from django.db import models + + +class Article(models.Model): + title = models.CharField(max_length=50) + text = models.TextField() + author = models.CharField(max_length=20) + photo = models.ImageField(upload_to='article_photos') diff --git a/blog/models.pyc b/blog/models.pyc new file mode 100644 index 0000000..b14c267 Binary files /dev/null and b/blog/models.pyc differ diff --git a/blog/tests.py b/blog/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/blog/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/blog/views.py b/blog/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/blog/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here. diff --git a/conjure/__init__.py b/conjure/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/conjure/__init__.pyc b/conjure/__init__.pyc new file mode 100644 index 0000000..b4e7595 Binary files /dev/null and b/conjure/__init__.pyc differ diff --git a/conjure/settings.py b/conjure/settings.py new file mode 100644 index 0000000..5a370d3 --- /dev/null +++ b/conjure/settings.py @@ -0,0 +1,133 @@ +""" +Django settings for conjure project. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.7/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +import os +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'vk(5^-xwwy^z(36&5e2_nd+7-2$e)vz^l-gdahw-m81*hc39x0' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +TEMPLATE_DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'ckeditor', + 'conjure', + 'member', + 'project', + 'blog', +) + +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +) + +ROOT_URLCONF = 'conjure.urls' + +WSGI_APPLICATION = 'conjure.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.7/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + +# Internationalization +# https://docs.djangoproject.com/en/1.7/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +MEDIA_URL = '/medias/' +MEDIA_ROOT = os.path.join(BASE_DIR, 'medias') + +STATIC_URL = '/static/' +STATICFILES_DIRS = ( + os.path.join(BASE_DIR, "static"), +) + +TEMPLATE_DIRS = ( + os.path.join(BASE_DIR, "templates"), +) + +CKEDITOR_UPLOAD_PATH = "uploads/" +CKEDITOR_IMAGE_BACKEND = 'pillow' +CKEDITOR_JQUERY_URL = '//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js' + +CKEDITOR_CONFIGS = { + 'default': { + 'toolbar': [ + ['Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates'], + ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'], + ['Find', 'Replace', '-', 'SelectAll', '-', 'Scayt'], + ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'], + ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ], + ['Link', 'Unlink', 'Anchor'], + ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'], + ['Styles', 'Format', 'Font', 'FontSize'], + ['TextColor', 'BGColor'], + ['Maximize', 'ShowBlocks'] + ], + + }, + 'full': { + 'toolbar': [ + ['Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates'], + ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'], + ['Find', 'Replace', '-', 'SelectAll', '-', 'Scayt'], + ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'], + ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'], + ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote', 'CreateDiv', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock', '-', 'BidiLtr', 'BidiRtl', 'Language' ], + ['Link', 'Unlink', 'Anchor'], + ['Image', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak', 'Iframe'], + ['Styles', 'Format', 'Font', 'FontSize' ], + ['TextColor', 'BGColor'], + ['Maximize', 'ShowBlocks'], + ['-'], + ['About'] + ] + } +} \ No newline at end of file diff --git a/conjure/settings.pyc b/conjure/settings.pyc new file mode 100644 index 0000000..6ca65d8 Binary files /dev/null and b/conjure/settings.pyc differ diff --git a/conjure/urls.py b/conjure/urls.py new file mode 100644 index 0000000..565025e --- /dev/null +++ b/conjure/urls.py @@ -0,0 +1,15 @@ +from django.conf.urls import patterns, include, url +from django.contrib import admin +from conjure import views + + +urlpatterns = patterns('', + # Examples: + # url(r'^$', 'conjure.views.home', name='home'), + # url(r'^blog/', include('blog.urls')), + url(r'^$', views.index, name='index'), + url(r'^membres/', include('member.urls', namespace='member')), + url(r'^projets/', include('project.urls', namespace='project')), + url(r'^admin/', include(admin.site.urls)), + (r'^ckeditor/', include('ckeditor.urls')), +) diff --git a/conjure/urls.pyc b/conjure/urls.pyc new file mode 100644 index 0000000..d729e6d Binary files /dev/null and b/conjure/urls.pyc differ diff --git a/conjure/views.py b/conjure/views.py new file mode 100644 index 0000000..d072275 --- /dev/null +++ b/conjure/views.py @@ -0,0 +1,5 @@ +from django.shortcuts import render + + +def index(request): + return render(request, 'index.html', {}) diff --git a/conjure/views.pyc b/conjure/views.pyc new file mode 100644 index 0000000..4e506cd Binary files /dev/null and b/conjure/views.pyc differ diff --git a/conjure/wsgi.py b/conjure/wsgi.py new file mode 100644 index 0000000..ef48aa5 --- /dev/null +++ b/conjure/wsgi.py @@ -0,0 +1,14 @@ +""" +WSGI config for conjure project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ +""" + +import os +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conjure.settings") + +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() diff --git a/conjure/wsgi.pyc b/conjure/wsgi.pyc new file mode 100644 index 0000000..70db39d Binary files /dev/null and b/conjure/wsgi.pyc differ diff --git a/db.sqlite3 b/db.sqlite3 new file mode 100644 index 0000000..6123374 Binary files /dev/null and b/db.sqlite3 differ diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..199a241 --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conjure.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/medias/members/emile_filteau_tessier.jpg b/medias/members/emile_filteau_tessier.jpg new file mode 100644 index 0000000..5bf8c47 Binary files /dev/null and b/medias/members/emile_filteau_tessier.jpg differ diff --git a/member/__init__.py b/member/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/member/__init__.pyc b/member/__init__.pyc new file mode 100644 index 0000000..0487aad Binary files /dev/null and b/member/__init__.pyc differ diff --git a/member/admin.py b/member/admin.py new file mode 100644 index 0000000..08be2f7 --- /dev/null +++ b/member/admin.py @@ -0,0 +1,7 @@ +from django.contrib import admin +from member import models + +@admin.register(models.Member) +class MemberAdmin(admin.ModelAdmin): + fields = ['first_name', 'last_name', 'email', 'photo'] + list_display = ['first_name', 'last_name'] diff --git a/member/admin.pyc b/member/admin.pyc new file mode 100644 index 0000000..4f09131 Binary files /dev/null and b/member/admin.pyc differ diff --git a/member/migrations/0001_initial.py b/member/migrations/0001_initial.py new file mode 100644 index 0000000..9c93c2e --- /dev/null +++ b/member/migrations/0001_initial.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Member', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('first_name', models.CharField(max_length=20)), + ('last_name', models.CharField(max_length=20)), + ('email', models.CharField(max_length=20)), + ('photo', models.ImageField(upload_to=b'members')), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/member/migrations/0001_initial.pyc b/member/migrations/0001_initial.pyc new file mode 100644 index 0000000..4add949 Binary files /dev/null and b/member/migrations/0001_initial.pyc differ diff --git a/member/migrations/0002_auto_20150616_2213.py b/member/migrations/0002_auto_20150616_2213.py new file mode 100644 index 0000000..a691377 --- /dev/null +++ b/member/migrations/0002_auto_20150616_2213.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('member', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='member', + name='email', + field=models.CharField(max_length=50), + preserve_default=True, + ), + migrations.AlterField( + model_name='member', + name='first_name', + field=models.CharField(max_length=50), + preserve_default=True, + ), + migrations.AlterField( + model_name='member', + name='last_name', + field=models.CharField(max_length=50), + preserve_default=True, + ), + ] diff --git a/member/migrations/0002_auto_20150616_2213.pyc b/member/migrations/0002_auto_20150616_2213.pyc new file mode 100644 index 0000000..16eb0dc Binary files /dev/null and b/member/migrations/0002_auto_20150616_2213.pyc differ diff --git a/member/migrations/__init__.py b/member/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/member/migrations/__init__.pyc b/member/migrations/__init__.pyc new file mode 100644 index 0000000..092f019 Binary files /dev/null and b/member/migrations/__init__.pyc differ diff --git a/member/models.py b/member/models.py new file mode 100644 index 0000000..411c078 --- /dev/null +++ b/member/models.py @@ -0,0 +1,8 @@ +from django.db import models + + +class Member(models.Model): + first_name = models.CharField(max_length=50) + last_name = models.CharField(max_length=50) + email = models.CharField(max_length=50) + photo = models.ImageField(upload_to="members") diff --git a/member/models.pyc b/member/models.pyc new file mode 100644 index 0000000..6bf9e52 Binary files /dev/null and b/member/models.pyc differ diff --git a/member/templates/member/index.html b/member/templates/member/index.html new file mode 100644 index 0000000..53fc7c4 --- /dev/null +++ b/member/templates/member/index.html @@ -0,0 +1,11 @@ +{% extends 'template.html' %} + +{% block content %} + + + +{% endblock %} diff --git a/member/templates/member/show.html b/member/templates/member/show.html new file mode 100644 index 0000000..637d660 --- /dev/null +++ b/member/templates/member/show.html @@ -0,0 +1,7 @@ +{% extends 'template.html' %} + +{% block content %} + +

{{ member.first_name }} {{ member.last_name }}

+ +{% endblock %} diff --git a/member/tests.py b/member/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/member/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/member/urls.py b/member/urls.py new file mode 100644 index 0000000..91e5cd0 --- /dev/null +++ b/member/urls.py @@ -0,0 +1,7 @@ +from django.conf.urls import patterns, include, url +from member import views + +urlpatterns = patterns('', + url(r'^$', views.index, name='index'), + url(r'^(?P\d+)$', views.show, name='show'), +) diff --git a/member/urls.pyc b/member/urls.pyc new file mode 100644 index 0000000..7258ce9 Binary files /dev/null and b/member/urls.pyc differ diff --git a/member/views.py b/member/views.py new file mode 100644 index 0000000..31a12ae --- /dev/null +++ b/member/views.py @@ -0,0 +1,18 @@ +from django.shortcuts import render +from member.models import * + + +def index(request): + #TODO : Order By... + members = Member.objects.all() + + return render(request, 'member/index.html', {'members': members}) + + +def show(request, member_id): + #TODO : Handle ObjectDoesNotExist + member = Member.objects.get(id=member_id) + + return render(request, 'member/show.html', {'member': member}) + + diff --git a/member/views.pyc b/member/views.pyc new file mode 100644 index 0000000..6051052 Binary files /dev/null and b/member/views.pyc differ diff --git a/project/__init__.py b/project/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/__init__.pyc b/project/__init__.pyc new file mode 100644 index 0000000..793cdb2 Binary files /dev/null and b/project/__init__.pyc differ diff --git a/project/admin.py b/project/admin.py new file mode 100644 index 0000000..69000b9 --- /dev/null +++ b/project/admin.py @@ -0,0 +1,9 @@ +from django.contrib import admin +from project import models, forms + + +@admin.register(models.Project) +class ProjectAdmin(admin.ModelAdmin): + form = forms.ProjectAdminForm + fields = ['name', 'description', 'download', 'screenshot', 'members'] + list_display = ['name'] diff --git a/project/admin.pyc b/project/admin.pyc new file mode 100644 index 0000000..33de25c Binary files /dev/null and b/project/admin.pyc differ diff --git a/project/forms.py b/project/forms.py new file mode 100644 index 0000000..6b81328 --- /dev/null +++ b/project/forms.py @@ -0,0 +1,12 @@ +from django import forms +from member import models as member_models + + +class MemberMultipleChoiceField(forms.ModelMultipleChoiceField): + def label_from_instance(self, obj): + return obj.first_name + ' ' + obj.last_name + + + +class ProjectAdminForm(forms.ModelForm): + members = MemberMultipleChoiceField(queryset=member_models.Member.objects.all()) diff --git a/project/forms.pyc b/project/forms.pyc new file mode 100644 index 0000000..a0ae457 Binary files /dev/null and b/project/forms.pyc differ diff --git a/project/migrations/0001_initial.py b/project/migrations/0001_initial.py new file mode 100644 index 0000000..60e2d9c --- /dev/null +++ b/project/migrations/0001_initial.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('member', '0002_auto_20150616_2213'), + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('description', models.TextField()), + ('download', models.FileField(upload_to=b'projects_downloads')), + ('screenshot', models.ImageField(upload_to=b'projects_screenshots')), + ('members', models.ManyToManyField(to='member.Member')), + ], + options={ + }, + bases=(models.Model,), + ), + ] diff --git a/project/migrations/0001_initial.pyc b/project/migrations/0001_initial.pyc new file mode 100644 index 0000000..6131b4e Binary files /dev/null and b/project/migrations/0001_initial.pyc differ diff --git a/project/migrations/__init__.py b/project/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/project/migrations/__init__.pyc b/project/migrations/__init__.pyc new file mode 100644 index 0000000..1697813 Binary files /dev/null and b/project/migrations/__init__.pyc differ diff --git a/project/models.py b/project/models.py new file mode 100644 index 0000000..1537ca9 --- /dev/null +++ b/project/models.py @@ -0,0 +1,9 @@ +from django.db import models +from member.models import * + +class Project(models.Model): + name = models.CharField(max_length=100) + description = models.TextField() + download = models.FileField(upload_to='projects_downloads') + screenshot = models.ImageField(upload_to='projects_screenshots') + members = models.ManyToManyField(Member) diff --git a/project/models.pyc b/project/models.pyc new file mode 100644 index 0000000..462629e Binary files /dev/null and b/project/models.pyc differ diff --git a/project/templates/project/index.html b/project/templates/project/index.html new file mode 100644 index 0000000..890661d --- /dev/null +++ b/project/templates/project/index.html @@ -0,0 +1,11 @@ +{% extends 'template.html' %} + +{% block content %} + + + +{% endblock %} diff --git a/project/templates/project/show.html b/project/templates/project/show.html new file mode 100644 index 0000000..63f7c16 --- /dev/null +++ b/project/templates/project/show.html @@ -0,0 +1,7 @@ +{% extends 'template.html' %} + +{% block content %} + +

{{ project.name }}

+ +{% endblock %} diff --git a/project/tests.py b/project/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/project/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/project/urls.py b/project/urls.py new file mode 100644 index 0000000..a09bf97 --- /dev/null +++ b/project/urls.py @@ -0,0 +1,7 @@ +from django.conf.urls import patterns, include, url +from project import views + +urlpatterns = patterns('', + url(r'^$', views.index, name='index'), + url(r'^(?P\d+)$', views.show, name='show'), +) diff --git a/project/urls.pyc b/project/urls.pyc new file mode 100644 index 0000000..a62f8ee Binary files /dev/null and b/project/urls.pyc differ diff --git a/project/views.py b/project/views.py new file mode 100644 index 0000000..7dee1a2 --- /dev/null +++ b/project/views.py @@ -0,0 +1,14 @@ +from django.shortcuts import render +from project.models import Project + + +def index(request): + projects = Project.objects.all() + + return render(request, 'project/index.html', {'projects': projects}) + + +def show(request, project_id): + project = Project.objects.get(pk=project_id) + + return render(request, 'project/show.html', {'project': project}) diff --git a/project/views.pyc b/project/views.pyc new file mode 100644 index 0000000..524447c Binary files /dev/null and b/project/views.pyc differ diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..8ffc4ad --- /dev/null +++ b/templates/index.html @@ -0,0 +1,7 @@ +{% extends 'template.html' %} + + +{% block content %} +

Conjure

+ +{% endblock %} diff --git a/templates/template.html b/templates/template.html new file mode 100644 index 0000000..22a70d2 --- /dev/null +++ b/templates/template.html @@ -0,0 +1,8 @@ + + + + + + {% block content %}{% endblock %} + +