Hi,

im not sure that i understand "specifying your database columns explicitly".
I have connected to existing MSSQL database so i had to adapt my model due
to that. Just copied model from inspectdb and added:
- def __str__
-ForeignKey(class name, on delete=models.CASCADE)    xtimes for materialid
and group.

I am not so experience  as you :) but i think you are on the good lead.
I am watching this case :
https://stackoverflow.com/questions/44107021/django-admin-doesnt-display-value
Seems like same issue, same error occured.
What do you think?

pet, 18. sij 2019. u 11:16 Kasper Laudrup <[email protected]> napisao
je:

> Hi Ivan,
>
> On 1/18/19 10:59 AM, Ivan Martić wrote:
> > Thank you Kasper,
> >
>
> You're welcome.
>
> > i have copied that model after doing inspectdb. So it should be set by
> > default from django that way. Usually all was ok..
> > Also, i have tried that  change now and got the same result.
> >
> > Any other idea where i gone wrong?
> >
>
> Sorry, not really. I'm wondering why you are specifying your database
> columns explicitly though? I've never had a need for that, but I'm far
> from being very experienced with Django.
>
> Hopefully someone else can help you.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/54b11d43-d6c5-dcff-6d3d-29cbeca2ef43%40stacktrace.dk
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFab_C-2tbFNeo_JJV7tt8LYPP%3DP%3DKJXbEXjfQuLFEQgMP86-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to