diff --git a/osinaweb/addressbook/__pycache__/models.cpython-313.pyc b/osinaweb/addressbook/__pycache__/models.cpython-313.pyc index 71bea67d..989ac871 100644 Binary files a/osinaweb/addressbook/__pycache__/models.cpython-313.pyc and b/osinaweb/addressbook/__pycache__/models.cpython-313.pyc differ diff --git a/osinaweb/addressbook/models.py b/osinaweb/addressbook/models.py index 07ca58e4..e1ea4041 100644 --- a/osinaweb/addressbook/models.py +++ b/osinaweb/addressbook/models.py @@ -30,9 +30,16 @@ class AddressBook(models.Model): class Comment(models.Model): + COMMENT_TYPE_CHOICES = ( + ('Status', 'Status'), + ('DailyReport', 'DailyReport'), + ('ProspectingListItem', 'ProspectingListItem'), + ) content = models.TextField() date_added = models.DateTimeField(auto_now_add=True) added_by = models.ForeignKey(User, on_delete=models.CASCADE) + type = models.CharField(max_length=20, choices=COMMENT_TYPE_CHOICES) + type class ProspectingListItem(models.Model): diff --git a/osinaweb/customercore/__pycache__/custom_context.cpython-313.pyc b/osinaweb/customercore/__pycache__/custom_context.cpython-313.pyc index 145153e9..5f3d5ea1 100644 Binary files a/osinaweb/customercore/__pycache__/custom_context.cpython-313.pyc and b/osinaweb/customercore/__pycache__/custom_context.cpython-313.pyc differ diff --git a/osinaweb/customercore/__pycache__/urls.cpython-313.pyc b/osinaweb/customercore/__pycache__/urls.cpython-313.pyc index 117320bc..c060ac8a 100644 Binary files a/osinaweb/customercore/__pycache__/urls.cpython-313.pyc and b/osinaweb/customercore/__pycache__/urls.cpython-313.pyc differ diff --git a/osinaweb/customercore/__pycache__/views.cpython-313.pyc b/osinaweb/customercore/__pycache__/views.cpython-313.pyc index f180021f..eff5acc6 100644 Binary files a/osinaweb/customercore/__pycache__/views.cpython-313.pyc and b/osinaweb/customercore/__pycache__/views.cpython-313.pyc differ diff --git a/osinaweb/osinacore/__pycache__/custom_context.cpython-313.pyc b/osinaweb/osinacore/__pycache__/custom_context.cpython-313.pyc index f9850439..615049d5 100644 Binary files a/osinaweb/osinacore/__pycache__/custom_context.cpython-313.pyc and b/osinaweb/osinacore/__pycache__/custom_context.cpython-313.pyc differ diff --git a/osinaweb/osinacore/__pycache__/urls.cpython-313.pyc b/osinaweb/osinacore/__pycache__/urls.cpython-313.pyc index 566235df..c08a419f 100644 Binary files a/osinaweb/osinacore/__pycache__/urls.cpython-313.pyc and b/osinaweb/osinacore/__pycache__/urls.cpython-313.pyc differ diff --git a/osinaweb/osinacore/__pycache__/views.cpython-313.pyc b/osinaweb/osinacore/__pycache__/views.cpython-313.pyc index 55eb7112..0c33537d 100644 Binary files a/osinaweb/osinacore/__pycache__/views.cpython-313.pyc and b/osinaweb/osinacore/__pycache__/views.cpython-313.pyc differ diff --git a/osinaweb/osinacore/add/__pycache__/views.cpython-313.pyc b/osinaweb/osinacore/add/__pycache__/views.cpython-313.pyc index d27e2437..ef1027b5 100644 Binary files a/osinaweb/osinacore/add/__pycache__/views.cpython-313.pyc and b/osinaweb/osinacore/add/__pycache__/views.cpython-313.pyc differ diff --git a/osinaweb/osinacore/templates/login.html b/osinaweb/osinacore/templates/login.html index a50d8375..43f157b5 100644 --- a/osinaweb/osinacore/templates/login.html +++ b/osinaweb/osinacore/templates/login.html @@ -92,19 +92,6 @@
-
- - -
@@ -146,101 +133,6 @@ - -
@@ -254,7 +146,6 @@ - \ No newline at end of file diff --git a/osinaweb/osinacore/urls.py b/osinaweb/osinacore/urls.py index 20175249..167b8861 100644 --- a/osinaweb/osinacore/urls.py +++ b/osinaweb/osinacore/urls.py @@ -27,7 +27,6 @@ urlpatterns = [ path('api/', include('osinacore.api.urls')), path('login///', views.login_with_email, name='login_with_email'), path('login/', views.signin, name='signin'), - path('signup', views.signup, name='signup'), path('check-email-availability/', views.check_email_availability, name='check-email-availability'), path('activate///', views.activate, name='activate'), path('forgot-password/', views.forgot_password, name='forgot-password'), diff --git a/osinaweb/osinacore/views.py b/osinaweb/osinacore/views.py index e1dacf41..f198c89d 100644 --- a/osinaweb/osinacore/views.py +++ b/osinaweb/osinacore/views.py @@ -87,64 +87,6 @@ def signin(request): return render(request, 'login.html', {'form': form, 'next_page': next_page}) - -def signup(request): - form = CreateUserForm() - reference = Reference.objects.get(name='Osina') - if request.method == 'POST': - mobile_number = request.POST.get('mobile_number') - form = CreateUserForm(request.POST) - if form.is_valid(): - username = form.cleaned_data.get('username').lower() - email = form.cleaned_data.get('email').lower() - password = form.cleaned_data.get('password2') - user = User.objects.create_user( - username=username, - email=email, - password=password, - ) - user.first_name = form.cleaned_data['first_name'].lower().capitalize() - user.last_name = form.cleaned_data['last_name'].lower().capitalize() - user.save() - - customer = CustomerProfile.objects.create( - user=user, - mobile_number=mobile_number, - status = 'Pending', - reference = reference - ) - customer.save() - - token = default_token_generator.make_token(user) - current_site = get_current_site(request) - uid = urlsafe_base64_encode(force_bytes(user.pk)) #Encode the user id - token = token - activate_link = f"https://{current_site.domain}/activate/{uid}/{token}/" - mail_subject = 'Activate your account' - message = render_to_string('email_templates/account_activation_email.html', { - 'user': user, - 'activate_link': activate_link, - - }) - send_mail(mail_subject, message, settings.EMAIL_HOST_USER, [user.email], html_message=message) - - return render(request, 'email-confirmation-sent.html') - - else: - print('Form is not valid. Errors:') - print(form.errors) - - for field in form: - for error in field.errors: - if "A user with that username already exists." in error: - form.add_error('email', forms.ValidationError( - 'A user with this email already exists.')) - - context = {'form': form} - return render(request, 'login.html', context) - - - def activate(request, uidb64, token): try: uid = str(urlsafe_base64_decode(uidb64), 'utf-8') #Decoding the user id which was encoded in uid diff --git a/osinaweb/support/__pycache__/models.cpython-313.pyc b/osinaweb/support/__pycache__/models.cpython-313.pyc index fd63f651..f223840b 100644 Binary files a/osinaweb/support/__pycache__/models.cpython-313.pyc and b/osinaweb/support/__pycache__/models.cpython-313.pyc differ