Mercurial > public > src > rhodecode
changeset 271:a7608dbe47fc demo
demo version protections
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 07 Jun 2010 15:50:05 +0200 |
parents | c7ae99a25507 |
children | 083eb8277e53 |
files | pylons_app/controllers/repos.py pylons_app/controllers/users.py pylons_app/templates/login.html |
diffstat | 3 files changed, 18 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/controllers/repos.py Mon Jun 07 15:19:14 2010 +0200 +++ b/pylons_app/controllers/repos.py Mon Jun 07 15:50:05 2010 +0200 @@ -129,7 +129,8 @@ # h.form(url('repo', id=ID), # method='delete') # url('repo', id=ID) - + h.flash(_('deleted repository %s - disabled for demo :)') % id, category='success') + return redirect(url('repos')) repo_model = RepoModel() repo = repo_model.get(id) if not repo:
--- a/pylons_app/controllers/users.py Mon Jun 07 15:19:14 2010 +0200 +++ b/pylons_app/controllers/users.py Mon Jun 07 15:50:05 2010 +0200 @@ -91,6 +91,9 @@ # h.form(url('user', id=ID), # method='put') # url('user', id=ID) + h.flash(_('User updated succesfully - disabled for demo :)'), category='success') + return redirect(url('users')) + user_model = UserModel() _form = UserForm(edit=True)() try: @@ -119,6 +122,8 @@ # h.form(url('user', id=ID), # method='delete') # url('user', id=ID) + h.flash(_('sucessfully deleted user - disabled for demo :)'), category='success') + return redirect(url('users')) user_model = UserModel() try: user_model.delete(id)
--- a/pylons_app/templates/login.html Mon Jun 07 15:19:14 2010 +0200 +++ b/pylons_app/templates/login.html Mon Jun 07 15:50:05 2010 +0200 @@ -16,16 +16,25 @@ <div> <br /> <h2>${_('Login')}</h2> + Welcome to hg app demo version. This demo mimics almost full functionality<br/> + of hg app. For better user experience deleting users and repos is turned<br/> + off. As well as updates on users is turned off for demo version.<br/> + You can do pulls/pushes thru the demo app as you wish. You can<br/> + create repositories, and users. Application will be reset to the original<br/> + state once a day. All feedback pls send to:<br/> + <a href="http://www.bitbucket.org/marcinkuzminski/hg-app/issues"> + http://www.bitbucket.org/marcinkuzminski/hg-app/issues + </a> ${h.form(h.url.current())} <table> <tr> <td>${_('Username')}</td> - <td>${h.text('username')}</td> + <td>${h.text('username')} use: demo</td> <td>${self.get_form_error('username')}</td> </tr> <tr> <td>${_('Password')}</td> - <td>${h.password('password')}</td> + <td>${h.password('password')} use: demo</td> <td>${self.get_form_error('password')}</td> </tr> <tr>