Open Kajol-Kumari opened 4 years ago
Hi @Kajol-Kumari, can I work on this as a part of OSH?
Hey @shreyagupta30 please go ahead with this issue.
Hey @shreyagupta30 can you please provide the update on your work progress for this issue.
can you assign me this task
Hey @shreyagupta30 can you please provide the update on your work progress for this issue.
I am working on it, will be able to land a PR in a day or two.
I am willing to work and solve this issue. Please assign me the same
How's the PR going? @shreyagupta30
@vj-codes can you assign me this issue?
Unassigning @shreyagupta30 as I haven't heard back for quite a while. @KapilBansal320 I am assigning it to you as I can see you don't have any issue on you plate as of now and @sujal111 please complete your assigned issue.
Thanks, @Kajol-Kumari I will make a pull request soon.
Hi, @Kajol-Kumari After setting up, I try to register as an Admin but got this error:
Can you please tell me where I got wrong
Here is the full traceback that I got:
Environment:
Request Method: POST
Request URL: http://localhost:8000/en-us/registration/signup_administrator/
Django Version: 2.0
Python Version: 3.8.2
Installed Applications:
('authentication',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'administrator',
'event',
'home',
'job',
'organization',
'registration',
'shift',
'volunteer',
'cities_light',
'pom',
'rest_framework',
'easy_pdf',
'vms')
Installed Middleware:
['django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
35. response = get_response(request)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
128. response = self.process_exception_by_middleware(e, request)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
126. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/views/generic/base.py" in view
69. return self.dispatch(request, *args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/utils/decorators.py" in _wrapper
62. return bound_func(*args, **kwargs)
File "/home/kapil/Development/ANITA-B/vms/vms/registration/utils.py" in wrapper
14. return func(request, *args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/utils/decorators.py" in bound_func
58. return func.__get__(self, type(self))(*args2, **kwargs2)
File "/home/kapil/Development/ANITA-B/vms/vms/registration/views.py" in dispatch
49. return super(AdministratorSignupView, self).dispatch(*args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/views/generic/base.py" in dispatch
89. return handler(request, *args, **kwargs)
File "/home/kapil/Development/ANITA-B/vms/vms/registration/views.py" in post
105. admin_city = City.objects.get(pk=admin_city_name)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/manager.py" in manager_method
82. return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/query.py" in get
394. clone = self.filter(*args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/query.py" in filter
836. return self._filter_or_exclude(False, *args, **kwargs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/query.py" in _filter_or_exclude
854. clone.query.add_q(Q(*args, **kwargs))
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/sql/query.py" in add_q
1252. clause, _ = self._add_q(q_object, self.used_aliases)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/sql/query.py" in _add_q
1273. child_clause, needed_inner = self.build_filter(
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/sql/query.py" in build_filter
1214. condition = self.build_lookup(lookups, col, value)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/sql/query.py" in build_lookup
1084. lookup = lookup_class(lhs, rhs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/lookups.py" in __init__
18. self.rhs = self.get_prep_lookup()
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/lookups.py" in get_prep_lookup
68. return self.lhs.output_field.get_prep_value(self.rhs)
File "/home/kapil/Development/ANITA-B/source_vms/lib/python3.8/site-packages/django/db/models/fields/__init__.py" in get_prep_value
947. return int(value)
Exception Type: ValueError at /en-us/registration/signup_administrator/
Exception Value: invalid literal for int() with base 10: 'New Delhi'
From what I grasp, whatever you enter as "New Delhi" in the form is actually expecting a integer.
@SanketDG but form provides me with a drop down menu only.
I will open an issue for this too soon
@KapilBansal320 can please verify once if it's working for other cities listed in the dropdown?
@Kajol-Kumari issue arises for other cities as well.
Opened an issue for this at #1121
@Kajol-Kumari @vj-codes can you provide me with a way to solve this. As libraries like django-cities-light and django-easy-pdf don't support Django 3 yet.
Or should I search for their alternatives now.
Yes, django-cities-light
is in sad state of affairs, please try to look for alternatives.
At first, I am testing this repositories to find for bugs and to understand it better. Please look at issues opened by me too.
Unassigning at this moment. Will look into this if I found better alternatives.
Description
Currently we are using Django 2.0 which is quite outdated
Acceptance Criteria
Update
Definition of Done
Estimation
8-10 hours