is a custom model even possible

29 views
Skip to first unread message

Joel T

unread,
Dec 6, 2020, 9:58:29 PM12/6/20
to Django users
Hi everyone,
I'm new here and have zero clues as to how to create a model with methods that can be overridden by each instance . i.e Each instance will provide its own methods that will be called when a certain event is triggered.

Charles Freeman

unread,
Dec 7, 2020, 4:35:45 AM12/7/20
to django...@googlegroups.com
Yes it is possible to create a custom model a u have to do is override the default django models

On Mon, Dec 7, 2020, 03:57 Joel T <7tho...@gmail.com> wrote:
Hi everyone,
I'm new here and have zero clues as to how to create a model with methods that can be overridden by each instance . i.e Each instance will provide its own methods that will be called when a certain event is triggered.

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c4bb1357-1d33-4ccb-b6a5-68d2d231a68en%40googlegroups.com.

Ryan Nowakowski

unread,
Dec 7, 2020, 1:50:48 PM12/7/20
to Django users
Hey Joel,

An instance of a model typically represents one row in the database. It
is a bit unusual to have different methods per row(model instance).
Where will you store the code for these instance-specific methods? In
the database?

Perhaps, you should ask a more general question? Maybe this "unique
methods per model instance" isn't the best way to solve your problem.

- Ryan N
Reply all
Reply to author
Forward
0 new messages