User Registration using Django

-1

I have a registration class and a form for this, however I need to register each user using the user that the admin makes available, how do I do this? I have nothing on admin.py yet For example: when I click save I need to save the scholarship holder, etc ... How do I do? Would it have to have a class for each inheriting from admin sign-up and users?

from __future__ import unicode_literals

from django.db import models
from django.db import models


VINCULO = (
    (u'1', u'Bolsista'),
    (u'2', u'Estagiário'),
    (u'3', u'Terceiro'),
    (u'4', u'Servidor'),
    (u'5', u'Aluno Pós-Graduação'),
    (u'6', u'Servidor de outros órgãos'),
    (u'7', u'Professor Colaborador'),
)

SALAS = (
    (u'1', u'SysAdmin'),
    (u'2', u'Help Desk'),
)

class Inscricao(models.Model):
        vinculo = models.CharField(max_length=100, choices=VINCULO)
        registro = models.IntegerField()
        nome = models.CharField(max_length=100)
        email_inpe = models.EmailField(blank=True)
        email = models.EmailField(unique=True)
        data_admissao = models.DateField()
        data_fim_contrato = models.DateField()
        sala = models.CharField(max_length=100, choices=SALAS)
        ramal = models.CharField(max_length=30)
        criado_em = models.DateTimeField('criado em', auto_now_add=True)

        class Meta:
                ordering = ['criado_em']
                verbose_name = (u'nome')
                verbose_name_plural = (u'nomes')

        def __unicode__(self):
                return self.nome
    
asked by anonymous 31.07.2017 / 15:17

1 answer

0

What version of Django are you using? Friend, do not take it as ignorance, but you need to give a review in Django has been eating some courses at Udemy or School of Net.

    
08.08.2017 / 09:43