[Django] #22365: TypeError at / register()

4 views
Skip to first unread message

Django

unread,
Mar 31, 2014, 11:26:17 PM3/31/14
to django-...@googlegroups.com
#22365: TypeError at / register()
-------------------------------+-----------------------------------------
Reporter: radsepvj@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Keywords: django, admin.py, models.py
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------------------------
Hi there,

I have added two classes (Building and Room) to models.py. But they are
not appearing on the app I have deployed. How do I go ahead with this?

I am not sure if this the right way. If I do include Building and Room in
admin.py an error occurs. I am not sure of the right way of doing this.
Can you please suggest me on this please. Thank you.

admin.py
from django.contrib import admin
from booknowapp.models import Customer, Building, Room

# Register your models here.
admin.site.register(Customer, Building, Room)

I get this error
TypeError at /
register() takes at most 3 arguments (4 given)

--
Ticket URL: <https://code.djangoproject.com/ticket/22365>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 1, 2014, 2:13:34 AM4/1/14
to django-...@googlegroups.com
#22365: TypeError at / register()
-------------------------------------+-------------------------------------

Reporter: radsepvj@… | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Resolution:
Keywords: django, admin.py, | Triage Stage:
models.py | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

Please see TicketClosingReasons/UseSupportChannels, thank you!

--
Ticket URL: <https://code.djangoproject.com/ticket/22365#comment:1>

Django

unread,
Apr 1, 2014, 2:13:39 AM4/1/14
to django-...@googlegroups.com
#22365: TypeError at / register()
-------------------------------------+-------------------------------------
Reporter: radsepvj@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 1.6
Severity: Normal | Resolution: invalid

Keywords: django, admin.py, | Triage Stage:
models.py | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by aaugustin):

* status: new => closed
* resolution: => invalid


--
Ticket URL: <https://code.djangoproject.com/ticket/22365#comment:2>

Django

unread,
Apr 1, 2014, 6:47:07 AM4/1/14
to django-...@googlegroups.com
#22365: TypeError at / register()
-------------------------------------+-------------------------------------
Reporter: radsepvj@… | Owner: nobody
Type: Uncategorized | Status: closed
Component: Uncategorized | Version: 1.6

Severity: Normal | Resolution: invalid
Keywords: django, admin.py, | Triage Stage:
models.py | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by anonymous):

Do so:

admin.py
from django.contrib import admin
from booknowapp.models import Customer, Building, Room

# Register your models here.

admin.site.register(Customer)
admin.site.register(Building)
admin.site.register(Room)

--
Ticket URL: <https://code.djangoproject.com/ticket/22365#comment:3>

Reply all
Reply to author
Forward
0 new messages