10 Commits

Author SHA1 Message Date
Joshua Uziel
805a9a4b79 Onboarding: Featured subreddits API endpoint
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.
2016-06-20 16:19:37 -07:00
Brian Simpson
051a934e7c inject_test_data: Set LocalizedDefaultSubreddits. 2015-12-02 13:32:42 -08:00
Brian Simpson
91e1221d83 inject_test_data: Make sure promos subreddit exists. 2015-11-12 15:32:12 -08:00
Chad Birch
0c637151b5 Major rewrite/refactor of voting code
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
2015-11-09 17:57:42 -07:00
Brian Simpson
d990533d0b Upgrade pylons from 0.9.7 to 1.0.
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)
2015-09-15 06:35:31 -04:00
Alexander Putilin
6889236c8c Fix inject_test_data.py after changes in Link._submit 2015-09-02 12:28:59 -07:00
Jordan Milne
644f0988d7 Add a shim for requests' response.json to ease upgrading to 2.x
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
2015-05-15 13:28:44 -07:00
umbrae
03bc77b203 Beta mode: Add preference and subreddit callouts 2015-05-07 10:57:47 -07:00
Chad Birch
0fbea80d45 Integrate AutoModerator into the site 2015-03-31 14:56:19 -06:00
Neil Williams
274a8d7008 Overhaul populatedb script.
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.
2015-03-02 14:44:57 -08:00