Switch to unified view

a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py
...
...
274
            raise
274
            raise
275
        ThreadLocalORMSession.flush_all()
275
        ThreadLocalORMSession.flush_all()
276
        with h.push_config(c, project=p, user=user):
276
        with h.push_config(c, project=p, user=user):
277
            # have to add user to context, since this may occur inside auth code
277
            # have to add user to context, since this may occur inside auth code
278
            # for user-project reg, and c.user isn't set yet
278
            # for user-project reg, and c.user isn't set yet
279
            g.post_event('project-created')
279
            g.post_event('project_created')
280
        return p
280
        return p
281
281
282
    def register_subproject(self, project, name, user, install_apps):
282
    def register_subproject(self, project, name, user, install_apps):
283
        from allura import model as M
283
        from allura import model as M
284
        assert h.re_path_portion.match(name), 'Invalid subproject shortname'
284
        assert h.re_path_portion.match(name), 'Invalid subproject shortname'
...
...
295
            M.AppConfig.query.remove(dict(project_id=c.project._id))
295
            M.AppConfig.query.remove(dict(project_id=c.project._id))
296
            if install_apps:
296
            if install_apps:
297
                sp.install_app('home', 'home')
297
                sp.install_app('home', 'home')
298
                sp.install_app('admin', 'admin')
298
                sp.install_app('admin', 'admin')
299
                sp.install_app('search', 'search')
299
                sp.install_app('search', 'search')
300
            g.post_event('project-created')
300
            g.post_event('project_created')
301
        return sp
301
        return sp
302
302
303
    def delete_project(self, project, user):
303
    def delete_project(self, project, user):
304
        for sp in project.subprojects:
304
        for sp in project.subprojects:
305
            self.delete_project(sp, user)
305
            self.delete_project(sp, user)