diff --git a/leboncoin/Media/IMG_1042.JPG b/leboncoin/Media/IMG_1042.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..62446b4c91affa0246d224f838386f369e054b1b
Binary files /dev/null and b/leboncoin/Media/IMG_1042.JPG differ
diff --git a/leboncoin/Media/IMG_1042_i2zdA7u.JPG b/leboncoin/Media/IMG_1042_i2zdA7u.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..62446b4c91affa0246d224f838386f369e054b1b
Binary files /dev/null and b/leboncoin/Media/IMG_1042_i2zdA7u.JPG differ
diff --git a/leboncoin/Media/IMG_3032.JPG b/leboncoin/Media/IMG_3032.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..7f759f4c9703808fd9e3385f20518a74a45d80d9
Binary files /dev/null and b/leboncoin/Media/IMG_3032.JPG differ
diff --git a/leboncoin/Media/IMG_3051.JPG b/leboncoin/Media/IMG_3051.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..ccc0f1bb3f9fb1384204e53c0597a7e92956fef4
Binary files /dev/null and b/leboncoin/Media/IMG_3051.JPG differ
diff --git a/leboncoin/Media/IMG_3051_ehbl1TI.JPG b/leboncoin/Media/IMG_3051_ehbl1TI.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..ccc0f1bb3f9fb1384204e53c0597a7e92956fef4
Binary files /dev/null and b/leboncoin/Media/IMG_3051_ehbl1TI.JPG differ
diff --git a/leboncoin/Media/IMG_3053.JPG b/leboncoin/Media/IMG_3053.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..22ab3f89138467fbe263979c7b1b37926ec87c0d
Binary files /dev/null and b/leboncoin/Media/IMG_3053.JPG differ
diff --git a/leboncoin/Media/IMG_3053_aWLYirM.JPG b/leboncoin/Media/IMG_3053_aWLYirM.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..22ab3f89138467fbe263979c7b1b37926ec87c0d
Binary files /dev/null and b/leboncoin/Media/IMG_3053_aWLYirM.JPG differ
diff --git a/leboncoin/Media/Media/aa.jpeg b/leboncoin/Media/Media/aa.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..82464322e0707bcc6cd1164d1daa25464d91789b
Binary files /dev/null and b/leboncoin/Media/Media/aa.jpeg differ
diff --git a/leboncoin/Media/Media/fiat.jpg b/leboncoin/Media/Media/fiat.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8e7100d8240d84e35a8b0579cc90c7e1c5bbfa43
Binary files /dev/null and b/leboncoin/Media/Media/fiat.jpg differ
diff --git a/leboncoin/Media/None/no-img.jpg b/leboncoin/Media/None/no-img.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..82464322e0707bcc6cd1164d1daa25464d91789b
Binary files /dev/null and b/leboncoin/Media/None/no-img.jpg differ
diff --git a/leboncoin/Media/aa.jpeg b/leboncoin/Media/aa.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..82464322e0707bcc6cd1164d1daa25464d91789b
Binary files /dev/null and b/leboncoin/Media/aa.jpeg differ
diff --git a/leboncoin/Media/aa_eHKzA1O.jpeg b/leboncoin/Media/aa_eHKzA1O.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..82464322e0707bcc6cd1164d1daa25464d91789b
Binary files /dev/null and b/leboncoin/Media/aa_eHKzA1O.jpeg differ
diff --git a/leboncoin/Media/pics/no-img.jpg b/leboncoin/Media/pics/no-img.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..82464322e0707bcc6cd1164d1daa25464d91789b
Binary files /dev/null and b/leboncoin/Media/pics/no-img.jpg differ
diff --git a/leboncoin/Media/pvt-japon-1900x800.jpeg b/leboncoin/Media/pvt-japon-1900x800.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..7a42c8423553807d632f5b8f1d3e3dff167deb12
Binary files /dev/null and b/leboncoin/Media/pvt-japon-1900x800.jpeg differ
diff --git a/leboncoin/Media/th.jpeg b/leboncoin/Media/th.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/Media/th.jpeg differ
diff --git a/leboncoin/Media/th_lA8KFFd.jpeg b/leboncoin/Media/th_lA8KFFd.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/Media/th_lA8KFFd.jpeg differ
diff --git a/leboncoin/Pipfile b/leboncoin/Pipfile
new file mode 100644
index 0000000000000000000000000000000000000000..5d44a4887caa7c0ca54cb0242a4ca1559d05ef23
--- /dev/null
+++ b/leboncoin/Pipfile
@@ -0,0 +1,11 @@
+[[source]]
+url = "https://pypi.python.org/simple"
+verify_ssl = true
+name = "pypi"
+
+[packages]
+
+[dev-packages]
+
+[requires]
+python_version = "3.8"
diff --git a/leboncoin/db.sqlite3 b/leboncoin/db.sqlite3
index 1191048e81c3e749ed94545290f7fb050e8faae1..ef780bd839da4eb22fd3eb1aa16669ef337c2107 100644
Binary files a/leboncoin/db.sqlite3 and b/leboncoin/db.sqlite3 differ
diff --git a/leboncoin/index/__pycache__/__init__.cpython-38.pyc b/leboncoin/index/__pycache__/__init__.cpython-38.pyc
index e597200bdf5c81198fd815c47fabb05c7cbfad16..db6c9ebb6d0b38c41c018ce3929a937f42f1849c 100644
Binary files a/leboncoin/index/__pycache__/__init__.cpython-38.pyc and b/leboncoin/index/__pycache__/__init__.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/admin.cpython-38.pyc b/leboncoin/index/__pycache__/admin.cpython-38.pyc
index 7499f8f36e18813cdca3d641931b9461cc341f19..9f6c63d2594b65c255feadca778f145bf3b0f3a1 100644
Binary files a/leboncoin/index/__pycache__/admin.cpython-38.pyc and b/leboncoin/index/__pycache__/admin.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/forms.cpython-38.pyc b/leboncoin/index/__pycache__/forms.cpython-38.pyc
index fc53fd61ed6a331f9916213d2971b8534a400d36..4d4276fe8b77515b06901d468804e75a2e9104e5 100644
Binary files a/leboncoin/index/__pycache__/forms.cpython-38.pyc and b/leboncoin/index/__pycache__/forms.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/models.cpython-38.pyc b/leboncoin/index/__pycache__/models.cpython-38.pyc
index 095d91b80f51b831391e4117ccbd8b9b0dc5edd4..20486e07811abea355263d8aec909d6199ebd680 100644
Binary files a/leboncoin/index/__pycache__/models.cpython-38.pyc and b/leboncoin/index/__pycache__/models.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/processors.cpython-38.pyc b/leboncoin/index/__pycache__/processors.cpython-38.pyc
index dc40cfd6505c609d8354323030e554c587a38c13..15dccd7f91d14890e61c4cc524f7277968e2f121 100644
Binary files a/leboncoin/index/__pycache__/processors.cpython-38.pyc and b/leboncoin/index/__pycache__/processors.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/urls.cpython-38.pyc b/leboncoin/index/__pycache__/urls.cpython-38.pyc
index c86aa799e7460797996bb3a09f4ad15092b9f27c..597bdfdac02eb79310ac8d269e073df1e3382f25 100644
Binary files a/leboncoin/index/__pycache__/urls.cpython-38.pyc and b/leboncoin/index/__pycache__/urls.cpython-38.pyc differ
diff --git a/leboncoin/index/__pycache__/views.cpython-38.pyc b/leboncoin/index/__pycache__/views.cpython-38.pyc
index bfec2847d4bc402681810402dadaf482928d3736..3c02267acc6c213b41e4dcd345f163836f73ec16 100644
Binary files a/leboncoin/index/__pycache__/views.cpython-38.pyc and b/leboncoin/index/__pycache__/views.cpython-38.pyc differ
diff --git a/leboncoin/index/admin.py b/leboncoin/index/admin.py
index 0606d035689c2f087e2561b700c4816427a309f8..b409fa792aa75fb2dbe7093e688acaccfc8fc409 100644
--- a/leboncoin/index/admin.py
+++ b/leboncoin/index/admin.py
@@ -5,4 +5,3 @@ admin.site.register(Advert)
 admin.site.register(Category)
 admin.site.register(Comment)
 admin.site.register(Message)
- 
\ No newline at end of file
diff --git a/leboncoin/index/forms.py b/leboncoin/index/forms.py
index bbe942254ff06de5abe6252e7220683ca468df45..da18ef3eb371327422b44e645bf9302edc53be4e 100644
--- a/leboncoin/index/forms.py
+++ b/leboncoin/index/forms.py
@@ -1,9 +1,17 @@
 from django import forms
-from .models import Advert, Comment, Message
-
+from .models import Advert, Comment, Message,Profile
+from django.contrib.auth.forms import UserCreationForm
+from django.contrib.auth.models import User
 from crispy_forms.helper import FormHelper
 from crispy_forms.layout import Submit
 
+from django.core.files.images import get_image_dimensions
+
+from . import models
+
+class WrapperClearableinput(forms.widgets.ClearableFileInput):
+    template_name = "forms/widgets/clearable_image_input.html"
+
 class AdvertForm(forms.ModelForm):
     class Meta:
         model = Advert
@@ -18,4 +26,36 @@ class MessageForm(forms.ModelForm):
     body = forms.CharField(widget=forms.Textarea)
     class Meta:
         model = Message
-        exclude = ['user', 'date', 'time', 'seen']
\ No newline at end of file
+        exclude = ['user', 'date', 'time', 'seen']
+
+
+class ProfileForm(forms.ModelForm):
+    class Meta:
+        model = Profile
+        exclude = ['user', 'email']
+
+
+class ProfileUpdateForm(forms.ModelForm):
+    prefix = "profile"
+    def clean_phone(self):
+        phone = self.cleaned_data["phone"]
+        if phone is not None:
+            phone = phone.replace(" ", "").replace("-", "")
+        if phone and (len(phone) != 10 or not phone.isdecimal()):
+            raise forms.ValidationError("Mauvais numéro de téléphone")
+        return phone
+
+    class Meta():
+        model = Profile
+        fields = [
+            'first_name', 
+            'last_name', 
+            'email'
+            ]
+
+        labels = {
+            'first_name' : 'Prénom',
+            'last_name' : 'Nom de famille',
+
+        }
+
diff --git a/leboncoin/index/migrations/0001_initial.py b/leboncoin/index/migrations/0001_initial.py
index 5bf78a9cb31481c377cb2e1ae001ad3538f0c3cb..fc4f3e34bef9e71f6eb7ae76ef0f5df1cb386526 100644
--- a/leboncoin/index/migrations/0001_initial.py
+++ b/leboncoin/index/migrations/0001_initial.py
@@ -1,25 +1,85 @@
-# Generated by Django 3.1.3 on 2020-11-03 13:02
-
-from django.db import migrations, models
-
-
-class Migration(migrations.Migration):
-
-    initial = True
-
-    dependencies = [
-    ]
-
-    operations = [
-        migrations.CreateModel(
-            name='Advert',
-            fields=[
-                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
-                ('title', models.CharField(max_length=20)),
-                ('body', models.CharField(max_length=50)),
-                ('expiration_date', models.DateField()),
-                ('publication_date', models.DateField()),
-                ('category', models.CharField(max_length=30)),
-            ],
-        ),
-    ]
+# Generated by Django 3.1.4 on 2020-12-14 18:21
+
+from django.conf import settings
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    initial = True
+
+    dependencies = [
+        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+    ]
+
+    operations = [
+        migrations.CreateModel(
+            name='Advert',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('title', models.CharField(max_length=80, null=True)),
+                ('body', models.TextField()),
+                ('publication_date', models.DateField(auto_now_add=True)),
+                ('expiration_date', models.DateField()),
+                ('add_pic', models.ImageField(default='Media/None/no-img.jpg', upload_to='Media/')),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Category',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('name', models.CharField(max_length=30, null=True)),
+            ],
+            options={
+                'verbose_name_plural': 'Categories',
+            },
+        ),
+        migrations.CreateModel(
+            name='Profile',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('nickname', models.CharField(blank=True, max_length=255, null=True)),
+                ('first_name', models.CharField(blank=True, max_length=255, null=True)),
+                ('last_name', models.CharField(blank=True, max_length=255, null=True)),
+                ('email', models.CharField(blank=True, max_length=255, null=True)),
+                ('n_chambre', models.CharField(blank=True, max_length=3, null=True)),
+                ('phone', models.CharField(blank=True, max_length=10, null=True)),
+                ('picture', models.ImageField(default='fiat.jpg', upload_to='static/pics/')),
+                ('semester', models.CharField(blank=True, choices=[(None, 'Aucun'), ('S1', 'Semestre 1'), ('S2', 'Semestre 2'), ('S3', 'Semestre 3'), ('S4', 'Semestre 4'), ('S5', 'Semestre 5'), ('S6', 'Semestre 6'), ('S7', 'Semestre 7'), ('S8', 'Semestre 8'), ('S9', 'Semestre 9'), ('S10', 'Semestre 10')], max_length=3, null=True)),
+                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Message',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('date', models.DateField(auto_now_add=True)),
+                ('time', models.TimeField(auto_now_add=True)),
+                ('body', models.CharField(max_length=200, null=True)),
+                ('seen', models.BooleanField(default=False)),
+                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='message_user', to=settings.AUTH_USER_MODEL)),
+            ],
+        ),
+        migrations.CreateModel(
+            name='Comment',
+            fields=[
+                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
+                ('date', models.DateField(auto_now_add=True, null=True)),
+                ('time', models.TimeField(auto_now_add=True, null=True)),
+                ('body', models.CharField(max_length=400, null=True)),
+                ('advert', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comment_advert', to='index.advert')),
+                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='comment_user', to=settings.AUTH_USER_MODEL)),
+            ],
+        ),
+        migrations.AddField(
+            model_name='advert',
+            name='category',
+            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='advert_category', to='index.category'),
+        ),
+        migrations.AddField(
+            model_name='advert',
+            name='user',
+            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='advert_user', to=settings.AUTH_USER_MODEL),
+        ),
+    ]
diff --git a/leboncoin/index/migrations/__pycache__/0001_initial.cpython-38.pyc b/leboncoin/index/migrations/__pycache__/0001_initial.cpython-38.pyc
index 0727578e31db2379484ec81300a5ffc264210fb2..3ed49d3c6cf68f398d716d7bc27933518c3fb07a 100644
Binary files a/leboncoin/index/migrations/__pycache__/0001_initial.cpython-38.pyc and b/leboncoin/index/migrations/__pycache__/0001_initial.cpython-38.pyc differ
diff --git a/leboncoin/index/migrations/__pycache__/__init__.cpython-38.pyc b/leboncoin/index/migrations/__pycache__/__init__.cpython-38.pyc
index dfdf64d8e8b1c6a057322f4dc32f9b5b89efd462..b42599f4659122160e95dd3f6a8982ff030228a8 100644
Binary files a/leboncoin/index/migrations/__pycache__/__init__.cpython-38.pyc and b/leboncoin/index/migrations/__pycache__/__init__.cpython-38.pyc differ
diff --git a/leboncoin/index/models.py b/leboncoin/index/models.py
index 40f8b805b637fcb4f316ee13a34e2be75953b0e3..ca877b8c2ff0cabf0a4812992366fedd3f524549 100644
--- a/leboncoin/index/models.py
+++ b/leboncoin/index/models.py
@@ -1,9 +1,19 @@
 from django.db import models
+from typing import List
+from typing import Optional
+from typing import Tuple
 from django.contrib.auth.models import User
+from django.db import models
 from django.urls import reverse
+from django.conf import settings
 # Create your models here.
 
 
+SEMESTERS: List[Tuple[Optional[str], str]] = [
+    (None, "Aucun"),
+]
+SEMESTERS += [("S{}".format(i), "Semestre {}".format(i)) for i in range(1, 11)]
+
 class Category(models.Model):
     name = models.CharField(max_length=30, null=True)
 
@@ -18,7 +28,7 @@ class Comment(models.Model):
     advert = models.ForeignKey('Advert', on_delete=models.CASCADE, related_name="comment_advert", null=True)
     date = models.DateField(auto_now_add=True, null=True)
     time = models.TimeField(auto_now_add=True, null=True)
-    body = models.CharField(max_length=30, null=True)
+    body = models.CharField(max_length=400, null=True)
 
     def __str__(self):
         return f'{self.advert} {self.body}'
@@ -27,18 +37,21 @@ class Comment(models.Model):
 
 class Advert(models.Model):
     user = models.ForeignKey(User, on_delete=models.SET_NULL, related_name="advert_user", null=True)
-    title = models.CharField(max_length=20, null=True)
-    body = models.CharField(max_length=50, null=True)
+    title = models.CharField(max_length=80, null=True)
+    body = models.TextField()
     category = models.ForeignKey(Category, on_delete=models.SET_NULL, related_name="advert_category", null=True)
     publication_date = models.DateField(auto_now_add=True)
     expiration_date = models.DateField()
+    add_pic = models.ImageField(upload_to="Media/", default = 'Media/None/no-img.jpg')
+    #add_pic = models.ImageField(upload_to="pics/", default = 'pics/None/no-img.jpg', blank=True)
 
     def __str__(self):
         return f'{self.title}'
 
     def get_absolute_url(self):
         return reverse('advert', kwargs={'pk':self.id})
-
+    def get_category(self):
+        return str(self.category)
 class Message(models.Model):
     user = models.ForeignKey(User, on_delete=models.SET_NULL, related_name="message_user", null=True)
     date = models.DateField(auto_now_add=True)
@@ -50,4 +63,9 @@ class Message(models.Model):
         return f'({self.date}:{self.time}) {self.user}  : {self.body}'
 
 class Profile(models.Model):
-    user = models.ForeignKey(User, on_delete=models.SET_NULL, related_name="profile", null=True)
+    user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
+    #user = models.ForeignKey(User, on_delete=models.SET_NULL, related_name="profile_user", null=True)
+    first_name = models.CharField(max_length=255, null=True, blank=True)
+    last_name = models.CharField(max_length=255, null=True, blank=True)
+    email = models.CharField(max_length=255, null=True, blank=True)
+  
\ No newline at end of file
diff --git a/leboncoin/index/static/assets/images/alexis.jpg b/leboncoin/index/static/assets/images/alexis.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b68e2dc5081416910f4f3475c81fea42e0ba35c1
Binary files /dev/null and b/leboncoin/index/static/assets/images/alexis.jpg differ
diff --git a/leboncoin/index/static/assets/images/amna.jpg b/leboncoin/index/static/assets/images/amna.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..bd1602476339fb2be78978fd4e91126be53145c7
Binary files /dev/null and b/leboncoin/index/static/assets/images/amna.jpg differ
diff --git a/leboncoin/index/static/assets/images/frame.jpg b/leboncoin/index/static/assets/images/frame.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..b01a169cf4c3eb2ca6077a860162ea0337fdfaf6
Binary files /dev/null and b/leboncoin/index/static/assets/images/frame.jpg differ
diff --git a/leboncoin/index/static/assets/images/julien.jpg b/leboncoin/index/static/assets/images/julien.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..fc399d4871975e45bee7ee9c340194c01ddaa176
Binary files /dev/null and b/leboncoin/index/static/assets/images/julien.jpg differ
diff --git a/leboncoin/index/static/assets/images/thibo.jpg b/leboncoin/index/static/assets/images/thibo.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..97beb4c10b2d1cde0e6df6dd69b4216bae487344
Binary files /dev/null and b/leboncoin/index/static/assets/images/thibo.jpg differ
diff --git a/leboncoin/index/static/pics/no-img.jpg b/leboncoin/index/static/pics/no-img.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9f85b6c10416fb35486575d467112270ed01be39
Binary files /dev/null and b/leboncoin/index/static/pics/no-img.jpg differ
diff --git a/leboncoin/index/templates/base.html b/leboncoin/index/templates/base.html
index 77b623454480c6bfd8e93bda2dca883138ba0a64..356d610b4c93b7b0d64751fef931ddb13a79ec9c 100644
--- a/leboncoin/index/templates/base.html
+++ b/leboncoin/index/templates/base.html
@@ -1,48 +1,187 @@
-<html>
-    <head>
-        {% load static %}
-        <link rel="stylesheet" type="text/css", href="{% static 'css/bootstrap.css' %}">
-    </head>
-    <body>
-        <nav class="navbar navbar-expand-lg navbar-light bg-light">
-            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
-              <span class="navbar-toggler-icon"></span>
-            </button>
-            <div class="collapse navbar-collapse" id="navbarTogglerDemo01">
-              <a class="navbar-brand" href="#">ENIB LeBonCoin</a>
-              {% if user.is_authenticated %}
-              <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
-                <li class="nav-item active">
-                  <a class="nav-link" href="{% url 'home' %}">Home <span class="sr-only">(current)</span></a>
-                </li>
-                {% if user.is_staff %}
-                <li class="nav-item active">
-                  <a class="nav-link" href="{% url 'messages' %}">Messages {% if unseen_messages_count != 0 %} <span class="badge badge-primary"> {{ unseen_messages_count }}  </span> {% endif %}<span class="sr-only">(current)</span></a>
-                </li>
-                {% else %}
-                <li class="nav-item active">
-                  <a class="nav-link" href="{% url 'send_message' %}">Contacter admin <span class="sr-only">(current)</span></a>
-                </li>
-
-                {% endif %}
-              </ul>
-              <form method="POST" action="/search/" class="form-inline my-2 my-lg-0">
-                {% csrf_token %}
-                <input class="form-control mr-sm-2" type="search" name="search" placeholder="Search" aria-label="Search">
-                <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
-              </form>
-              <span style="margin-left: 0.5%;"> Welcome <strong>{{ user.username }}</strong> ! 
-                {% if user.is_staff %}
-                <span class="badge badge-dark">Admin</span>
-                {% endif %}
-                <a href="{% url 'logout' %}">Disconnect</a></span>
-                <a class="nav-link" href="{% url 'profile' %}">Profile</span></a>
-              {% endif %}
-            </div>
-
-            
-          </nav>
-        {% block content %}
-        {% endblock content %}
-    </body>
+{% load static %}
+<!DOCTYPE html>
+
+<html lang="en">
+
+<head>
+	
+	<script src="https://kit.fontawesome.com/ce62641561.js" crossorigin="anonymous"></script>
+	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+    <meta charset="utf-8">
+	<meta name="viewport"    content="width=device-width, initial-scale=1https://www.google.com/.0">
+	<meta name="description" content="">
+	<meta name="author"      content="Sergey Pozhilov (GetTemplate.com)">
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	
+	<title>BoncoinENIB</title>
+
+	<link rel="shortcut icon" href="{% static 'assets/images/fun.png' %}">
+	<!--- icone à changer au dessus -->
+
+	<link rel="stylesheet" media="screen" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
+	<link rel="stylesheet" href="{% static 'assets/css/bootstrap.min.css' %}">
+	<link rel="stylesheet" href="{% static 'assets/css/font-awesome.min.css' %}">
+
+	<!-- Custom styles for our template -->
+	<link rel="stylesheet" href="{% static 'assets/css/bootstrap-theme.css' %}" media="screen" >
+	<link rel="stylesheet" href="{% static 'assets/css/main.css' %}">
+
+	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
+	<!--[if lt IE 9]
+	<script src="{% static 'assets/js/html5shiv.js' %}"></script>
+	<script src="{% static 'assets/js/respond.min.js' %}"></script>
+	[endif]-->
+</head>
+
+<body class="home">
+
+	<!-- Fixed navbar -->
+	<div class="navbar navbar-inverse navbar-fixed-top headroom" >
+		<div class="container">
+			<div class="navbar-header">
+				<!-- Button for smallest screens -->
+				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
+				<a class="navbar-brand" href="{% url 'accueil' %}">BonCoinEnib</a>
+			</div>
+			<div class="navbar-collapse collapse">
+				
+				<ul class="nav navbar-nav pull-right">
+					{% if user.is_authenticated %}
+					<li><a href="{% url 'accueil' %}">Home</a></li>
+					<li><a href="{% url 'add_new' %}">Poster une annonce</a></li>
+					<li><a href="{% url 'adverts' %}">Consulter les annonces</a></li>
+					<li><a href="{% url 'profile' %}">Profil</a></li>
+					<li><a href="{% url 'about' %}">About us</a></li>
+					<!--<li class="dropdown">
+						<a href="#" class="dropdown-toggle" data-toggle="dropdown">More Pages <b class="caret"></b></a>
+
+						<ul class="dropdown-menu">
+							<li><a href="sidebar-left.html">Left Sidebar</a></li>
+							<li class="active"><a href="{% url 'home' %}">Right Sidebar</a></li>
+						</ul>
+					</li>-->
+
+						<li><a class="btn" href="{% url 'logout' %}">Déconnexion</a></li>
+					{% else %}
+						<li><a class="btn" href="{% url 'register' %}">SIGN IN / SIGN UP</a></li>
+					{% endif %}
+
+				</ul>
+
+			</div><!--/.nav-collapse -->
+		</div>
+	</div> 
+	
+	{% block content %}
+	{% endblock content %}
+	<!-- /.navbar -->
+
+	<!-- /container -->	
+	<!-- Social links. @TODO: replace by link/instructions in template -->
+	<section id="social">
+		<div class="container">
+			<div class="wrapper clearfix">
+				<!-- AddThis Button BEGIN -->
+				<div class="addthis_toolbox addthis_default_style">
+				<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
+				<a class="addthis_button_tweet"></a>
+				<a class="addthis_button_linkedin_counter"></a>
+				<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
+				</div>
+				<!-- AddThis Button END -->
+			</div>
+		</div>
+	</section>
+	<!-- /social links -->
+
+
+	<footer id="footer" class="top-space">
+
+		<div class="footer1">
+			<div class="container">
+				<div class="row">
+					
+					<div class="col-md-3 widget">
+						<h3 class="widget-title">Contact</h3>
+						<div class="widget-body">
+						Amna Harkati<br>
+								<a href="mailto:#">a6harkat@enib.fr</a><br>
+								<br>
+								
+							Thibo Perrin<br>
+								<a href="mailto:#">p6perrin@enib.fr</a><br>
+								<br>
+							
+								Julien Parisset <br><a href="mailto:#">j7parisse@enib.fr</a>	 </br>
+			
+						
+						
+						</div>
+					</div>
+
+					<div class="col-md-3 widget">
+						<h3 class="widget-title">Venez voir notre Git ! </h3>
+						<div class="widget-body">
+							<p class="follow-me-icons">
+								<a href="https://git.enib.fr/a6harkat/cpo-labos.git"><i class="fa fa-github fa-2"></i></a><br></br>
+							</p>
+							<p>Alexis Laugier  <br> <a href="mailto:#">a7laugie@enib.fr</a> </br></p>
+						</div>
+					
+					</div>					
+					<div class="col-md-6 widget">
+						<h3 class="widget-title">Text widget</h3>
+						<div class="widget-body">
+							<p>Nous sommes 4 étudiants en s6 qui, dans le cadre de leur projet d'informatique, ont développé ce site. Nous avons utilisé Django et Bootstrap. Ce site est notre premier site internet et notre premier projet d'informatique en groupe. En espérant qu'il vous plaise ! </p>
+								<p>N'hésitez pas à nous contacter !</p>
+						</div>
+					</div>
+
+				</div> <!-- /row of widgets -->
+			</div>
+		</div>
+
+		<div class="footer2">
+			<div class="container">
+				<div class="row">
+					
+					<div class="col-md-6 widget">
+						<div class="widget-body">
+							<p class="simplenav">
+								{% if user.is_authenticated %}
+								<a href="accueil.html">Accueil</a> | 
+								<a href="about.html">About</a> |
+								<a href="adverts.html">Annonces</a> |
+								<a href="contact.html">Contact</a> |
+								<b><a href="{% url 'logout' %}">Déconnexion</a></b>
+								{% else %}
+								<b><a href="signup.html">Connexion</a></b>
+								{% endif %}
+							</p>
+						</div>
+					</div>
+
+					<div class="col-md-6 widget">
+						<div class="widget-body">
+							<p class="text-right">
+								Copyright &copy; 2020 Amna
+							</p>
+						</div>
+					</div>
+
+				</div> <!-- /row of widgets -->
+			</div>
+		</div>
+
+	</footer>	
+		
+
+	<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
+	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
+	<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
+	<script src="{% static 'assets/js/headroom.min.js' %}" ></script>
+	<script src="{% static 'assets/js/jQuery.headroom.min.js' %}"></script>
+	<script src="{% static 'assets/js/template.js' %}"></script>
+</body>
 </html>
+
diff --git a/leboncoin/index/templates/index/about.html b/leboncoin/index/templates/index/about.html
new file mode 100644
index 0000000000000000000000000000000000000000..e7ff376ac64d76395dcd185acdc890367a793397
--- /dev/null
+++ b/leboncoin/index/templates/index/about.html
@@ -0,0 +1,93 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block content %}
+
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="index.html">Home</a></li>
+			<li class="active">About us</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-md-8 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Un projet en Django</h1>
+				</header>
+				<p>Django est un FrameWork python qui offre beaucoup d'avantages : temps de chargement des pages, facilité d'utilisation etc... </p>
+				<p>Il est utilisé par Instagram, Mozilla, National Geographic et la Nasa.</p>
+				<p>Depuis notre premier année à l'ENIB, nous utilisons le python pour nos différents cours scientifiques, c'est un outil très pratique et puissant. Nous avons donc pris l'habitude de l'utiliser. Et c'est donc tout naturellement que nous nous sommes orienté vers lui pour faire notre premier site.</p>
+
+				<h2>LeBonCoinEnib</h2>
+				<p>Nous avons voulu créer ce site pour questionner notre consomation. Acheter d'occasion est un geste de bon sens. Pour ce qui est de l'alimentaire, 33% du gaspillage est au niveau du consomateur. Nous jettons des produits encore propre à la consomation, voir encore sous emballage.</p>
+				<p>Un Français produit environ 354kg de déchets par an. Un chiffre affolant qu'il est possible de faire baisser en achetant de la seconde main. Ainsi, l'objet choisi est recyclé plutôt que jeter à la poubelle. Et cela marche dans l'autre sens. En évitant d'acheter un objet neuf, il y a moins de déchets à traiter.</p>
+
+				<blockquote>Précarité étudiante : près de 20 % des étudiants vivent en dessous du seuil de pauvreté</blockquote>
+				<p>Une situation qui s'est accrue avec la crise sanitaire.</p>
+
+				<h3>Simplicité</h3>
+				<p>Le concept est basique : offrir à l'utilisateur une solution simple,rapide et de proximité pour éviter le gaspillage, la surconsomation et l'isolement des étudiants. Cette idée nous été inspirée par des applications comme Vinted, Leboncoin ou encore Geev qui propose des dons d'bjet et de nourriture.</p>
+				<p></p>
+			</article>
+			<!-- /Article -->
+			
+			<!-- Sidebar -->
+			<style>
+            img{border-radius: 70%;
+            width: 140px;}
+         
+            aside{
+            	border: groove darkgrey 2px;
+
+            }
+            </style>
+			<aside class="col-md-4 sidebar sidebar-right">
+
+				<div class="row widget">
+					<div class="col-xs-12">
+						<h4>Qui somme nous ? </h4>
+						<p>Nous sommes 4 étudiants en s6 qui, dans le cadre de leur projet d'informatique, ont développé ce site. Nous avons utilisé Django et Bootstrap. Ce site est notre premier site internet et notre premier projet d'informatique en groupe. En espérant qu'il vous plaise !</p>
+					</div>
+				</div>
+				<div class="row widget">
+					<div class="col-xs-12">
+						<p class ="widget-title"><h4><img src='{% static "assets/images/amna.jpg" %}' alt=""  />
+
+							Amna Harkati</h4></p>
+					</div>
+				</div>
+				<div class="row widget">
+					<div class="col-xs-12">
+						<p class ="col-md-3 widget"><h4>Thibo Perrin
+
+                            <img src='{% static "assets/images/thibo.jpg" %}' alt=""  /> </h4></p>
+					</div>
+				</div>
+				<div class="row widget">
+					<div class="col-xs-12">
+						<p class ="widget-title"><h4><img src='{% static "assets/images/julien.jpg" %}' alt=""  /> 
+
+						    Julien Parisset</h4></p>
+					</div>
+				</div>
+				<div class="row widget">
+					<div class="col-xs-12">
+						<p class ="col-md-3 widget"><h4>Alexis Laugier
+
+							<img src='{% static "assets/images/alexis.jpg" %}' alt=""  /> </h4></p>
+					</div>
+				</div>
+
+			</aside>
+			<!-- /Sidebar -->
+
+		</div>
+	</div>	<!-- /container -->
+	
+{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/accueil.html b/leboncoin/index/templates/index/accueil.html
index 9e552f06a81559f4dbcfb2c78e851e8061655e71..1bc3a45e5573482628ae6c3672dc6b1132d9ada8 100644
--- a/leboncoin/index/templates/index/accueil.html
+++ b/leboncoin/index/templates/index/accueil.html
@@ -1,67 +1,11 @@
-{% load static %}
-<!DOCTYPE html>
-
-<html lang="en">
-
-<head>
-	
-	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-    <meta charset="utf-8">
-	<meta name="viewport"    content="width=device-width, initial-scale=1https://www.google.com/.0">
-	<meta name="description" content="">
-	<meta name="author"      content="Sergey Pozhilov (GetTemplate.com)">
-	
-	<title>BoncoinENIB</title>
-
-	<link rel="shortcut icon" href="{% static 'assets/images/fun.png' %}">
-	<!--- icone à changer au dessus -->
+{% extends 'base.html' %}
 
-	<link rel="stylesheet" media="screen" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,700">
-	<link rel="stylesheet" href="{% static 'assets/css/bootstrap.min.css' %}">
-	<link rel="stylesheet" href="{% static 'assets/css/font-awesome.min.css' %}">
-
-	<!-- Custom styles for our template -->
-	<link rel="stylesheet" href="{% static 'assets/css/bootstrap-theme.css' %}" media="screen" >
-	<link rel="stylesheet" href="{% static 'assets/css/main.css' %}">
-
-	<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
-	<!--[if lt IE 9]
-	<script src="{% static 'assets/js/html5shiv.js' %}"></script>
-	<script src="{% static 'assets/js/respond.min.js' %}"></script>
-	[endif]-->
-</head>
-
-<body class="home">
+{% load static %}
 
-	<!-- Fixed navbar -->
-	<div class="navbar navbar-inverse navbar-fixed-top headroom" >
-		<div class="container">
-			<div class="navbar-header">
-				<!-- Button for smallest screens -->
-				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
-				<a class="navbar-brand" href="accueil">BonCoinEnib</a>
-			</div>
-			<div class="navbar-collapse collapse">
 
-				<ul class="nav navbar-nav pull-right">
-					<li class="active"><a href="#">Home</a></li>
-					<li><a href="{% url 'home' %}">About</a></li>
-					<li class="dropdown">
-						<a href="#" class="dropdown-toggle" data-toggle="dropdown">More Pages <b class="caret"></b></a>
 
-						<ul class="dropdown-menu">
-							<li><a href="sidebar-left.html">Left Sidebar</a></li>
-							<li class="active"><a href="{% url 'home' %}">Right Sidebar</a></li>
-						</ul>
-					</li>
-					<li><a href="{% url 'home' %}">Contact</a></li>
-					<li><a class="btn" href="{% url 'login' %}">SIGN IN / SIGN UP</a></li>
-				</ul>
+{% block content %}
 
-			</div><!--/.nav-collapse -->
-		</div>
-	</div> 
-	<!-- /.navbar -->
 
 	<!-- Header -->
 	<header id="head">
@@ -69,7 +13,11 @@
 			<div class="row">
 				<h1 class="lead">BonCoinENIB</h1>
 				<div> <p class="tagline">Le site qui rassemble tous les services entre étudiants de l'ENIB !</p>
-				<p><a class="btn btn-default btn-lg" role="button">Se connecter</a> </p>
+				{% if user.is_authenticated %}
+				<p><a class="btn btn-default btn-lg" href="{% url 'adverts' %}" role="button">Consulter les annonces</a> </p>
+				{% else %}
+				<p><a class="btn btn-default btn-lg" href="{% url 'login' %}" role="button">Se connecter</a> </p>
+				{% endif %}
 				</div>	
 			</div>
 		</div>
@@ -94,27 +42,30 @@
 			
 			<div class="row">
 				<div class="col-md-3 col-sm-6 highlight">
-					<div class="h-caption"><h4><i class="fa fa-cutlery"></i>Bootstrap-powered</h4></div>
+					<div class="h-caption"><h4><i class="fa fa-hands-helping" aria-hidden="true"></i>Services</h4></div>
 					<div class="h-body text-center">
-						<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Atque aliquid adipisci aspernatur. Soluta quisquam dignissimos earum quasi voluptate. Amet, dignissimos, tenetur vitae dolor quam iusto assumenda hic reprehenderit?</p>
+						<p>Si il te manque du lait pour tes crêpes, ou si tu as besoin d'un coup de main pour monter un meuble ou même pour les cours, ici tu peux proposer tes services et recevoir de l'aide !</p>
 					</div>
 				</div>
+
 				<div class="col-md-3 col-sm-6 highlight">
-					<div class="h-caption"><h4><i class="fa fa-child"></i>Fat-free</h4></div>
+					<div class="h-caption"><h4><i class="fas fa-people-carry" aria-hidden="true"></i>Vente/don d'objets</h4></div>
 					<div class="h-body text-center">
-						<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores, commodi, sequi quis ad fugit omnis cumque a libero error nesciunt molestiae repellat quos perferendis numquam quibusdam rerum repellendus laboriosam reprehenderit! </p>
+						<p>Tu déménages et tu veux te débarasser de quelques affaires ? Tu cherches des bonnes trouvailles ? Tu veux donner une seconde vie à tes vieux vêtements vintage ? Pour toutes ces raisons, et pour la planète, donne, vends et achète d'occasion sur notre site ! </p>
 					</div>
+
 				</div>
 				<div class="col-md-3 col-sm-6 highlight">
-					<div class="h-caption"><h4><i class="fa fa-trash fa-5"></i>Creative Commons</h4></div>
+					<div class="h-caption"><h4><i class="fas fa-car-side fa-5"></i>Covoiturage</h4></div>
 					<div class="h-body text-center">
-						<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem, vitae, perferendis, perspiciatis nobis voluptate quod illum soluta minima ipsam ratione quia numquam eveniet eum reprehenderit dolorem dicta nesciunt corporis?</p>
+						<p>Que ce soit pour du covoiturage quotidien, pour faire tes courses, ou du covoiturage pour de plus longues distances, ici tu peux poster et trouver des annonces. Ça peut être aussi moteur de rencontres !</p>
 					</div>
+
 				</div>
 				<div class="col-md-3 col-sm-6 highlight">
-					<div class="h-caption"><h4><i class="fa fa-smile-o fa-5"></i>Author's support</h4></div>
+					<div class="h-caption"><h4><i class="fas fa-hand-holding-heart fa-5"></i>Quels autres services ?</h4></div>
 					<div class="h-body text-center">
-						<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias, excepturi, maiores, dolorem quasi reprehenderit illo accusamus nulla minima repudiandae quas ducimus reiciendis odio sequi atque temporibus facere corporis eos expedita? </p>
+						<p>Tu veux simplement communiquer un message assez rapidement aux résidents de la résidence ? Proposer des idées ! Tu peux aussi poster des messages et nous envoyer tes requêtes pour de nouvelles catégories ?</p>
 					</div>
 				</div>
 			</div> <!-- /row  -->
@@ -155,110 +106,10 @@
 		</div> <!-- /row -->
 
 		<div class="jumbotron top-space">
-			<h4>Nous sommes un groupes de quatre étudiants : Amna Harkati, Alexis Laugier, Thibo Perrin, Julien Parisset ...</h4>
+			<h4>Nous sommes un groupe de quatre étudiants : Amna Harkati, Alexis Laugier, Thibo Perrin, Julien Parisset ...</h4>
      		<p class="text-right"><a class="btn btn-default btn-lg">En savoir plus »</a></p>
   		</div>
 
 </div>	<!-- /container -->
 	
-	<!-- Social links. @TODO: replace by link/instructions in template -->
-	<section id="social">
-		<div class="container">
-			<div class="wrapper clearfix">
-				<!-- AddThis Button BEGIN -->
-				<div class="addthis_toolbox addthis_default_style">
-				<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
-				<a class="addthis_button_tweet"></a>
-				<a class="addthis_button_linkedin_counter"></a>
-				<a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
-				</div>
-				<!-- AddThis Button END -->
-			</div>
-		</div>
-	</section>
-	<!-- /social links -->
-
-
-	<footer id="footer" class="top-space">
-
-		<div class="footer1">
-			<div class="container">
-				<div class="row">
-					
-					<div class="col-md-3 widget">
-						<h3 class="widget-title">Contact</h3>
-						<div class="widget-body">
-							<p>+234 23 9873237<br>
-								<a href="mailto:#">some.email@somewhere.com</a><br>
-								<br>
-								234 Hidden Pond Road, Ashland City, TN 37015
-							</p>	
-						</div>
-					</div>
-
-					<div class="col-md-3 widget">
-						<h3 class="widget-title">Follow me</h3>
-						<div class="widget-body">
-							<p class="follow-me-icons">
-								<a href=""><i class="fa fa-twitter fa-2"></i></a>
-								<a href=""><i class="fa fa-dribbble fa-2"></i></a>
-								<a href=""><i class="fa fa-github fa-2"></i></a>
-								<a href=""><i class="fa fa-facebook fa-2"></i></a>
-							</p>	
-						</div>
-					</div>
-
-					<div class="col-md-6 widget">
-						<h3 class="widget-title">Text widget</h3>
-						<div class="widget-body">
-							<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi, dolores, quibusdam architecto voluptatem amet fugiat nesciunt placeat provident cumque accusamus itaque voluptate modi quidem dolore optio velit hic iusto vero praesentium repellat commodi ad id expedita cupiditate repellendus possimus unde?</p>
-							<p>Eius consequatur nihil quibusdam! Laborum, rerum, quis, inventore ipsa autem repellat provident assumenda labore soluta minima alias temporibus facere distinctio quas adipisci nam sunt explicabo officia tenetur at ea quos doloribus dolorum voluptate reprehenderit architecto sint libero illo et hic.</p>
-						</div>
-					</div>
-
-				</div> <!-- /row of widgets -->
-			</div>
-		</div>
-
-		<div class="footer2">
-			<div class="container">
-				<div class="row">
-					
-					<div class="col-md-6 widget">
-						<div class="widget-body">
-							<p class="simplenav">
-								<a href="#">Home</a> | 
-								<a href="about.html">About</a> |
-								<a href="sidebar-right.html">Sidebar</a> |
-								<a href="contact.html">Contact</a> |
-								<b><a href="signup.html">Sign up</a></b>
-							</p>
-						</div>
-					</div>
-
-					<div class="col-md-6 widget">
-						<div class="widget-body">
-							<p class="text-right">
-								Copyright &copy; 2020 Amna
-							</p>
-						</div>
-					</div>
-
-				</div> <!-- /row of widgets -->
-			</div>
-		</div>
-
-	</footer>	
-		
-
-
-
-	<!-- JavaScript libs are placed at the end of the document so the pages load faster -->
-	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
-	<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
-	<script src="{% static 'assets/js/headroom.min.js' %}" ></script>
-	<script src="{% static 'assets/js/jQuery.headroom.min.js' %}"></script>
-	<script src="{% static 'assets/js/template.js' %}"></script>
-</body>
-</html>
-
+{% endblock content %}
diff --git a/leboncoin/index/templates/index/add_new.html b/leboncoin/index/templates/index/add_new.html
new file mode 100644
index 0000000000000000000000000000000000000000..dce88e68a7b804609822620edc81f891a3a84922
--- /dev/null
+++ b/leboncoin/index/templates/index/add_new.html
@@ -0,0 +1,52 @@
+{% extends 'base.html' %}
+
+{% load static %}
+
+
+
+{% block content %}
+
+
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="{% url 'accueil' %}">Home</a></li>
+			<li class="active">Poster une annonce</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Une nouvelle annonce</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">Poster une annonce</h3>
+							<p class="text-center text-muted">Poster une nouvelle annonce en complétant les champs ce-dessous ! </p>
+							<hr>
+
+							<div class="top-margin">
+							<form class="top-margin" method="post" enctype="multipart/form-data">
+							    {% csrf_token %}
+							    <div class="form-group">
+							    	{{ form.as_p}}
+							    </div>
+							    <input type="submit" value="Save">
+							</form>
+							</div>
+						</div>
+					</div>
+
+				</div>
+			</article>
+			<!-- /Article -->
+		</div>
+	</div>
+{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/advert.html b/leboncoin/index/templates/index/advert.html
index cf9ef44e75d3cb674b60622ea589cb69fa3742c2..09f6b4a56b4d7db0f1fd392a995c451ac2ab3c74 100644
--- a/leboncoin/index/templates/index/advert.html
+++ b/leboncoin/index/templates/index/advert.html
@@ -1,18 +1,40 @@
 {% extends 'base.html' %}
 
+
+
 {% block content %}
+<header id="head" class="secondary"></header>
+    <div class="container">
+
+        <ol class="breadcrumb">
+            <li><a href="{% url 'home' %}">Home</a></li>
+            <li class="active">Consulter les annonces</li>
+
+        </ol>
+
+        <div class="row">
+            
+            <!-- Article main content -->
+            <article class="col-sm-8 maincontent">
+                <header class="page-header">
+                    <h1 class="card-title">{{ advert.title }}</h1>
+                </header>
+            <div class="card">
+                <div class="card-body">
+                <h5 class="card-title">{{ advert.title }}</h5>
+                <p class="card-text">{{advert.body}}</p>
+                <p class='img'> <img src="{{ advert.add_pic.url }}" height=auto max-width=300px max-height=300px></p>
+                
+            </div>
+            <br>
+            <a href="{% url 'advert_com' pk=advert.id %}" class="btn btn-primary">Ajouter un nouveau commentaire</a>
+            <h1>Comments</h1>
+            {% for comment in comments %}
+                <div>(Le {{comment.date}} {{comment.time}}) {{comment.user.username}} a dit :  {{comment.body}}</div>
+            {% endfor %}
+                
+                
+            </article>
 
-    <div class="card">
-        <div class="card-body">
-        <h5 class="card-title">{{ advert.title }}</h5>
-        <p class="card-text">{{advert.body}}</p>
-        </div>
-    </div>
-    <br>
-    <a href="{% url 'advert_com' pk=advert.id %}" class="btn btn-primary">Ajouter un nouveau commentaire</a>
-    <h1>Comments</h1>
-    {% for comment in comments %}
-        <div>(Le {{comment.date}} {{comment.time}}) {{comment.user.username}} a dit :  {{comment.body}}</div>
-    {% endfor %}
 
 {% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/adverts.html b/leboncoin/index/templates/index/adverts.html
index 2203dfaa2a19c9393218ed8a2d904a18f368abc5..fa45dd58681ebae9a68334396f2f931d6a2c2a33 100644
--- a/leboncoin/index/templates/index/adverts.html
+++ b/leboncoin/index/templates/index/adverts.html
@@ -1,18 +1,84 @@
-{% extends "base.html" %}
+{% extends 'base.html' %}
+
+{% load static %}
+
+
 
 {% block content %}
-<div class="container-md" style="display: inline-block;">
-    
-    {% for advert in adverts %}
-        <div class="card" style="width: 18rem;">
-            <div class="card-body">
-            <h5 class="card-title">{{ advert.title }}</h5>
-            <p class="card-text">{{advert.body}}</p>
-            <p class="card-text">par {{advert.user.username}} le {{advert.publication_date}}</p>
-            <a href="{% url 'advert' pk=advert.id %}" class="btn btn-primary">Voir l'annonce</a>
-            </div>
+
+    <!-- /.navbar -->
+
+    <header id="head" class="secondary"></header>
+
+    <!-- container -->
+    <div class="container">
+
+        <ol class="breadcrumb">
+            <li><a href="{% url 'home' %}">Home</a></li>
+            <li class="active">Consulter les annonces</li>
+
+        </ol>
+
+        <div class="row">
+            
+            <!-- Article main content -->
+            <article class="col-sm-8 maincontent">
+                <header class="page-header">
+                    <h1 class="page-title">Les dernières annonces</h1>
+                </header>
+                {% for advert in adverts %}
+                <!--<div class="card" style="width: 18rem;">-->
+                    <div class="card-body">
+                    <h3 class="card-title">{{ advert.title }}</h3>
+                    <p class="card-text">{{advert.body}}</p>
+                    <p class="card-text">par {{advert.user.username}} le {{advert.publication_date}}</p>
+                    <div class="hover-item mb30">
+                        <img src="{{ advert.add_pic.url }}" class="img-responsive smoothie" alt="[image qui fonctionne]">
+                    <a class="btn btn-default btn-sm" href="{% url 'advert' pk=advert.id %}" >Voir l'annonce</a>
+					</div>
+
+                {% endfor %}
+                
+                
+            </article>
+            <!-- /Article -->
+            
+            <!-- Sidebar -->
+            <aside class="col-sm-4 sidebar sidebar-right">
+                <div class="widget">
+                    {% if count == 0 %}
+                    <h1>No element for {{ searched }}</h1>
+                    {% else %}
+                <!--<h1>Searched advert : {{ searched }} - {{count}} advert found </h1>-->
+
+                    {% endif %} 
+
+                    <form method="POST" action="/search/" class="form-inline my-2 my-lg-0">
+                        {% csrf_token %}
+                        <input class="form-control mr-sm-2" type="search" name="search" placeholder="Search" aria-label="Search">
+                        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">
+                            <i class= "fa fa-search" ></i>
+                        </button>
+                    </form>
+                    <h4>Demandes</h4>
+                    <ul class="list-unstyled list-spaces">
+                        {% for advert in adverts %}
+                            {% if advert.get_category == "Demande" %}
+                            
+                            <li><a href="{% url 'advert' pk=advert.id %}">{{ advert.title }}</a><br><span class="small text-muted">{{advert.body}} posté par {{advert.user.username}} le {{advert.publication_date}}</span></li>
+                    </ul>
+                    {% endif %}
+                    {% endfor %}
+                    </div>
+                        
+                </div>
+
+            </aside>
+            <!-- /Sidebar -->
+
         </div>
-        <br>
-    {% endfor %}
-</div>
+    </div>  <!-- /container -->
+
 {% endblock content %}
+
+
diff --git a/leboncoin/index/templates/index/login.html b/leboncoin/index/templates/index/login.html
index 28bec5eaca8745626358fadbcebe866818f201dc..188f2ab17c51ddf47ecd44c31cf06827cc038a55 100644
--- a/leboncoin/index/templates/index/login.html
+++ b/leboncoin/index/templates/index/login.html
@@ -1,19 +1,67 @@
-{% extends "base.html" %}
+{% extends 'base.html' %}
+
+{% load static %}
+
+
 
 {% block content %}
-<div class="container-md">
-<form method="POST">
-    {% csrf_token %}
-   
-    <div class="form-group">
-      <label for="username">username</label>
-      <input type="text" name="username" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
-    </div>
-    <div class="form-group">
-      <label for="password">password</label>
-      <input type="password" name="password" class="form-control" id="exampleInputPassword1">
-    </div>
-    <button type="submit" class="btn btn-primary">Submit</button>
-  </form>
-</div>
-{% endblock %}
+	<!-- /.navbar -->
+
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="{% url 'accueil' %}">Home</a></li>
+			<li class="active">User access</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Connexion</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">Connectez-vous à votre compte</h3>
+							<p class="text-center text-muted">Si vous n'avez pas un encore un compte, inscrivez-vous ici <a href="{% url 'register' %}">Créer un compte</a> </p>
+							<hr>
+							
+							<form method="POST">
+								{% csrf_token %}
+								<div class="top-margin">
+									<label for="username">Username<span class="text-danger">*</span></label>
+									<input type="text" name="username" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
+								</div>
+								<div class="top-margin">
+									<label for="password">Password <span class="text-danger">*</span></label>
+									<input  type="password" name="password" class="form-control" id="exampleInputPassword1">
+								</div>
+
+								<hr>
+
+								<div class="row">
+									<div class="col-lg-8">
+										<b><a href="">Forgot password?</a></b>
+									</div>
+									<div class="col-lg-4 text-right">
+										<button class="btn btn-action" type="submit">Connexion</button>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+
+				</div>
+				
+			</article>
+			<!-- /Article -->
+
+		</div>
+	</div>	<!-- /container -->
+	{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/messages.html b/leboncoin/index/templates/index/messages.html
index 7423d7b6105dd1ad36a0a7ccdf8b24c8f29281e8..a086cffacb042434649a709d0d6c620e56bbfda6 100644
--- a/leboncoin/index/templates/index/messages.html
+++ b/leboncoin/index/templates/index/messages.html
@@ -1,11 +1,32 @@
 {% extends 'base.html' %}
 
 {% block content %}
+<header id="head" class="secondary"></header>
+    <div class="container">
 
-    {% for message in messages %}
-    <div class="alert alert-light" role="alert">
-        ({{message.date}} : {{message.time}}) {{message.user}} a envoyé : {{ message.body }}
-      </div>
-    {% endfor %}
+        <ol class="breadcrumb">
+            <li><a href="{% url 'home' %}">Home</a></li>
+            <li class="active">Consulter les annonces</li>
+
+        </ol>
+
+        <div class="row">
+            
+            <!-- Article main content -->
+            <article class="col-sm-8 maincontent">
+                <header class="page-header">
+                    <h1 class="card-title">{{ advert.title }}</h1>
+				</header>
+			<div class="card">
+		    {% for message in messages %}
+		    <div class="alert alert-light" role="alert">
+		        ({{message.date}} : {{message.time}}) {{message.user}} a envoyé : {{ message.body }}
+		      </div>
+		  </div>
+		    {% endfor %}
+            </article>
+
+
+        
 
 {% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/profile.html b/leboncoin/index/templates/index/profile.html
index 26394b36a94a252ea368a535e08a336357ecbfca..678e65dfd38358dde8662f4e0216526bc2fc8ef6 100644
--- a/leboncoin/index/templates/index/profile.html
+++ b/leboncoin/index/templates/index/profile.html
@@ -1,9 +1,69 @@
-{% extends "base.html" %}
+{% extends 'base.html' %}
+
+{% load static %}
+
+
 
 {% block content %}
-<div class="container-md">
- <p>
- 	Profile de {{ user.username }}
- </p>
-</div>
+	<!-- /.navbar -->
+
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="{% url 'accueil' %}">Home</a></li>
+			<li class="active">Profil</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Profil</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">informations du profil de {{ user }}</h3>
+							<div class="text-center text-muted"><p></p>
+								
+        					</div>
+								<div class="top-margin">
+								 <strong class="flex expand50">Prenom : </strong><span class="flex">{{ user.first_name }}</span>
+								</div>
+								<div class="top-margin">
+								 <strong class="flex expand50">Nom : </strong><span class="flex">{{ user.last_name }}
+								</span>
+								</div>
+
+								<div class="top-margin">
+									<strong class="flex expand50">Adresse e-mail : </strong><span class="flex"><a href="mailto:{{ user.email }}">{{ user.email }}</a></span>
+								</div>
+								<hr>
+							
+								<div class="row">
+							
+									<div class="col-lg-4 text-right">
+										<ol class="breadcrumb">
+											<li class="activate"><a class="btn btn-default btn-lg" role="button"  href="{% url 'setprofile' %}" >Modifier le profil</a></li>
+
+										</ol>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+
+				</div>
+			</article>
+			<!-- /Article -->
+
+		</div>
+	</div>	<!-- /container -->
+	
+
 {% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/register.html b/leboncoin/index/templates/index/register.html
new file mode 100644
index 0000000000000000000000000000000000000000..01d31ae094b6b60e11826a13bbc2bc426a812001
--- /dev/null
+++ b/leboncoin/index/templates/index/register.html
@@ -0,0 +1,78 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block content %}
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="{% url 'accueil' %}">Home</a></li>
+			<li class="active">Registration</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Registration</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">Register a new account</h3>
+							<p class="text-center text-muted">Si vous avez déjà un compte connectez-vous ici : <a href="{% url 'login' %}">Se connecter</a> Remplissez ces champs ci-dessous pour vous inscrire sinon ! </p>
+							<hr>
+
+							<form method="POST" action="" enctype="multipart/form-data">
+								{% csrf_token %}
+
+								<div class="top-margin">
+									<label>Username <span class="text-danger">*</span> </label>
+									<input type="text" name='username' class="form-control" placeholder="Enter Username" required>
+								</div>
+
+								<div class="top-margin">
+									<label>Email Address <span class="text-danger">*</span></label>
+									<input type="text" class="form-control" name="email" placeholder="Enter Email" required>
+								</div>
+
+								<div class="row top-margin">
+									<div class="col-sm-6">
+										<label>Password <span class="text-danger">*</span></label>
+										<input type="password" class="form-control" name="password" placeholder="Enter Password">
+									</div>
+									<div class="col-sm-6">
+										<label>Confirm Password <span class="text-danger">*</span></label>
+										<input type="password" class="form-control" name="confirmpassword" placeholder="Confirm Password">
+									</div>
+								</div>
+
+								<hr>
+
+								<div class="row">
+									<div class="col-lg-8">
+										<label class="checkbox">
+											<input type="checkbox"> 
+											I've read the <a href="page_terms.html">Terms and Conditions</a>
+										</label>                        
+									</div>
+									<div class="col-lg-4 text-right">
+										<button class="btn btn-action" type="submit">Register</button>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+
+				</div>
+				
+			</article>
+			<!-- /Article -->
+
+		</div>
+	</div>	<!-- /container -->
+{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/setprofile.html b/leboncoin/index/templates/index/setprofile.html
new file mode 100644
index 0000000000000000000000000000000000000000..b97e2c1eff180dff6624580a4df942e9ee1f7d3c
--- /dev/null
+++ b/leboncoin/index/templates/index/setprofile.html
@@ -0,0 +1,56 @@
+{% extends 'base.html' %}
+
+{% load static %}
+
+
+
+{% block content %}
+
+<header id="head" class="secondary"></header>
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="accueil.html">Home</a></li>
+			<li class="active">Modifier le profil</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Modifier le profil</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">Modifier le profil de {{ user.username }}</h3>
+							<hr>
+
+							<div class="top-margin">
+							<form class="top-margin" method="post" enctype="multipart/form-data">
+							    {% csrf_token %}
+							    <div class="form-group">
+							    	{{ form.as_p }}
+							    </div>
+									<div class="col-lg-4 text-right">
+										<button class="btn btn-action" type="submit">Modifier le profil</button>
+									</div>
+							</form>
+							</div>
+		
+								</div>
+							
+						</div>
+					</div>
+
+				
+			</article>
+			<!-- /Article -->
+
+		</div>
+	</div>	<!-- /container -->
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/templates/index/signin.html b/leboncoin/index/templates/index/signin.html
new file mode 100644
index 0000000000000000000000000000000000000000..8a00503b677c4fd68e948456af81b768c8e660a7
--- /dev/null
+++ b/leboncoin/index/templates/index/signin.html
@@ -0,0 +1,70 @@
+{% extends 'base.html' %}
+
+{% load static %}
+
+
+
+{% block content %}
+
+	<!-- /.navbar -->
+
+	<header id="head" class="secondary"></header>
+
+	<!-- container -->
+	<div class="container">
+
+		<ol class="breadcrumb">
+			<li><a href="index.html">Home</a></li>
+			<li class="active">User access</li>
+		</ol>
+
+		<div class="row">
+			
+			<!-- Article main content -->
+			<article class="col-xs-12 maincontent">
+				<header class="page-header">
+					<h1 class="page-title">Sign in</h1>
+				</header>
+				
+				<div class="col-md-6 col-md-offset-3 col-sm-8 col-sm-offset-2">
+					<div class="panel panel-default">
+						<div class="panel-body">
+							<h3 class="thin text-center">Sign in to your account</h3>
+							<p class="text-center text-muted">Lorem ipsum dolor sit amet, <a href="signup.html">Register</a> adipisicing elit. Quo nulla quibusdam cum doloremque incidunt nemo sunt a tenetur omnis odio. </p>
+							<hr>
+							
+							<form>
+								<div class="top-margin">
+									<label>Username/Email <span class="text-danger">*</span></label>
+									<input type="text" class="form-control">
+								</div>
+								<div class="top-margin">
+									<label>Password <span class="text-danger">*</span></label>
+									<input type="password" class="form-control">
+								</div>
+
+								<hr>
+
+								<div class="row">
+									<div class="col-lg-8">
+										<b><a href="">Forgot password?</a></b>
+									</div>
+									<div class="col-lg-4 text-right">
+										<button class="btn btn-action" type="submit">Sign in</button>
+									</div>
+								</div>
+							</form>
+						</div>
+					</div>
+
+				</div>
+				
+			</article>
+			<!-- /Article -->
+
+		</div>
+	</div>	<!-- /container -->
+	
+
+
+{% endblock content %}
\ No newline at end of file
diff --git a/leboncoin/index/urls.py b/leboncoin/index/urls.py
index bb03a6bed7a85940d8c8df821192c94075577a88..ee563e6a53ac46e19e06ed68b485d991bf8e9d96 100644
--- a/leboncoin/index/urls.py
+++ b/leboncoin/index/urls.py
@@ -1,22 +1,34 @@
 from django.urls import path
 from . import views
+from django.urls import include
+from django.contrib import admin
+from django.conf import settings
+from django.conf.urls.static import static
+from .views import *
 
 urlpatterns = [
-    path('', views.home, name="home"),
+    path('', views.accueil, name="home"),
     path('accueil',views.accueil, name="accueil"),
     path('login/', views.login, name="login"),
     path('logout/', views.logout, name="logout"),
-
     path('advert/<int:pk>', views.advert, name="advert"),
     path('advert/<int:pk>/com', views.CreateCom.as_view(), name="advert_com"),
 
     path('adverts/', views.adverts, name="adverts"),
-    path('add/', views.CreateAdvert.as_view(), name="add"),
+    path('add_new/', views.CreateAdvert.as_view(), name="add_new"),
 
     path('search/', views.search, name="search"),
 
     path('message/', views.CreateMessage.as_view(), name="send_message"),
     path('messages/', views.messages, name="messages"),
+    path("profile", views.profile, name="profile"),
+    path('setprofile/', views.setprofile, name="setprofile"),
+    path('register/', views.register, name="register"),
+    path('about/', views.about, name="about"),
+    
+] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
+
+
 
-    path('profile/', views.profile, name="profile"),
-]
\ No newline at end of file
+if settings.DEBUG:
+    urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
\ No newline at end of file
diff --git a/leboncoin/index/views.py b/leboncoin/index/views.py
index dd3e59a7242a5441b5afea1d290b801e49682a8e..97d5a90346175c811c10b9b9686b0324f01cc17d 100644
--- a/leboncoin/index/views.py
+++ b/leboncoin/index/views.py
@@ -1,23 +1,49 @@
-from django.shortcuts import render
 
 from django.http import HttpResponse,HttpResponseRedirect
 from django.contrib.auth import login as django_login, logout as django_logout, authenticate
 from django.contrib.auth.decorators import login_required, user_passes_test
 from django.contrib.auth.mixins import LoginRequiredMixin
 from django.utils.decorators import method_decorator
-
+from django.http import HttpRequest
+from django.http import HttpResponse
 from django.views.generic.edit import FormMixin, ProcessFormView
 from django.views.generic.detail import SingleObjectTemplateResponseMixin
 
+from PIL import ImageOps, Image as pil_image
 
+from django.shortcuts import render
+from django.urls import reverse
 
+from django.shortcuts import redirect
 from django.shortcuts import render
 from django.urls import reverse
 
+from django.conf import settings
+from django.contrib import auth
+from django.contrib.auth.models import User
 from . import models
-from .forms import AdvertForm, CommentForm, MessageForm
+from . import forms
+from .forms import AdvertForm, CommentForm, MessageForm, ProfileUpdateForm , ProfileForm
+#,ImageProfileForm
 # Create your views here.
 
+
+def register(request):
+    if request.method == 'GET':
+        return render(request, 'index/register.html')
+    elif request.method == 'POST':
+        username = request.POST['username']
+        password = request.POST['password']
+        confifmPwd = request.POST['confirmpassword']
+        email = request.POST['email']
+        
+        if confifmPwd == password:
+            #c'est un peu barbare il faut passer par un form
+            User.objects.create_user(username,email,password)
+            return HttpResponseRedirect(reverse('accueil'))
+        else:
+            return HttpResponseRedirect(reverse('register'))
+
 def login(request):
     if request.method == 'GET':
         return render(request, 'index/login.html')
@@ -49,6 +75,11 @@ def adverts(request):
 
     return render(request, 'index/adverts.html', context=context)
 
+@login_required
+def about(request):
+    context = { 'unseen_messages_count' : models.Message.objects.filter(seen=False).count() } if request.user.is_staff else {}
+    return render(request, 'index/about.html', context=context)
+
 @login_required
 def advert(request, pk):
     context = {
@@ -59,13 +90,16 @@ def advert(request, pk):
 
 class CreateAdvert(SingleObjectTemplateResponseMixin, FormMixin, ProcessFormView, LoginRequiredMixin):
     model = models.Advert
-    template_name = 'index/add.html'
+    template_name = 'index/add_new.html'
     form_class = AdvertForm
 
     def get(self, request, *args, **kwargs):
         return super(CreateAdvert, self).get(request, *args, **kwargs)
 
     def post(self, request, *args, **kwargs):
+        form = AdvertForm(request.POST, request.FILES)
+        if form.is_valid():
+            form.save()
         return super(CreateAdvert, self).post(request, *args, **kwargs)
     
     def get_success_url(self):
@@ -79,7 +113,7 @@ class CreateAdvert(SingleObjectTemplateResponseMixin, FormMixin, ProcessFormView
 
 class CreateCom(SingleObjectTemplateResponseMixin, FormMixin, ProcessFormView, LoginRequiredMixin):
     model = models.Comment
-    template_name = 'index/add.html'
+    template_name = 'index/add_new.html'
     form_class = CommentForm
 
     def get(self, request, *args, **kwargs):
@@ -100,7 +134,7 @@ class CreateCom(SingleObjectTemplateResponseMixin, FormMixin, ProcessFormView, L
 
 class CreateMessage(SingleObjectTemplateResponseMixin, FormMixin, ProcessFormView, LoginRequiredMixin):
     model = models.Message
-    template_name = 'index/add.html'
+    template_name = 'index/add_new.html'
     form_class = MessageForm
 
     def get(self, request, *args, **kwargs):
@@ -127,7 +161,7 @@ def search(request):
             'adverts' : adverts,
             'count' : adverts.count,
         }
-        return render(request, 'index/search.html', context=context)
+        return render(request, 'index/adverts.html', context=context)
 
 
 @user_passes_test(lambda u : u.is_staff)
@@ -141,9 +175,46 @@ def messages(request):
 
 @login_required
 def profile(request):
-    context = { 'unseen_messages_count' : models.Message.objects.filter(seen=False).count() } if request.user.is_staff else {}
+    profile = models.Profile
+    context = {
+        'profile' : profile
+    }
     return render(request, 'index/profile.html', context=context)
 
 def accueil(request):
     context = { 'unseen_messages_count' : models.Message.objects.filter(seen=False).count() } if request.user.is_staff else {}
-    return render(request, 'index/accueil.html', context=context)
\ No newline at end of file
+    return render(request, 'index/accueil.html', context=context)
+
+
+@login_required
+def setprofile(request):
+
+    model=models.Profile
+    form_class = ProfileUpdateForm
+    args = {}
+
+    if request.method == 'POST':
+        form = ProfileUpdateForm(request.POST, request.FILES, instance=request.user)
+        #profileimgform = ImageProfileForm(
+            #request.POST, request.FILES, instance=request.user)
+        form.actual_user = request.user
+        if form.is_valid():
+            user = form.save(commit=False)
+            form.save()
+        return HttpResponseRedirect(reverse('profile'))
+
+      #if profileimgform.has_changed() and profileimgform.is_valid():
+       #     profileimgform.save()
+       # else:
+        #    profileimgform = ImageProfileForm(instance=request.user)
+    else:
+        form = ProfileUpdateForm(request.POST, request.FILES, instance=request.user)
+        #if form.is_valid():
+
+
+
+    args['form'] = form
+    return render(request, 'index/setprofile.html', args)
+
+
+
diff --git a/leboncoin/leboncoin/__pycache__/__init__.cpython-38.pyc b/leboncoin/leboncoin/__pycache__/__init__.cpython-38.pyc
index 2f3b0a84645d38f1dc99052d898ab053dbd0e5e9..8403650cb032780a5548ab1aebfa7bb7951c4779 100644
Binary files a/leboncoin/leboncoin/__pycache__/__init__.cpython-38.pyc and b/leboncoin/leboncoin/__pycache__/__init__.cpython-38.pyc differ
diff --git a/leboncoin/leboncoin/__pycache__/settings.cpython-38.pyc b/leboncoin/leboncoin/__pycache__/settings.cpython-38.pyc
index ad87403015f5c350f315f9259c47f0f3c1ab73ed..419ede8723f345da8109f8d9d238c1cfa7e26b02 100644
Binary files a/leboncoin/leboncoin/__pycache__/settings.cpython-38.pyc and b/leboncoin/leboncoin/__pycache__/settings.cpython-38.pyc differ
diff --git a/leboncoin/leboncoin/__pycache__/urls.cpython-38.pyc b/leboncoin/leboncoin/__pycache__/urls.cpython-38.pyc
index a9c41bddbc9df65c0709d9d0f7b79c042d4c8843..6d5d0ac170cf54b79413004eaa1a32a46fbba450 100644
Binary files a/leboncoin/leboncoin/__pycache__/urls.cpython-38.pyc and b/leboncoin/leboncoin/__pycache__/urls.cpython-38.pyc differ
diff --git a/leboncoin/leboncoin/__pycache__/wsgi.cpython-38.pyc b/leboncoin/leboncoin/__pycache__/wsgi.cpython-38.pyc
index f5c41a6ab43569c7d8404cb7c6fae2aaf152388c..c66dc4b1758ee95c44dc43982357593fba050448 100644
Binary files a/leboncoin/leboncoin/__pycache__/wsgi.cpython-38.pyc and b/leboncoin/leboncoin/__pycache__/wsgi.cpython-38.pyc differ
diff --git a/leboncoin/leboncoin/settings.py b/leboncoin/leboncoin/settings.py
index f9c3459e2f73e067a8d580ee294e4edeee47b8ce..690b698b25fcae00d4ffff0eae8c9e9e9fe20e2e 100644
--- a/leboncoin/leboncoin/settings.py
+++ b/leboncoin/leboncoin/settings.py
@@ -11,11 +11,20 @@ https://docs.djangoproject.com/en/3.1/ref/settings/
 """
 
 from pathlib import Path
+import os
 
 # Build paths inside the project like this: BASE_DIR / 'subdir'.
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
 BASE_DIR = Path(__file__).resolve().parent.parent
+STATIC_URL = '/static/'
 
+STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'), ) 
+#STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
+MEDIA_URL = '/Media/' 
+MEDIA_ROOT = os.path.join(BASE_DIR, 'Media')
 
+LOGIN_URL = '/login/'
+LOGIN_REDIRECT_URL = '/'
 # Quick-start development settings - unsuitable for production
 # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/
 
@@ -39,6 +48,7 @@ INSTALLED_APPS = [
     'django.contrib.staticfiles',
     'index',
     'crispy_forms',
+    
 ]
 
 MIDDLEWARE = [
@@ -54,6 +64,9 @@ MIDDLEWARE = [
 
 ROOT_URLCONF = 'leboncoin.urls'
 
+
+AUTH_PROFILE_MODULE = 'myapp.UserProfile'
+
 TEMPLATES = [
     {
         'BACKEND': 'django.template.backends.django.DjangoTemplates',
@@ -126,7 +139,8 @@ USE_TZ = True
 # Static files (CSS, JavaScript, Images)
 # https://docs.djangoproject.com/en/3.1/howto/static-files/
 
-STATIC_URL = '/static/'
 
-LOGIN_URL = '/login/'
-LOGIN_REDIRECT_URL = '/'
+#MEDIA_URL = '/media/'
+
+
+
diff --git a/leboncoin/leboncoin/urls.py b/leboncoin/leboncoin/urls.py
index aa0f316d94df72260efe667878ba58de459757c3..97faad4519936c0da9a2174316e0e4977e1c7303 100644
--- a/leboncoin/leboncoin/urls.py
+++ b/leboncoin/leboncoin/urls.py
@@ -18,12 +18,15 @@ from django.urls import include, path
 from django.contrib.staticfiles.urls import staticfiles_urlpatterns
 from django.conf.urls.static import static
 from django.conf import settings
-
+from django.contrib.staticfiles.urls import staticfiles_urlpatterns 
+from django.contrib.staticfiles.urls import static
 urlpatterns = [
     path('admin/', admin.site.urls),
     path('', include('index.urls'))
 
 ]+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
 
+if settings.DEBUG:
+	urlpatterns += static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)
 urlpatterns += staticfiles_urlpatterns()
 STATIC_ROOT = "/var/www/example.com/static/"
\ No newline at end of file
diff --git a/leboncoin/migrations/__init__.py b/leboncoin/migrations/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git a/leboncoin/static/pics/IMG_3032.JPG b/leboncoin/static/pics/IMG_3032.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..7f759f4c9703808fd9e3385f20518a74a45d80d9
Binary files /dev/null and b/leboncoin/static/pics/IMG_3032.JPG differ
diff --git a/leboncoin/static/pics/IMG_3051.JPG b/leboncoin/static/pics/IMG_3051.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..ccc0f1bb3f9fb1384204e53c0597a7e92956fef4
Binary files /dev/null and b/leboncoin/static/pics/IMG_3051.JPG differ
diff --git a/leboncoin/static/pics/IMG_3052.JPG b/leboncoin/static/pics/IMG_3052.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..b5ae4a16a7032284cf632c19e45b7aaff2f17f54
Binary files /dev/null and b/leboncoin/static/pics/IMG_3052.JPG differ
diff --git a/leboncoin/static/pics/IMG_3054.JPG b/leboncoin/static/pics/IMG_3054.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..da534d955bf0822cc4123c97129869f8a53dd60c
Binary files /dev/null and b/leboncoin/static/pics/IMG_3054.JPG differ
diff --git a/leboncoin/static/pics/IMG_3054_DoJDwp0.JPG b/leboncoin/static/pics/IMG_3054_DoJDwp0.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..da534d955bf0822cc4123c97129869f8a53dd60c
Binary files /dev/null and b/leboncoin/static/pics/IMG_3054_DoJDwp0.JPG differ
diff --git a/leboncoin/static/pics/IMG_3070.JPG b/leboncoin/static/pics/IMG_3070.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..e62173122ee67d6770742249938b466d548cacd4
Binary files /dev/null and b/leboncoin/static/pics/IMG_3070.JPG differ
diff --git a/leboncoin/static/pics/IMG_3071.JPG b/leboncoin/static/pics/IMG_3071.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..d2644627e2d98e7b0ac70a3e85e23794638d0b58
Binary files /dev/null and b/leboncoin/static/pics/IMG_3071.JPG differ
diff --git a/leboncoin/static/pics/IMG_3079.JPG b/leboncoin/static/pics/IMG_3079.JPG
new file mode 100644
index 0000000000000000000000000000000000000000..c5033396fb2b80b0e0feb787e92b763fdd5d820d
Binary files /dev/null and b/leboncoin/static/pics/IMG_3079.JPG differ
diff --git a/leboncoin/static/pics/fiat.jpg b/leboncoin/static/pics/fiat.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..8e7100d8240d84e35a8b0579cc90c7e1c5bbfa43
Binary files /dev/null and b/leboncoin/static/pics/fiat.jpg differ
diff --git a/leboncoin/static/pics/jpeg2000-home.jpeg b/leboncoin/static/pics/jpeg2000-home.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..5183a9282d3fecc3b224eeba06b8ff4eef6ca914
Binary files /dev/null and b/leboncoin/static/pics/jpeg2000-home.jpeg differ
diff --git a/leboncoin/static/pics/pvt-japon-1900x800.jpeg b/leboncoin/static/pics/pvt-japon-1900x800.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..7a42c8423553807d632f5b8f1d3e3dff167deb12
Binary files /dev/null and b/leboncoin/static/pics/pvt-japon-1900x800.jpeg differ
diff --git a/leboncoin/static/pics/pvt-japon-1900x800.jpg b/leboncoin/static/pics/pvt-japon-1900x800.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..9c59c1b4a7c41f313e433be93bd53f08d4cdabca
Binary files /dev/null and b/leboncoin/static/pics/pvt-japon-1900x800.jpg differ
diff --git a/leboncoin/static/pics/pvt-japon-1900x8002.jpg b/leboncoin/static/pics/pvt-japon-1900x8002.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..258157c32385d2a6337063d06c379a41c756b2ed
Binary files /dev/null and b/leboncoin/static/pics/pvt-japon-1900x8002.jpg differ
diff --git a/leboncoin/static/pics/th.jpeg b/leboncoin/static/pics/th.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/static/pics/th.jpeg differ
diff --git a/leboncoin/static/pics/th_5DrifAf.jpeg b/leboncoin/static/pics/th_5DrifAf.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/static/pics/th_5DrifAf.jpeg differ
diff --git a/leboncoin/static/pics/th_s5AT1MN.jpeg b/leboncoin/static/pics/th_s5AT1MN.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/static/pics/th_s5AT1MN.jpeg differ
diff --git a/leboncoin/static/pics/th_uNSgi1v.jpeg b/leboncoin/static/pics/th_uNSgi1v.jpeg
new file mode 100644
index 0000000000000000000000000000000000000000..80b6baff18611e04d3ddd77b19e40979c16a8177
Binary files /dev/null and b/leboncoin/static/pics/th_uNSgi1v.jpeg differ