Sorted out!

path('nova/', views.CreatePerson.as_view(), name='CreatePerson'),


Em qua, 30 de out de 2019 às 14:27, Elias Coutinho <coutinho.el...@gmail.com>
escreveu:

> Good afternoon friends!
>
> I need your help on this issue.
>
> I'm trying to use this lib:
>
> https://github.com/AndrewIngram/django-extra-views
>
> Specifically CreateWithInlinesView or UpdateWithInlinesView
>
> Then I created the view like this:
>
>     from extra_views import CreateWithInlinesView, InlineFormSetFactory
>
>     class FilesDocumentsInline (InlineFormSetFactory):
>       model = FilesDocuments
>       fields = ['id', 'kynd', 'file_document']
>
>
>     class ContactInline (InlineFormSetFactory):
>       model = Contact
>       fields = ['kynd', 'description', 'contact']
>
>
>     class CreatePerson (CreateWithInlinesView):
>       model = Person
>       inlines = [ContactInline, FilesDocumentsInline]
>       fields = ['name', 'phone', 'cpf_cnpj', 'email', 'birth', 'rg', 'cep'
> , 'backyard', 'number', 'neighborhood',
>             'city State']
>   template_name = 'person_create_contact.html'
>
>    I'm calling in the url like this:
>
>
>     path ('nova /', views.CreatePerson, name = 'CreatePerson'),
>
>
>
>
> And the terminal is returning an argument error.
>
> *    response = wrapped_callback (request, * callback_args, **
> callback_kwargs)*
> *    TypeError: __init __ () takes 1 positional argument but 2 were given*
>
> How can you? This is virtually identical to the example!
>
> I will post this same text in some forums to try to solve too.
>
> What am I doing wrong in this example?
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/m7cXAuwS4bQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/f7cd09d7-201e-4874-a296-c996569c7b45%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f7cd09d7-201e-4874-a296-c996569c7b45%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
Elias Coutinho.
Aprender sobre alguns assuntos é fundamental.
Aprender sobre Deus é indiscutivelmente o melhor conteúdo.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALgom8rwr6uDtt-zwA%2BcoOOt8P9GptsvFPixYDv4ntE4q88r_w%40mail.gmail.com.

Reply via email to