Endpoint for retrieving subreddits to make new
users aware of without actually subscribing
them while doing the onboarding process.
The list of featured subreddits will be managed
separately from the default ones.
For testing purposes, we add a subreddit to show
up via the inject_test_data script.
This is a rewrite of much of the code related to voting. Some of the
improvements include:
- Detangling the whole process of creating and processing votes
- Creating an actual Vote class to use instead of dealing with
inconsistent ad-hoc voting data everywhere
- More consistency with naming and other similar things like vote
directions (previously had True/False/None in some places,
1/-1/0 in others, etc.)
- More flexible methods in determining and applying the effects of votes
- Improvement of modhash generation/validation
- Removing various obsolete/unnecessary code
http://pylons-webframework.readthedocs.org/en/latest/upgrading.html
This requires several code changes:
* pylons `config` option must be explicitly passed during setup
* the pylons global has been renamed from `g` to `app_globals`
* the pylons global has been renamed from `c` to `tmpl_context`
* set pylons.strict_tmpl_context = False (instead of pylons.strict_c)
* redirect_to() has been swapped for redirect()
* must implement `ErrorDocuments` middleware ourselves
pylons 1.0 also required an upgrade of routes from 1.11 to 1.12. This
required the following changes:
* set Mapper.minimization = True (the default value changed)
* set Mapper.explicit = False (the default value changed)
See http://docs.python-requests.org/en/latest/api/#migrating-to-1-x
for the rationale,
`.json()` also differs from `.json` in that it `raise`s instead of
returning `None` on a decoding error, but that shouldn't affect us
anywhere.
Conflicts:
r2/r2/lib/media.py
This new script attempts to generate some subreddits that are more like
production data. It first pulls down data from reddit.com, then uses
markov chains to generate new data for insertion into the databases.