Repository: evennia/evennia

Issue:
[DEVEL] [BUG] Typeclass dropdown does not show custom typeclasses
#### Describe the bug
In the develop branch, the admin site seems to have a new feature where typeclasses are no longer CharFields but are ChoiceFields instead. However, none of my typeclasses are shown there. Instead, the only typeclasses that are shown are the DefaultAccount/DefaultGuest/Bots and DefaultObject/DefaultRoom/DefaultExit/etc.

#### To Reproduce
Steps to reproduce the behavior:
1. Start my project.
2. Check out the admin site and open an Account or an Object.
3. Typeclass is wrong and is also reset to the wrong typeclass when you save the entity.

#### Expected behavior
Typeclass field should be a string or a valid list of typeclasses.

#### Environment, Evennia version, OS etc
Evennia 1.0-dev (rev 43fd533) (rev 43fd533)
OS: nt
Python: 3.8.0
Twisted: 21.2.0
Django: 3.2.4

#### Additional context
It does say "If your custom class is not found here, it may not be imported as part of Evennia's startup." but it's unclear how to make the typeclass be imported on Evennia's startup. In this case, I actually wanted to use the default "typeclasses.accounts.Account" typeclass. I also have some custom object typeclasses that should continue to work.

![image](https://user-images.githubusercontent.com/56974578/123567111-5894cb00-d7b9-11eb-8c6b-6762b4de50a0.png)
This should be "typeclasses.accounts.Account"

![image](https://user-images.githubusercontent.com/56974578/123567184-76623000-d7b9-11eb-9d5a-c460bf10493a.png)
This should be "share.objects.Object"


Discussion:

Resolving patch:
diff --git a/evennia/web/admin/accounts.py b/evennia/web/admin/accounts.py
--- a/evennia/web/admin/accounts.py
+++ b/evennia/web/admin/accounts.py
@@ -58,8 +58,8 @@ class Meta(object):
         label="Typeclass",
         help_text="This is the Python-path to the class implementing the actual account functionality. "
         "You usually don't need to change this from the default.<BR>"
-        "If your custom class is not found here, it may not be imported as part of Evennia's startup.",
-        choices=adminutils.get_and_load_typeclasses(parent=AccountDB),
+        "If your custom class is not found here, it may not be imported into Evennia yet.",
+        choices=lambda: adminutils.get_and_load_typeclasses(parent=AccountDB),
     )
 
     db_lock_storage = forms.CharField(
diff --git a/evennia/web/admin/objects.py b/evennia/web/admin/objects.py
--- a/evennia/web/admin/objects.py
+++ b/evennia/web/admin/objects.py
@@ -63,8 +63,8 @@ class Meta(object):
         help_text="This is the Python-path to the class implementing the actual functionality. "
         f"<BR>If you are creating a Character you usually need <B>{settings.BASE_CHARACTER_TYPECLASS}</B> "
         "or a subclass of that. <BR>If your custom class is not found in the list, it may not be imported "
-        "as part of Evennia's startup.",
-        choices=adminutils.get_and_load_typeclasses(parent=ObjectDB))
+        "into Evennia yet.",
+        choices=lambda: adminutils.get_and_load_typeclasses(parent=ObjectDB))
 
     db_lock_storage = forms.CharField( label="Locks",
         required=False,
diff --git a/evennia/web/admin/scripts.py b/evennia/web/admin/scripts.py
--- a/evennia/web/admin/scripts.py
+++ b/evennia/web/admin/scripts.py
@@ -22,8 +22,8 @@ class ScriptForm(forms.ModelForm):
     db_typeclass_path = forms.ChoiceField(
         label="Typeclass",
         help_text="This is the Python-path to the class implementing the actual script functionality. "
-        "<BR>If your custom class is not found here, it may not be imported as part of Evennia's startup.",
-        choices=adminutils.get_and_load_typeclasses(
+        "<BR>If your custom class is not found here, it may not be imported into Evennia yet.",
+        choices=lambda: adminutils.get_and_load_typeclasses(
             parent=ScriptDB, excluded_parents=["evennia.prototypes.prototypes.DbPrototype"])
     )
 


Test patch: