Skip to content

Commit 97247e8

Browse files
author
Vijay
committedNov 27, 2017
Removed unknown clean up method in workshop forms
1 parent 4401e7b commit 97247e8

File tree

5 files changed

+26
-11
lines changed

5 files changed

+26
-11
lines changed
 

‎requirements/base.txt

+1
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,4 @@ PyPDF2==1.26.0
5959
# Graph
6060
django-pandas==0.4.5
6161
pandas==0.20.3
62+
numpy==1.13.3

‎settings/common.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
'footer': {
4747
'copyright': {
4848
'year': '2014-{}'.format(datetime.datetime.today().strftime('%Y')),
49-
'url': 'https://pssi.org.in/',
49+
'url': 'http://pssi.org.in/',
5050
'label': 'Python Software Society of India'
5151
},
5252
'social': [
@@ -105,7 +105,7 @@
105105
'allauth.socialaccount.providers.github',
106106
'allauth.socialaccount.providers.google',
107107
'allauth.socialaccount.providers.twitter',
108-
'djcelery',
108+
'djcelery'
109109
)
110110

111111
INSTALLED_APPS = DEFAULT_APPS + OUR_APPS + THIRD_PARTY_APPS

‎setup.cfg

+16
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,20 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,venv
44

55
[pytest]
66
DJANGO_SETTINGS_MODULE = settings.testing
7+
addopts = --reuse-db
78
norecursedirs = .tox .git */migrations/* */static/* docs venv
9+
10+
[coverage:run]
11+
source = junction/
12+
omit =
13+
*tests*
14+
*commands*
15+
*migrations*
16+
*admin*
17+
*wsgi*
18+
*conftest*
19+
*venv*
20+
21+
[coverage:report]
22+
show_missing = False
23+
skip_covered = True

‎wye/base/views.py

-2
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ def add_user_create_reset_password_link(
7272
user.is_active = True
7373
user.set_password('123456')
7474
user.save()
75-
print("After creating user")
76-
print(user.username)
7775
profile, created = Profile.objects.get_or_create(user=user)
7876
profile.usertype.add(usertype)
7977
profile.mobile = mobile

‎wye/workshops/forms.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ def __init__(self, *args, **kwargs):
4242
self.fields['comments'].required = False
4343
self.fields['comments'].widget = forms.HiddenInput()
4444

45-
def clean_location(self):
46-
if "requester" not in self.cleaned_data:
47-
return ""
45+
# def clean_location(self):
46+
# if "requester" not in self.cleaned_data:
47+
# return ""
4848

49-
organisation = self.cleaned_data['requester']
50-
return organisation.location
49+
# organisation = self.cleaned_data['requester']
50+
# return organisation.location
5151

5252
def get_organisations(self, user):
5353
if Profile.is_admin(user):
@@ -59,10 +59,10 @@ def get_organisations(self, user):
5959

6060
def clean_expected_date(self):
6161
date = self.cleaned_data['expected_date']
62-
if not (date > datetime.date.today() + datetime.timedelta(days=14)):
62+
if not (date > datetime.date.today() + datetime.timedelta(days=7)):
6363
raise ValidationError(
6464
'''Workshop request has to future date and
65-
atleast 2 weeks ahead of today''')
65+
atleast week ahead of today''')
6666
else:
6767
return date
6868

0 commit comments

Comments
 (0)