One url pattern for two models in Django
问题 Is it possible to have one url pattern for two models in Django? I have two models: Game and Category and I want one url pattern for both of these: ios-games/category_name and ios-games/game_name So category pattern should go first and if slug is not there, it should check game pattern. Is it possible to do without creating one big view for both these models? Unfortunately, order of paths in url.py doesn't work, if it can't find object in the first pattern it won't go looking further... 回答1: