Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions INSTALLATIONS
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ within it; and also perform following steps:
Install django-ratings(0.3.7) : pip install django-ratings
NOTE:
(1) For more information visit - "https://github.com/dcramer/django-ratings"

Install django-passwords : pip install django-passwords


To clone "gstudio-mongokit" project (inside the virtualenv-folder):
(1) Visit - "https://github.com/gnowledge/gstudio"
Expand Down
17 changes: 15 additions & 2 deletions gnowsys-ndf/gnowsys_ndf/ndf/forms.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import datetime

from django import forms

from django_mongokit.forms import DocumentForm
from models import Node
from django.contrib.auth.forms import PasswordChangeForm, SetPasswordForm

from models import Node
from models import GSystemType

from registration.forms import RegistrationForm
from passwords.fields import PasswordField




class NodeForm(DocumentForm):

Expand All @@ -21,3 +26,11 @@ class Meta:
fields = ['name', 'member_of', 'tags']


class UserRegistrationForm(RegistrationForm):
password1 = PasswordField(label="Password")

class UserChangeform(PasswordChangeForm):
new_password1 = PasswordField(label="New password")

class UserResetform(SetPasswordForm):
new_password1 = PasswordField(label="New password")
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<table>
<form method='post' action=''>{% csrf_token %}
{{ form }}
<tr><td colspan="2"><p>Use at least one uppercase letter, one numeral, and 8 characters.</p> </td></tr>
<tr><td colspan="2"><input type="submit" class="btn btn-primary btn-large btn-block" value="{% trans "Send activation email" %}" /></td>
</form>
</table>
Expand Down
11 changes: 9 additions & 2 deletions gnowsys-ndf/gnowsys_ndf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'yourcompletegmailaddr'
EMAIL_HOST_PASSWORD = 'yourpassword'
EMAIL_HOST_USER = 'dhirusingh11@gmail.com'#'yourcompletegmailaddr'
EMAIL_HOST_PASSWORD = 'Singh2959'#'yourpassword'

PASSWORD_MIN_LENGTH = 8
PASSWORD_COMPLEXITY = { # You can ommit any or all of these for no limit for that particular set
"UPPER": 1, # Uppercase
"LOWER": 1, # Lowercase
"DIGITS": 1, # Digits
}

ADMINS = (
# ('Your Name', 'your_email@example.com'),
Expand Down
11 changes: 9 additions & 2 deletions gnowsys-ndf/gnowsys_ndf/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin

from django.contrib.auth import views as auth_views

from registration.backends.default.views import RegistrationView

from gnowsys_ndf.ndf.forms import *
admin.autodiscover()

urlpatterns = patterns('',
Expand All @@ -16,7 +18,12 @@
'email_template_name': 'registration/password_reset_email.html',
'subject_template_name':'registration/password_reset_email_subject.txt'},
name='auth_password_reset'),


url(r'^accounts/password/change/done/', auth_views.password_change_done),
url(r'^accounts/password/change/', auth_views.password_change,{'password_change_form':UserChangeform}),
url(r'^accounts/password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',auth_views.password_reset_confirm,{'set_password_form':UserResetform}),
url(r'^accounts/register/$', RegistrationView.as_view(form_class=UserRegistrationForm)),

(r'^accounts/', include('registration.backends.default.urls')),

(r'^admin/', include(admin.site.urls)),
Expand Down