diff --git a/README.rst b/README.rst index 70c4d0d3..75b899c2 100644 --- a/README.rst +++ b/README.rst @@ -4,9 +4,6 @@ Django-CRM Django CRM is opensourse CRM developed on django framework. It has all the basic features of CRM to start with. We welcome code contributions and feature requests via github. -.. image:: https://coveralls.io/repos/github/MicroPyramid/Django-CRM/badge.svg?branch=master - :target: https://coveralls.io/github/MicroPyramid/Django-CRM?branch=master - .. image:: https://landscape.io/github/MicroPyramid/Django-CRM/master/landscape.svg?style=flat :target: https://landscape.io/github/MicroPyramid/Django-CRM/master :alt: Code Health @@ -23,10 +20,19 @@ Django CRM is opensourse CRM developed on django framework. It has all the basic - Codacy - Support * - .. image:: https://travis-ci.org/MicroPyramid/Django-CRM.svg?branch=master + :target: https://travis-ci.org/MicroPyramid/Django-CRM - .. image:: https://api.codacy.com/project/badge/Grade/b11da5f09dd542479fd3bd53944595d2 + :target: https://app.codacy.com/project/ashwin/Django-CRM/dashboard + :alt: Codacy Dashboard .. image:: https://api.codacy.com/project/badge/Coverage/b11da5f09dd542479fd3bd53944595d2 + :target: https://app.codacy.com/project/ashwin/Django-CRM/dashboard + :alt: Codacy Coverage - .. image:: https://badges.gitter.im/Micropyramid/Django-CRM.png + :target: https://gitter.im/MicroPyramid/Django-CRM + :alt: Gitter .. image:: https://www.codetriage.com/micropyramid/django-crm/badges/users.svg + :target: https://www.codetriage.com/micropyramid/django-crm + :alt: Code Helpers http://django-crm.readthedocs.io for latest documentation diff --git a/common/urls.py b/common/urls.py index a7d496b5..8a9522d3 100644 --- a/common/urls.py +++ b/common/urls.py @@ -16,7 +16,7 @@ urlpatterns = [ path('login/', LoginView.as_view(), name='login'), path('forgot-password/', ForgotPasswordView.as_view(), name='forgot_password'), path('logout/', LogoutView.as_view(), name='logout'), - path('change-password/', ChangePasswordView.as_view(), name='change_pass'), + path('change-password/', ChangePasswordView.as_view(), name='change_password'), path('profile/', ProfileView.as_view(), name='profile'), # User views @@ -26,9 +26,9 @@ urlpatterns = [ path('users//view/', UserDetailView.as_view(), name='view_user'), path('users//delete/', UserDeleteView.as_view(), name='remove_user'), - url(r'^password_reset/$',auth_views.password_reset,name='password_reset'), - url(r'^passowrd-reset/done/$',auth_views.password_reset_done,name='password_reset_done'), - url(r'^reset/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', + path('password-reset/', auth_views.password_reset, name='password_reset'), + path('password-reset/done/', auth_views.password_reset_done, name='password_reset_done'), + path('reset/uidb64>//', auth_views.password_reset_confirm, name='password_reset_confirm'), - url(r'^reset/done/$', auth_views.password_reset_complete, name='password_reset_complete'), + path('reset/done/', auth_views.password_reset_complete, name='password_reset_complete'), ] diff --git a/crm/settings.py b/crm/settings.py index 095b9010..2301e053 100644 --- a/crm/settings.py +++ b/crm/settings.py @@ -128,8 +128,8 @@ EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'smtp.sendgrid.net' -EMAIL_HOST_USER = '****' -EMAIL_HOST_PASSWORD = '*******' +EMAIL_HOST_USER = os.getenv('SG_USER', '') +EMAIL_HOST_PASSWORD = os.getenv('SG_PWD', '') EMAIL_PORT = 587 EMAIL_USE_TLS = True diff --git a/crm/urls.py b/crm/urls.py index c2fa39cc..acca4931 100644 --- a/crm/urls.py +++ b/crm/urls.py @@ -4,13 +4,14 @@ from django.urls import include, path app_name = 'crm' urlpatterns = [ - path('', include('common.urls', namespace="common")), - path('accounts/', include('accounts.urls', namespace="accounts")), - path('leads/', include('leads.urls', namespace="leads")), - path('contacts/', include('contacts.urls', namespace="contacts")), - path('opportunities/', include('opportunity.urls', namespace="opportunities")), - path('cases/', include('cases.urls', namespace="cases")), - path('emails/', include('emails.urls', namespace="emails")), - # path('planner/', include('planner.urls', namespace="planner")), - path('logout/', views.logout, {'next_page': '/login/'}, name="logout"), + path('', include('common.urls', namespace="common")), + path('', include('django.contrib.auth.urls')), + path('accounts/', include('accounts.urls', namespace="accounts")), + path('leads/', include('leads.urls', namespace="leads")), + path('contacts/', include('contacts.urls', namespace="contacts")), + path('opportunities/', include('opportunity.urls', namespace="opportunities")), + path('cases/', include('cases.urls', namespace="cases")), + path('emails/', include('emails.urls', namespace="emails")), + # path('planner/', include('planner.urls', namespace="planner")), + path('logout/', views.logout, {'next_page': '/login/'}, name="logout"), ] diff --git a/requirements.txt b/requirements.txt index 1609a212..561cea91 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -Django==2.1 +Django==2.0.7 django-simple-pagination==1.1.8 pytz==2018.3 psycopg2-binary==2.7.4 diff --git a/static/css/main.scss b/static/css/main.scss index 8ac0cc15..e39555cc 100644 --- a/static/css/main.scss +++ b/static/css/main.scss @@ -67,12 +67,15 @@ a{ .form-group { margin-bottom: 15px; } + .errorlist li{ + color: red; + } label { - font-size: 12px; + font-size: 14px; color: darken($text_color2, 15%); font-weight:500; } - .form-control { + .form-control, input { color: $text_color; min-height: 40px; font-size: 13px; diff --git a/templates/base.html b/templates/base.html index 3e383b15..43ebd8e6 100644 --- a/templates/base.html +++ b/templates/base.html @@ -26,7 +26,7 @@ - + {% if request.user.is_authenticated %} + {% endif %} @@ -88,7 +89,7 @@ diff --git a/templates/change_password.html b/templates/change_password.html index f2cb15d5..8caf33a8 100644 --- a/templates/change_password.html +++ b/templates/change_password.html @@ -12,16 +12,15 @@
- {% if not user_obj %}
- +
{{ errors.CurrentPassword }} {% if error %} - {{error}} + {{ error }} {% endif %}
{% endif %} @@ -29,7 +28,7 @@
- +
{{ errors.Newpassword }}
@@ -38,7 +37,7 @@
- +
{{ errors.confirm }}
diff --git a/templates/forgot_password.html b/templates/forgot_password.html index e4268f0c..71553406 100644 --- a/templates/forgot_password.html +++ b/templates/forgot_password.html @@ -32,8 +32,7 @@
- -
Back to login Click Here?
+
Back to login Click Here?
diff --git a/templates/index.html b/templates/index.html index ea48e08e..e37dc917 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,2 +1,2 @@ {% extends 'base.html' %} -
-
Forgot Password Click Here?
+
Forgot Password Click Here?
{% if error %}

{{ message }}

{% endif %} diff --git a/templates/profile.html b/templates/profile.html index 7b15ef38..14f2dd75 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -6,7 +6,6 @@
-
diff --git a/templates/registration/base.html b/templates/registration/base.html index 17c6d6a0..715baedb 100644 --- a/templates/registration/base.html +++ b/templates/registration/base.html @@ -26,7 +26,7 @@ diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index cdfc6ae6..893bcd31 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -1,7 +1,12 @@ {% extends 'base.html' %} - {% block content %} -

- Your password has been set. You may go ahead and sign in now. -

+ {% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_confirm.html b/templates/registration/password_reset_confirm.html index 59869fa8..e836df1f 100644 --- a/templates/registration/password_reset_confirm.html +++ b/templates/registration/password_reset_confirm.html @@ -1,17 +1,24 @@ -{% extends 'registration/base.html' %} - +{% extends 'base.html' %} {% block content %} - {% if validlink %} -

Change password

-
- {% csrf_token %} - {{ form.as_p }} - -
- {% else %} -

- The password reset link was invalid, possibly because it has already been used. - Please request a new password reset. -

- {% endif %} + {% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_done.html b/templates/registration/password_reset_done.html index de0519aa..5a94627e 100644 --- a/templates/registration/password_reset_done.html +++ b/templates/registration/password_reset_done.html @@ -1,11 +1,18 @@ {% extends 'registration/base.html' %} {% block content %} -

- We've emailed you instructions for setting your password, if an account exists with the email you entered. - You should receive them shortly. -

-

- If you don't receive an email, please make sure you've entered the address you registered with, - and check your spam folder. -

+ {% endblock %} \ No newline at end of file diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html index da2c169b..041a7942 100644 --- a/templates/registration/password_reset_email.html +++ b/templates/registration/password_reset_email.html @@ -1,12 +1,9 @@ {% autoescape off %} -To initiate the password reset process for your {{ user.get_username }} TestSite Account, +To initiate the password reset process for your {{ user.get_username }} Django-CRM Account, click the link below: - {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} - If clicking the link above doesn't work, please copy and paste the URL in a new browser window instead. - Sincerely, -The TestSite Team +The Django-CRM Team {% endautoescape %} \ No newline at end of file diff --git a/templates/registration/password_reset_form.html b/templates/registration/password_reset_form.html index 2987b51a..c94af0cf 100644 --- a/templates/registration/password_reset_form.html +++ b/templates/registration/password_reset_form.html @@ -1,17 +1,16 @@ {% extends 'registration/base.html' %} {% block content %} -
-
+