Added all templates, fixed medias with dj_static and added requirements.txt

This commit is contained in:
Émile Filteau 2015-07-21 15:52:28 -04:00
parent 289b5cc390
commit 148fa2ae9a
18 changed files with 93 additions and 13 deletions

View File

@ -8,7 +8,8 @@ https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
"""
import os
from dj_static import Cling, MediaCling
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conjure.settings")
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
application = Cling(MediaCling(get_wsgi_application()))

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -20,7 +20,7 @@
</div>
</div>
{% if admin.photo %}
<img src="{{ admin.photo }}" class="avatar" alt="">
<img src="{{ admin.photo.url }}" class="avatar" alt="">
{% else %}
<img src="{% static 'img/profile.png' %}" class="avatar" alt="">
{% endif %}
@ -49,7 +49,7 @@
</div>
</div>
{% if member.photo %}
<img src="{{ member.photo }}" class="avatar" alt="">
<img src="{{ member.photo.url }}" class="avatar" alt="">
{% else %}
<img src="{% static 'img/profile.png' %}" class="avatar" alt="">
{% endif %}

Binary file not shown.

View File

@ -1,11 +1,33 @@
{% extends 'template.html' %}
{% load staticfiles %}
{% block content %}
<ul>
{% for project in projects %}
<li>{{ project.name }}</li>
{% endfor %}
</ul>
<!-- projet Grid Section -->
<section id="projet">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="">Projets</h2>
<hr class="star-light">
</div>
</div>
<div class="row">
{% for project in projects %}
<div class="col-sm-4 list-item">
<a href="{% url 'project:show' project.id %}" class="list-link">
<div class="caption">
<div class="caption-content">
<i class="fa fa-search-plus fa-3x"><h3>{{ project.name }}</h3></i>
</div>
</div>
{% if project.screenshot %}
<img src="{{ project.screenshot.url }}" class="img-responsive" alt="">
{% else %}
<img src="{% static 'img/projet/cabin.png' %}" class="img-responsive" alt="">
{% endif %}
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}

View File

@ -0,0 +1,50 @@
{% extends 'template.html' %}
{% load staticfiles %}
{% block content %}
<div class="projet">
<div class="col-lg-12">
<h1>{{ project.name }}</h1>
{% if project.screenshot %}
<img class="img-responsive" src="{{ project.screenshot.url }}" alt="">
{% else %}
<img class="img-responsive" src="http://placehold.it/1100x400" alt="">
{% endif %}
<div class="caption-full">
<h4>Descripiton du projet:</h4>
<p>{{ project.description }}</p>
<a class="btn btn-large" href="{{ project.download }}">Download</a>
</div>
</div>
</div>
<section id="membre">
<div class="container">
<div class="row">
<div class="col-lg-12 text-center">
<h2 class="">Équipe</h2>
<hr class="star-light">
</div>
</div>
<div class="row">
{% for member in project.members.all %}
<div class="col-sm-4 list-item">
<a href="{% url 'member:show' member.id %}" class="list-link" >
<div class="caption">
<div class="caption-content">
<i class="fa fa-search-plus fa-3x"><h3>{{ member.first_name }} {{ member.last_name }}</h3></i>
</div>
</div>
{% if member.photo %}
<img src="{{ member.photo.url }}" class="avatar" alt="">
{% else %}
<img src="{% static 'img/profile.png' %}" class="avatar" alt="">
{% endif %}
</a>
</div>
{% endfor %}
</div>
</div>
</section>
{% endblock %}

View File

@ -11,4 +11,4 @@ def index(request):
def show(request, project_id):
project = Project.objects.get(pk=project_id)
return render(request, 'project/show.html', {'project': project})
return render(request, 'project/projet.html', {'project': project})

Binary file not shown.

7
requirements.txt Normal file
View File

@ -0,0 +1,7 @@
Django==1.8.2
Pillow==2.8.2
argparse==1.2.1
dj-static==0.0.6
django-ckeditor==4.4.8
static3==0.6.1
wsgiref==0.1.2

View File

@ -105,4 +105,4 @@ footer {
margin: 0 0 30px;
}
}
}
}