Exemplo n.º 1
0
def demande_emploi_create(id):

    if request.method == 'GET':
        return render_template('demandes/new.html',
                               offre=OffreEmploi.afficher(id))
    else:
        # get form data
        # _id_offre_emploi = request.form['_id_offre_emploi']
        date_creation = request.form['date_creation']
        poste = request.form['poste']
        description = request.form['description']
        competence = request.form['competence']
        experience = request.form['experience']
        #   if _id_utlisateur.is_authenticated():
        #      _id_utlisateur = _id_utlisateur.username
        # _id_utlisateur=Utilisateur.authentification()

        # User is authenticated
        niveau_etude = request.form['niveau_etude']
        formation = request.form['formation']

        Demandeemploi.new(poste, date_creation, niveau_etude, experience,
                          description, competence, formation)

        flash('Demande ajoutée avec success', 'success')
        return redirect(url_for('offre_emploi_index'))
Exemplo n.º 2
0
def offre_emploi_new():

    if request.method == 'GET':
        return render_template('/offre-emploi/new.html')

    # get form data
    poste = request.form['poste']
    date_expiration = request.form['date_expiration']
    salaire = request.form['salaire']
    description = request.form['description']
    exigence = request.form['exigence']
    experience = request.form['experience']
    type_contrat = request.form['type_contrat']
    niveau_etude = request.form['niveau_etude']
    avantage = request.form['avantage']

    OffreEmploi.new(poste, type_contrat, date_expiration, salaire,
                    niveau_etude, experience, description, exigence, avantage)

    flash('offre ajouter', 'success')
    return redirect(url_for('offre_emploi_index'))
Exemplo n.º 3
0
def offre_emploi_edit(id):

    if request.method == 'GET':
        return render_template('/offre-emploi/edit.html',
                               offre=OffreEmploi.afficher(id))

    # get form data
    poste = request.form['poste']
    date_expiration = request.form['date_expiration']
    salaire = request.form['salaire']
    description = request.form['description']
    exigence = request.form['exigence']
    experience = request.form['experience']
    type_contrat = request.form['type_contrat']
    niveau_etude = request.form['niveau_etude']
    avantage = request.form['avantage']

    OffreEmploi.edit(poste, type_contrat, date_expiration, salaire,
                     niveau_etude, experience, description, exigence, avantage,
                     id)

    flash('offre modifier', 'success')
    return redirect(url_for('offre_emploi_index'))
Exemplo n.º 4
0
def offre_emploi_info_cand(id):

    if request.method == 'GET':
        return render_template('/demandes/off-info.html',
                               offre=OffreEmploi.afficher(id))

    # get form data
    poste = request.form['poste']
    date_expiration = request.form['date_expiration']
    salaire = request.form['salaire']
    description = request.form['description']
    exigence = request.form['exigence']
    experience = request.form['experience']
    type_contrat = request.form['type_contrat']
    niveau_etude = request.form['niveau_etude']
    avantage = request.form['avantage']

    return redirect(url_for('offre_emploi_can_index'))
Exemplo n.º 5
0
def offre_emploi_condidat():
    return render_template('/offre-emploi/index.html',
                           offre_emploi=OffreEmploi.afficher_tous())
Exemplo n.º 6
0
def offre_emploi_delete(id):

    OffreEmploi.delete(id)

    flash('offre supprimer', 'success')
    return redirect(url_for('offre_emploi_index'))
Exemplo n.º 7
0
def offre_emploi_can_index():

    return render_template('/candidats/index-candidat.html',
                           offre_emploi=OffreEmploi.afficher_tous())