jazzband / django-mongonaut

Built from scratch to replicate some of the Django admin functionality and add some more, to serve as an introspective interface for Django and Mongo.
MIT License
240 stars 67 forks source link

Regex for <document_name> updated. #75

Closed lchsk closed 9 years ago

lchsk commented 9 years ago

Regex for in mongonaut's urls.py does not allow for dot (".") to be present in the name of the model. But MongoEngine gives names containing a dot when one model inherits after the other. For example, if a model inherits from "User" and it's named NewUser, then the whole name of the new model will be: User.NewUser. Mongonaut does not allow for those kind of names so I made a little change in the urls.py file.

pydanny commented 9 years ago

Tests?

The reason why I bring it up is that neither myself or @garrypolley don't use this app in production right now. Tests give us more confidence when pull requests are submitted.

lchsk commented 9 years ago

Sure. I'll add some tests.

pydanny commented 9 years ago

Much appreciate @lchsk. Let me know if there is any way I can help.

lchsk commented 9 years ago

I've added two tests. One is more specific and checks whether get_document_value function returns a resolved url given input with dots inside. The second test is more general and tries to render DetailView. Hope that helps.