Advertisement
Guest User

Cheatsheet

a guest
Jul 19th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. How to rename a user:
  2. from r2.models import *
  3. paster shell production.ini
  4. u = Account._by_name('original_name')
  5. u.name = 'new_name'
  6. u._commit()
  7.  
  8. How to rename a subreddit:
  9. paster shell production.ini
  10. from r2.models import *
  11. sr = Subreddit._by_name('original_name')
  12. sr.name = 'newname'
  13. sr._commit()
  14.  
  15. Flush the cache:
  16. echo flush_all | nc localhost 11211
  17.  
  18. Update subreddits:
  19. sudo start reddit-job-update_reddits
  20.  
  21. Restart everything:
  22. sudo initctl emit reddit-restart
  23.  
  24. Restart everything (and make sure templates are reloaded)
  25. sudo initctl emit reddit-stop
  26. sudo initctl emit reddit-start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement