init
This commit is contained in:
0
home/__init__.py
Normal file
0
home/__init__.py
Normal file
3
home/admin.py
Normal file
3
home/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
home/apps.py
Normal file
6
home/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class HomeConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'home'
|
||||
8
home/forms.py
Normal file
8
home/forms.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from django import forms
|
||||
|
||||
|
||||
class ContactForm(forms.Form):
|
||||
full_name = forms.CharField(max_length=255, required=True, label="Nom/Prénom ou entreprise")
|
||||
email = forms.EmailField(required=True)
|
||||
subject = forms.CharField(max_length=255, required=True, label="Sujet")
|
||||
message = forms.CharField(widget=forms.Textarea, required=True)
|
||||
24
home/middleware.py
Normal file
24
home/middleware.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from django.middleware.csrf import rotate_token
|
||||
|
||||
|
||||
class SessionOnHitMiddleware:
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
if not request.user.is_authenticated and not request.session.session_key:
|
||||
request.session.save()
|
||||
response = self.get_response(request)
|
||||
return response
|
||||
|
||||
|
||||
class CsrfOnHitMiddleWare:
|
||||
def __init__(self, get_response):
|
||||
self.get_response = get_response
|
||||
|
||||
def __call__(self, request):
|
||||
if 'CSRF_COOKIE' not in request.META:
|
||||
rotate_token(request)
|
||||
response = self.get_response(request)
|
||||
|
||||
return response
|
||||
27
home/migrations/0001_initial.py
Normal file
27
home/migrations/0001_initial.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.0.7 on 2024-07-19 08:31
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Hit',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('path', models.CharField(max_length=255)),
|
||||
('parameters', models.JSONField(default=dict)),
|
||||
('session_id', models.CharField(max_length=255)),
|
||||
('ip_address', models.GenericIPAddressField()),
|
||||
('user_agent', models.CharField(max_length=255)),
|
||||
('date_created', models.DateTimeField(auto_now_add=True)),
|
||||
],
|
||||
),
|
||||
]
|
||||
0
home/migrations/__init__.py
Normal file
0
home/migrations/__init__.py
Normal file
15
home/models.py
Normal file
15
home/models.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from django.db import models
|
||||
|
||||
import uuid
|
||||
|
||||
|
||||
class Hit(models.Model):
|
||||
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
|
||||
path = models.CharField(max_length=255)
|
||||
parameters = models.JSONField(default=dict)
|
||||
session_id = models.CharField(max_length=255)
|
||||
ip_address = models.GenericIPAddressField(max_length=255)
|
||||
user_agent = models.CharField(max_length=255)
|
||||
date_created = models.DateTimeField(auto_now_add=True)
|
||||
|
||||
|
||||
28
home/templates/home/contact.html
Normal file
28
home/templates/home/contact.html
Normal file
@@ -0,0 +1,28 @@
|
||||
{% extends "home/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form method="post" action="{% url "home:contact" %}">
|
||||
{{ csrf_input }}
|
||||
<div id="form_{{ form.full_name.id_for_label }}">
|
||||
{{ form.full_name.errors }}
|
||||
{{ form.full_name.label_tag }}
|
||||
{{ form.full_name }}
|
||||
</div>
|
||||
<div id="form_{{ form.email.id_for_label }}">
|
||||
{{ form.email.errors }}
|
||||
{{ form.email.label_tag }}
|
||||
{{ form.email }}
|
||||
</div>
|
||||
<div id="form_{{ form.subject.id_for_label }}">
|
||||
{{ form.subject.errors }}
|
||||
{{ form.subject.label_tag }}
|
||||
{{ form.subject }}
|
||||
</div>
|
||||
<div id="form_{{ form.message.id_for_label }}">
|
||||
{{ form.message.errors }}
|
||||
{{ form.message.label_tag }}
|
||||
{{ form.message }}
|
||||
</div>
|
||||
<input type="submit" value="Envoyer">
|
||||
</form>
|
||||
{% endblock %}
|
||||
5
home/templates/home/contact_success.html
Normal file
5
home/templates/home/contact_success.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{% extends "home/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% endblock %}
|
||||
204
home/templates/home/cv.html
Normal file
204
home/templates/home/cv.html
Normal file
@@ -0,0 +1,204 @@
|
||||
{% extends "home/layout.html" %}
|
||||
{% load django_vite %}
|
||||
|
||||
{% block css %}
|
||||
{{ super }}
|
||||
<link rel="stylesheet" href="{% vite_asset_url "styles/cv.css" %}">
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js %}
|
||||
{% vite_asset "application/cv.js" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="cv_main">
|
||||
<div id="cv_left">
|
||||
<div id="cv_presentation">
|
||||
<h2>Fabien ROUSSEAU</h2>
|
||||
<h3>Développeur Python/Django</h3>
|
||||
<p>
|
||||
Passionné d'informatique. J'ai décidé d'en faire mon métier en apprenant par moi-même l'électronique, le réseau puis par la suite le développement
|
||||
Aujourd'hui je souhaiterais poursuivre ce parcours au sein d'une entreprise dont je partage les valeurs qui m'accompagnera dans un processus de validation et certification de mon expérience et de mes compétences
|
||||
</p>
|
||||
</div>
|
||||
<div id="cv_contact">
|
||||
<h3>Coodonnées</h3>
|
||||
<ul>
|
||||
<li><a href="https://www.linkedin.com/in/44-fabien-rousseau/">LinkedIN</a></li>
|
||||
<li><a href="{% url "home:contact" %}">Me contacter</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="cv_competence">
|
||||
<h3>Compétences</h3>
|
||||
<h4>Language et framework</h4>
|
||||
<ul>
|
||||
<li>Python</li>
|
||||
<li>Django</li>
|
||||
<li>Django Rest Framework</li>
|
||||
<li>Django Channels</li>
|
||||
<li>Jinja</li>
|
||||
<li>Celery</li>
|
||||
<li>VueJS</li>
|
||||
<li>NuxtJS</li>
|
||||
<li>Vuetify</li>
|
||||
<li>OCPP</li>
|
||||
</ul>
|
||||
<h4>Système d'exploitation</h4>
|
||||
<ul>
|
||||
<li>Linux</li>
|
||||
<li>Windows</li>
|
||||
</ul>
|
||||
<h4>Outils</h4>
|
||||
<ul>
|
||||
<li>Docker</li>
|
||||
<li>Git</li>
|
||||
<li>Kanban</li>
|
||||
</ul>
|
||||
<h4>Base de données</h4>
|
||||
<ul>
|
||||
<li>PostgreSQL</li>
|
||||
<li>MySQL</li>
|
||||
<li>Redis</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="cv_strong">
|
||||
<h3>Points forts</h3>
|
||||
<ul>
|
||||
<li>Passionné de développement</li>
|
||||
<li>Polyvalent et adaptabilité</li>
|
||||
<li>Travaille efficacement en équipe</li>
|
||||
<li>Consciencieux</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cv_right">
|
||||
<article>
|
||||
<header>
|
||||
<div>
|
||||
<p>Avril 2017 à Maintenant</p>
|
||||
</div>
|
||||
<div class="cv_header_title">
|
||||
<h2>Développeur</h2>
|
||||
<h3>Auto-entrepreneur - Nantes - Full remote</h3>
|
||||
</div>
|
||||
</header>
|
||||
<div class="cv_content">
|
||||
<h4>Services : </h4>
|
||||
<ul>
|
||||
<li>Développement applicatif</li>
|
||||
<li>Conseil en informatique</li>
|
||||
<li>Hébergement et maintenance web</li>
|
||||
</ul>
|
||||
<h4>Missions : </h4>
|
||||
<ul>
|
||||
<li>Site web de suivi d’actualité footballistique</li>
|
||||
<li>Site de suivi des résultats et statistique footballistique</li>
|
||||
<li>Site d’hébergement de CV pour sportifs amateurs</li>
|
||||
<li>Site de gestion de formation dans le domaine des sports aquatiques</li>
|
||||
<li>Conseil divers en informatique</li>
|
||||
<li>Intervention en soutien pour maintenance d’infrastructure</li>
|
||||
<li>intervention pour migration de sites</li>
|
||||
<li>Site vitrine d’entreprise d’enfouissement électrique et gaz</li>
|
||||
<li>Mise en place de scrapping pour entreprise</li>
|
||||
</ul>
|
||||
<h4>Compétences technique : </h4>
|
||||
<ul class="cv_content_competence">
|
||||
<li>Python</li>
|
||||
<li>Django</li>
|
||||
<li>Django REST FRAMEWORK</li>
|
||||
<li>Django Channels</li>
|
||||
<li>Celery</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Redis</li>
|
||||
<li>VueJS</li>
|
||||
<li>NuxtJS</li>
|
||||
<li>Vuetify</li>
|
||||
<li>Docker</li>
|
||||
<li>Docker compose</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
<article>
|
||||
<header>
|
||||
<div>
|
||||
<p>Octobre 2021 à Novembre 2023</p>
|
||||
</div>
|
||||
<div class="cv_header_title">
|
||||
<h2>Lead Développeur</h2>
|
||||
<h3>PredicVision - Bordeaux - Full remote</h3>
|
||||
</div>
|
||||
</header>
|
||||
<div class="cv_content">
|
||||
<h4>Objectif : </h4>
|
||||
<p>
|
||||
Création d’une plateforme afin d’analyser et maintenir un parc de bornes de rechargement pour véhicules électriques.
|
||||
</p>
|
||||
<h4>Compétences Techniques : </h4>
|
||||
<ul class="cv_content_competence">
|
||||
<li>Python</li>
|
||||
<li>Django</li>
|
||||
<li>Django REST FRAMEWORK</li>
|
||||
<li>Django Channels</li>
|
||||
<li>Celery</li>
|
||||
<li>OCPP</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Redis</li>
|
||||
<li>VueJS</li>
|
||||
<li>NuxtJS</li>
|
||||
<li>Vuetify</li>
|
||||
<li>Docker</li>
|
||||
<li>Docker compose</li>
|
||||
</ul>
|
||||
<h4>Compétences supplémentaires : </h4>
|
||||
<ul>
|
||||
<li>Gitlab</li>
|
||||
<li>Kanban</li>
|
||||
<li>conseil</li>
|
||||
<li>réunion</li>
|
||||
<li>veille technique</li>
|
||||
<li>étude de faisabilité</li>
|
||||
<li>présentation</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
<article>
|
||||
<header>
|
||||
<div>
|
||||
<p>Septembre 2020 à Octobre 2021</p>
|
||||
</div>
|
||||
<div class="cv_header_title">
|
||||
<h2>Développeur Django</h2>
|
||||
<h3>FMC Production - Nantes - Hybride</h3>
|
||||
</div>
|
||||
</header>
|
||||
<div class="cv_content">
|
||||
<h4>Objectif :</h4>
|
||||
<p>
|
||||
Maintient d’une plateforme e-learning et création d’une plateforme de conférence live et VOD pour le monde médical
|
||||
</p>
|
||||
<h4>Compétences Techniques : </h4>
|
||||
<ul class="cv_content_competence">
|
||||
<li>Python</li>
|
||||
<li>Django</li>
|
||||
<li>Django REST FRAMEWORK</li>
|
||||
<li>Django Channels</li>
|
||||
<li>Celery</li>
|
||||
<li>PostgreSQL</li>
|
||||
<li>Redis</li>
|
||||
<li>Docker</li>
|
||||
<li>Docker compose</li>
|
||||
</ul>
|
||||
<h4>Compétences supplémentaires : </h4>
|
||||
<ul>
|
||||
<li>Gitlab</li>
|
||||
<li>Daily</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
17
home/templates/home/index.html
Normal file
17
home/templates/home/index.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% extends "home/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<h2>Présentation</h2>
|
||||
<p>
|
||||
Développeur passionné d'informatique depuis le plus jeune âge.
|
||||
Cette page sera un condenser d'une vitrine de moi même,
|
||||
des prestations que je peux offrir
|
||||
ainsi qu'une multitude de partage de connaissance à travers mon blog
|
||||
</p>
|
||||
<h2>En quête d'un projet sur la DATA</h2>
|
||||
<p>
|
||||
Ayant une expérience dans la data,
|
||||
je suis en recherche d'un projet qui approfondira mes connaissances sur le sujet
|
||||
avec pourquoi pas un cumul de connaissances sur le web
|
||||
</p>
|
||||
{% endblock %}
|
||||
1
home/templates/home/layout.html
Normal file
1
home/templates/home/layout.html
Normal file
@@ -0,0 +1 @@
|
||||
{% extends "base.html" %}
|
||||
19
home/templates/home/service.html
Normal file
19
home/templates/home/service.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% extends "home/layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<p>
|
||||
Prestation de service ou de maintenance Python/Django/Flask/FastAPI :
|
||||
facturation à la journée à raison de 450€ par jour en moyenne (ce prix peut varier si c'est un projet qui dur dans le temps)
|
||||
</p>
|
||||
<ul>
|
||||
<li>Création de script</li>
|
||||
<li>Création de site simple comme complex</li>
|
||||
<li>Création de graphique (chart) sur des grands comme des petits volumes de donnée</li>
|
||||
<li>Mise à jour de sécurité</li>
|
||||
<li>Correction de bug</li>
|
||||
<li>Modification de votre projet existant</li>
|
||||
<li>Migration</li>
|
||||
<li>Optimisation</li>
|
||||
</ul>
|
||||
|
||||
{% endblock %}
|
||||
3
home/tests.py
Normal file
3
home/tests.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
14
home/urls.py
Normal file
14
home/urls.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
|
||||
app_name = 'home'
|
||||
urlpatterns = [
|
||||
path('', views.IndexView.as_view(), name='index'),
|
||||
path("cv/", views.CVView.as_view(), name='cv'),
|
||||
path("service/", views.ServiceView.as_view(), name='service'),
|
||||
path("contact/", views.ContactView.as_view(), name='contact'),
|
||||
path("contact_valid/", views.ContactValidView.as_view(), name='contact_valid'),
|
||||
path("hit/", views.hit, name="hit")
|
||||
]
|
||||
50
home/views.py
Normal file
50
home/views.py
Normal file
@@ -0,0 +1,50 @@
|
||||
from django.views.generic import TemplateView, FormView
|
||||
from django.http import HttpResponse
|
||||
|
||||
from ipware import get_client_ip
|
||||
from urllib import parse
|
||||
|
||||
from .forms import ContactForm
|
||||
from .models import Hit
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
template_name = 'home/index.html'
|
||||
|
||||
|
||||
class CVView(TemplateView):
|
||||
template_name = 'home/cv.html'
|
||||
|
||||
|
||||
class ServiceView(TemplateView):
|
||||
template_name = "home/service.html"
|
||||
|
||||
|
||||
class ContactView(FormView):
|
||||
template_name = 'home/contact.html'
|
||||
form_class = ContactForm
|
||||
|
||||
|
||||
class ContactValidView(TemplateView):
|
||||
template_name = "home/contact_success.html"
|
||||
|
||||
|
||||
def hit(request):
|
||||
if request.method == "POST":
|
||||
ip_address, _ = get_client_ip(request)
|
||||
ip_address = '.'.join(ip_address.split('.')[:-1]+["0"])
|
||||
path_parser = parse.urlsplit(request.headers["referer"])
|
||||
path = path_parser.path
|
||||
parameters = dict(parse.parse_qsl(path_parser.query))
|
||||
user_agent = request.headers["user-agent"]
|
||||
session_id = request.session.session_key
|
||||
|
||||
Hit.objects.create(
|
||||
path=path_parser.path,
|
||||
parameters=parameters,
|
||||
session_id=session_id,
|
||||
ip_address=ip_address,
|
||||
user_agent=user_agent,
|
||||
)
|
||||
return HttpResponse("")
|
||||
|
||||
Reference in New Issue
Block a user