mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
6 hour minimum for craigslist
This commit is contained in:
parent
4c02f0fa7a
commit
27096549a9
5 changed files with 23 additions and 14 deletions
|
@ -184,19 +184,21 @@ def login(request):
|
||||||
@render_to('accounts/signup.html')
|
@render_to('accounts/signup.html')
|
||||||
def signup(request):
|
def signup(request):
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
signup_form = SignupForm(request.POST, prefix='signup')
|
if settings.ENFORCE_SIGNUP_CAPTCHA:
|
||||||
return {
|
signup_form = SignupForm(request.POST, prefix='signup')
|
||||||
"form": signup_form
|
return {
|
||||||
}
|
"form": signup_form
|
||||||
# form = SignupForm(prefix='signup', data=request.POST)
|
}
|
||||||
# if form.is_valid():
|
|
||||||
# new_user = form.save()
|
form = SignupForm(prefix='signup', data=request.POST)
|
||||||
# login_user(request, new_user)
|
if form.is_valid():
|
||||||
# logging.user(new_user, "~FG~SB~BBNEW SIGNUP: ~FW%s" % new_user.email)
|
new_user = form.save()
|
||||||
# if not new_user.is_active:
|
login_user(request, new_user)
|
||||||
# url = "https://%s%s" % (Site.objects.get_current().domain,
|
logging.user(new_user, "~FG~SB~BBNEW SIGNUP: ~FW%s" % new_user.email)
|
||||||
# reverse('stripe-form'))
|
if not new_user.is_active:
|
||||||
# return HttpResponseRedirect(url)
|
url = "https://%s%s" % (Site.objects.get_current().domain,
|
||||||
|
reverse('stripe-form'))
|
||||||
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
return index(request)
|
return index(request)
|
||||||
|
|
||||||
|
|
|
@ -2152,7 +2152,11 @@ class Feed(models.Model):
|
||||||
if len(fetch_history['push_history']):
|
if len(fetch_history['push_history']):
|
||||||
total = total * 12
|
total = total * 12
|
||||||
|
|
||||||
# 3 hour max for premiums, 48 hour max for free
|
# Craigslist feeds get 6 hours minimum
|
||||||
|
if 'craigslist' in self.feed_address:
|
||||||
|
total = max(total, 60*6)
|
||||||
|
|
||||||
|
# 4 hour max for premiums, 48 hour max for free
|
||||||
if subs >= 1:
|
if subs >= 1:
|
||||||
total = min(total, 60*4*1)
|
total = min(total, 60*4*1)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -24,6 +24,7 @@ MEDIA_URL = '/media/'
|
||||||
SECRET_KEY = 'YOUR SECRET KEY'
|
SECRET_KEY = 'YOUR SECRET KEY'
|
||||||
AUTO_PREMIUM_NEW_USERS = True
|
AUTO_PREMIUM_NEW_USERS = True
|
||||||
AUTO_ENABLE_NEW_USERS = True
|
AUTO_ENABLE_NEW_USERS = True
|
||||||
|
ENFORCE_SIGNUP_CAPTCHA = False
|
||||||
|
|
||||||
CACHES = {
|
CACHES = {
|
||||||
'default': {
|
'default': {
|
||||||
|
|
|
@ -24,6 +24,7 @@ MEDIA_URL = '/media/'
|
||||||
SECRET_KEY = 'YOUR SECRET KEY'
|
SECRET_KEY = 'YOUR SECRET KEY'
|
||||||
AUTO_PREMIUM_NEW_USERS = True
|
AUTO_PREMIUM_NEW_USERS = True
|
||||||
AUTO_ENABLE_NEW_USERS = True
|
AUTO_ENABLE_NEW_USERS = True
|
||||||
|
ENFORCE_SIGNUP_CAPTCHA = False
|
||||||
|
|
||||||
# CACHE_BACKEND = 'dummy:///'
|
# CACHE_BACKEND = 'dummy:///'
|
||||||
# CACHE_BACKEND = 'locmem:///'
|
# CACHE_BACKEND = 'locmem:///'
|
||||||
|
|
|
@ -80,6 +80,7 @@ HOMEPAGE_USERNAME = 'popular'
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
AUTO_PREMIUM_NEW_USERS = False
|
AUTO_PREMIUM_NEW_USERS = False
|
||||||
AUTO_ENABLE_NEW_USERS = True
|
AUTO_ENABLE_NEW_USERS = True
|
||||||
|
ENFORCE_SIGNUP_CAPTCHA = True
|
||||||
PAYPAL_TEST = False
|
PAYPAL_TEST = False
|
||||||
|
|
||||||
# Uncomment below to force all feeds to store this many stories. Default is to cut
|
# Uncomment below to force all feeds to store this many stories. Default is to cut
|
||||||
|
|
Loading…
Add table
Reference in a new issue