Thursday, August 10, 2023

Re: hello i have made my crud and it works well. but when i add fields in the class. the crud does not work

i have to add fields to my class. because i have other fields.normal this problem has a solution


Le jeu. 10 août 2023 à 19:04, 'Kasper Laudrup' via Django users <django-users@googlegroups.com> a écrit :
On 10/08/2023 19.11, Abdoulaye SENE wrote:
> class Administratif(models.Model):
> nom = models.CharField(max_length=250)
> prenom = models.CharField(max_length=250)
> email = models.EmailField(max_length=250)
> tel = models.IntegerField()
> annEmploi = models.IntegerField(null=True,)
>
> def __str__(self):
> return self.nom
>

If it works when you don't add fields to the class, then don't add
fields to the class.

That way it will continue to work and will not stop to work.

I assume you prefer it work instead of not working?

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 django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/4179188c-96c0-4725-906c-01112c3ecf57%40stacktrace.dk.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAK9RMT3H%2BXAqOM11g0Q9ZGDRZV16uNG6fmAVk6MKt8bg6AUgGw%40mail.gmail.com.

No comments:

Post a Comment