According to this [post](https://stackoverflow.com/questions/46710557/improve-django-view-with-methods?noredirect=1#comment80367921_46710557), I'm trying to modify my whole script in order to get `Class Based Views` (CBV) in my Django application.

I would like to get any help, because it's the first time I'm using CBV.

My previous script function looks like this :

```
@login_required
def IdentityIndividuForm(request) :

    success = False
    query_Nom_ID = query_Prenom_ID = query_VilleNaissance_ID = None

    if 'recherche' in request.GET:

        query_Nom_ID = request.GET.get('q1NomID')
        query_Prenom_ID = request.GET.get('q1PrenomID')
        query_VilleNaissance_ID = request.GET.get('q1VilleNaissanceID')

        sort_params = {}

        lib.Individu_Recherche.set_if_not_none(sort_params, 'Nom__icontains', query_Nom_ID)
        lib.Individu_Recherche.set_if_not_none(sort_params, 'Prenom__icontains', query_Prenom_ID)
        lib.Individu_Recherche.set_if_not_none(sort_params, 'VilleNaissance__icontains', query_VilleNaissance_ID)

        query_ID_list = Individu.objects.filter(**sort_params) 

    else :
        query_ID_list = Individu.objects.none()

    if request.method == 'POST':

        form = IndividuFormulaire(request.POST or None, request.FILES or None)

        if form.is_valid() :
            post = form.save()

            return HttpResponseRedirect(reverse('IndividuResume', kwargs={'id': post.id}))

    else :
        form = IndividuFormulaire()
        form.fields['Utilisateur'].initial = request.user.last_name + " " + request.user.first_name

    context = {
        "form" : form,
        "Individu" : Individu,
        "query_Nom_ID" : query_Nom_ID,
        "query_Prenom_ID" : query_Prenom_ID,
        "query_VilleNaissance_ID" : query_VilleNaissance_ID,
        "query_ID_list" : query_ID_list,
    }

    return render(request, 'Identity_Individu_Form.html', context)

```

I had a `GET` part and a `POST` part in my function but both part are independent. The first one lets to make a research over my database. The second one lets to create an object to my database.

My question is : How I can overwrite the GET part with function based on CBV ?

My new function `form_valid(self, form)` works well, but I don't overcome to migrate the `GET` part to my CBV part.

Thank you!