Commit 2d136ca3 authored by David Haynes's avatar David Haynes 🙆
Browse files

Merge branch 'nocaptcha' into 'master'

I'm not sure why we have a CAPTCHA when the user needs to be logged in



See merge request !20
parents 452c5ef8 dbe96439
......@@ -144,7 +144,6 @@ to create an admin account, using the same username and email as you'll access t
(If you accidentally skip this step, you can run python manage.py shell and edit your user from there. Select your user, and set .is_staff and .is_superuser to True, then save.)
Be sure to uncomment line 46 from models.py as well in order to allow short urls to be generated.
Finally, within 'go/go' run:
......@@ -188,8 +187,3 @@ expirelinks command regularly. A sample cron script is available in the
repository and is named go-cleanlinks.cron. Drop this in cron.hourly and
change the paths so that they point to the virtualenv activate script and
manage.py.
# Troubleshooting
If your CAPTCHA is messing up, try checking that your system has `libfreetype6-dev` installed. If not, install it and remove + reinstall `pillow` in your virtual environment.
from django import forms
from go.models import URL, RegisteredUser
from django.core.exceptions import ValidationError
from captcha.fields import CaptchaField
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Fieldset, Submit, HTML, Div, Field
from crispy_forms.bootstrap import StrictButton, PrependedText, Accordion, AccordionGroup
......@@ -167,7 +166,6 @@ class SignupForm(forms.ModelForm):
widget=forms.Textarea(attrs={
}),
)
captcha = CaptchaField()
class Meta:
model = RegisteredUser
......
......@@ -102,25 +102,6 @@ Go - Signup
</div>
</div>
{% if form.captcha.errors %}
<div class="form-group has-error">
{% else %}
<div class="form-group">
{% endif %}
<div class="col-md-4">
<label class="control-label" for="{{ form.captcha.id_for_label }}">
{{ form.captcha.label }}</label>
</div>
<div class="col-md-8">
{{ form.captcha }}
{% for error in form.captcha.errors %}
<span class="help-block">{{error}}</span>
{% endfor %}
</div>
</div>
<div class="form-group">
<div class="col-md-12">
<input type="submit" value="Submit"
......
......@@ -100,7 +100,6 @@ INSTALLED_APPS = (
'piwik',
'django.contrib.admin',
'qrcode',
'captcha',
'crispy_forms',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
......
......@@ -57,8 +57,3 @@ urlpatterns += [
url(r'^(?P<short>\w+)$', go.views.redirection, name='redirection'),
]
urlpatterns += [
# Captcha support
url(r'^captcha/', include('captcha.urls')),
]
......@@ -3,7 +3,6 @@ django-auth-ldap==1.2.7
django-crispy-forms==1.6.0
django-piwik==0.1
django-qrcode==0.3
django-simple-captcha==0.5.1
flake8==2.5.1
git+https://github.com/kstateome/django-cas.git
gunicorn==19.4.5
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment