TurboGears / tgext.admin

Admin Controller add-on for TurboGears2
MIT License
9 stars 5 forks source link

404 /admin/users/56e12abb81059f1f40cea663/edit #6

Open 984958198 opened 8 years ago

984958198 commented 8 years ago

http://127.0.0.1:8080/admin/users/56e12abb81059f1f40cea663/edit

Error 404 We're sorry but we weren't able to process this request.

class Group(MappedClass):
    """
    Group definition.
    """
    class __mongometa__:
        session = DBSession
        name = 'sys_group'
        unique_indexes = [('group_name',),]

    _id = FieldProperty(s.String)          #set str type
    group_name = FieldProperty(s.String)
    display_name = FieldProperty(s.String)

    permissions = RelationProperty('Permission')

pip list:

alembic (0.8.4)
babel (2.2.0)
backlash (0.1.1)
beaker (1.8.0)
crank (0.8.0)
decorator (4.0.9)
formencode (1.3.0)
funcsigs (0.4)
gearbox (0.1.1)
genshi (0.7)
gweb (0.1, f:\gweb)
mako (1.0.3)
MarkupSafe (0.23)
ming (0.5.3)
myproj (0.1, f:\guozx\myproj)
nose (1.3.7)
PasteDeploy (1.5.2)
pip (8.1.0)
pymongo (2.9.2)
python-editor (0.5)
pytz (2015.7)
repoze.lru (0.6)
repoze.who (2.2)
requests (2.9.1)
setuptools (20.3.1)
six (1.10.0)
speaklater (1.3)
sprox (0.10.2)
sqlalchemy (1.0.12)
Tempita (0.5.2)
tg.devtools (2.3.8)
tgext.admin (0.7.2)
tgext.crud (0.8.2)
transaction (1.4.4)
TurboGears2 (2.3.8)
tw2.core (2.2.4)
tw2.forms (2.2.4.post1)
webhelpers2 (2.0)
WebOb (1.6.0)
WebTest (1.4.3)
wheel (0.29.0)
zope.interface (4.1.3)
zope.sqlalchemy (0.7.6)
amol- commented 8 years ago

May I say that I didn't understand the problem?

Title reports an 404 on an user, but you linked code of the Group model. If I try to edit an user on a newly quickstarted projects with TG2.3.8 it seems to work as expected for me.

984958198 commented 8 years ago

$ gearbox quickstart --ming myproj create mongodb project I will model _id = FieldProperty(s.ObjectId) update _id = FieldProperty(s.String) in mongodb is str type When I was in the admin editor in 404 Like editing it will go into the objectid type queries