SHARE
TWEET

Cheatsheet

a guest Jul 19th, 2013 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top