diff --git a/oshc/main/static/main/css/app.css b/oshc/main/static/main/css/app.css
index 2765c35..fc44526 100644
--- a/oshc/main/static/main/css/app.css
+++ b/oshc/main/static/main/css/app.css
@@ -10,9 +10,14 @@
font-family: "Montserrat", sans-serif
}
+html {
+ position: relative;
+ min-height: 100%;
+}
+
body {
overflow-x: hidden;
- padding-top: 50px;
+ margin-bottom: 120px;
}
a {
@@ -44,17 +49,26 @@ a {
border-color: #24292e;
}
+.vertical-align {
+ display: block;
+ align-items: center;
+ margin: 0 auto;
+ justify-content: center;
+ float: none;
+}
+
/* SECTION ONE STARTS */
.main-section {
min-height: 70vh;
height: auto;
- padding-top: 40px;
+ padding-top: 100px;
background: white;
background-color: white;
position: relative;
clear: both;
+ width: 100%;
}
.logo-image {
@@ -145,13 +159,18 @@ a {
footer {
height: auto;
- min-height: 120px;
padding-top: 10px;
background-color: #24292e;
}
+.footer {
+ position: absolute;
+ bottom: 0;
+ width: 100%;
+ min-height: 120px;
+}
+
footer .container {
- width: 70%;
position: sticky;
display: block;
}
@@ -162,12 +181,12 @@ footer .container {
margin-top: 15px;
}
-.backToTop {
+.back-to-top {
float: right;
color: #999;
}
-.backToTop a {
+.back-to-top a {
text-decoration: none;
}
@@ -239,3 +258,117 @@ footer .container {
clear: both;
}
}
+
+/*Registration CSS starts*/
+
+.form-title {
+ color: #555;
+ font-size: 28px;
+ font-weight: 400;
+ display: block;
+}
+
+.account-wall {
+ margin-top: 20px;
+ padding: 40px 0px 20px 0px;
+ background-color: #f7f7f7;
+ -moz-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
+ -webkit-box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
+ box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.3);
+}
+
+.profile-img {
+ width: 96px;
+ height: 96px;
+ margin: 0 auto 10px;
+ display: block;
+ -moz-border-radius: 50%;
+ -webkit-border-radius: 50%;
+ border-radius: 50%;
+}
+
+.form-registration {
+ max-width: 330px;
+ padding: 15px;
+ margin: 0 auto;
+}
+
+.form-registration .field-title {
+ font-weight: 400;
+ color: #000000;
+ font-size: 14px;
+ display: block;
+}
+
+.form-registration .helptext {
+ font-weight: 400;
+ color: #607D8B;
+ font-size: 12px;
+ display: block;
+}
+
+.form-registration .form-registration-heading, .form-registration .checkbox {
+ margin-bottom: 10px;
+}
+
+.form-registration .checkbox {
+ font-weight: normal;
+}
+
+.form-registration .form-control {
+ position: relative;
+ font-size: 16px;
+ height: auto;
+ padding: 10px;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+
+.form-registration .form-control:focus {
+ z-index: 2;
+}
+
+.form-registration input[type="text"] {
+ margin-bottom: -1px;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.form-registration input[type="email"] {
+ margin-bottom: -1px;
+ border-bottom-left-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.form-registration input[type="password"] {
+ margin-bottom: 10px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+
+.forgot-password {
+ margin-top: 10px;
+}
+
+.new-account {
+ display: block;
+ margin-top: 10px;
+}
+
+.form-registration .btn {
+ background: #0275d8;
+}
+
+.form-registration p:hover {
+ color: #0275d8;
+}
+
+.form-registration button:hover {
+ background: #ffffff;
+ color: #0275d8;
+}
+
+.form-registration button:focus {
+ background: #0275d8;
+}
diff --git a/oshc/main/templates/base.html b/oshc/main/templates/base.html
index ad6b368..1ce9f32 100644
--- a/oshc/main/templates/base.html
+++ b/oshc/main/templates/base.html
@@ -1,44 +1,58 @@
{% load static %}
+
- {% include 'header.html' %}
-
- {% if site.title %}{% if title %}{{ title }} – {% endif %}{{ site.title }}{% if not title and site.subtitle %} – {{ site.subtitle }}{% endif %} {% endif %}
+ {% include 'header.html' %}
+ {% if site.title %}
+
+ {% if title %} {{ title }} – {% endif %} {{ site.title }} {% if not title and site.subtitle %} – {{ site.subtitle }} {% endif %}
+
+ {% endif %}
+
-
-
-
+
+
+
-
- {% block content %}{% endblock %}
- {% block footer %}
-
+
+ {% endblock %}
-
-
-
+
+
+
+
diff --git a/oshc/main/templates/header.html b/oshc/main/templates/header.html
index 7d7b59f..d4eff5d 100644
--- a/oshc/main/templates/header.html
+++ b/oshc/main/templates/header.html
@@ -1,11 +1,11 @@
{% load static %}
-
-{% if site.author %} {% endif %}
-{% if site.description %} {% endif %}
+ {% if site.author %}
+ {% endif %} {% if site.description %}
+ {% endif %}
-
+
-
+
diff --git a/oshc/main/templates/index.html b/oshc/main/templates/index.html
index 9226ea3..9530c0b 100644
--- a/oshc/main/templates/index.html
+++ b/oshc/main/templates/index.html
@@ -1,79 +1,78 @@
-{% extends 'base.html' %}
-{% load static %}
-{% block content %}
-
-
-
-
-
Open Source Help Community
-
A Virtual Platform To Help People To Start Contributing To Open Source Projects
-
+{% extends 'base.html' %} {% load static %} {% block content %}
+
+
+
+
+
Open Source Help Community
+
A Virtual Platform To Help People To Start Contributing To Open Source Projects
-
+
+
-
-
-
Our Mission
-
- " Open Source Help Community is an a virtual platform to help people to start contributing to open source projects"
-
-
- OSHC is established with the idea in mind to reach those people who are interested in contributing to open source projects but find it difficult. OSHC organizes sessions with open source projects contributors and publishes material which will be useful for people to get started with contributing to open source projects.
-
-
-
- If you would like to share your thoughts or your journey with us, have ideas to make this great, or have questions, please get in touch at opensourcehelpcommunity@gmail.com
-
-
-
+
+
+
Our Mission
+
+ " Open Source Help Community is an a virtual platform to help people to start contributing to open source projects"
+
+
+ OSHC is established with the idea in mind to reach those people who are interested in contributing to open source projects but find it difficult. OSHC organizes sessions with open source projects contributors and publishes material which will be useful
+ for people to get started with contributing to open source projects.
+
+
+
+ If you would like to share your thoughts or your journey with us, have ideas to make this great, or have questions, please get in touch at opensourcehelpcommunity@gmail.com
+
+
+
-
-
-
Upcoming Sessions
+
+
+
Upcoming Sessions
-
-
-
-
-
Open Source Contributor's Chat Session with Himanshu Mishra
-
-
-
Himanshu is a pre-final year undergraduate student at IIT Kharagpur. He has been a Google Summer of Code student in 2015 and 2016 and is currently a mentor in Python Software Foundation.
-
-
Date: Wed, June 21, 2017 8:30 PM – 9:30 PM IST
-
-
+
+
+
+
+
Open Source Contributor's Chat Session with Himanshu Mishra
+
+
+
Himanshu is a pre-final year undergraduate student at IIT Kharagpur. He has been a Google Summer of Code student in 2015 and 2016 and is currently a mentor in Python Software Foundation.
+
+
Date: Wed, June 21, 2017 8:30 PM – 9:30 PM IST
+
+
Register Now!
-
-
-
-
Open Source Contributor's Chat Session with Joannah Nanjekye
-
-
-
Joannah Nanjekye is a software engineer that graduated from Makerere University in Uganda with a Bachelor of Science Degree in software Engineering.
-
-
Sat, July 8, 2017 5:30 PM – 6:30 PM IST
-
-
+
+
+
+
Open Source Contributor's Chat Session with Joannah Nanjekye
+
+
+
Joannah Nanjekye is a software engineer that graduated from Makerere University in Uganda with a Bachelor of Science Degree in software Engineering.
+
+
Sat, July 8, 2017 5:30 PM – 6:30 PM IST
+
+
Register Now!
-
+
-
-
-
+
+
{% endblock %}
diff --git a/oshc/main/templates/registration/login.html b/oshc/main/templates/registration/login.html
new file mode 100644
index 0000000..ebdb911
--- /dev/null
+++ b/oshc/main/templates/registration/login.html
@@ -0,0 +1,35 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/logout.html b/oshc/main/templates/registration/logout.html
new file mode 100644
index 0000000..0ffbd67
--- /dev/null
+++ b/oshc/main/templates/registration/logout.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+
{% trans "Logged out" %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/password_reset_complete.html b/oshc/main/templates/registration/password_reset_complete.html
new file mode 100644
index 0000000..c388f87
--- /dev/null
+++ b/oshc/main/templates/registration/password_reset_complete.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/password_reset_confirm.html b/oshc/main/templates/registration/password_reset_confirm.html
new file mode 100644
index 0000000..9188ab0
--- /dev/null
+++ b/oshc/main/templates/registration/password_reset_confirm.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+ {% if validlink %}
+
+ {% else %}
+
{% trans "Password reset failed" %}
+ {% endif %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/password_reset_done.html b/oshc/main/templates/registration/password_reset_done.html
new file mode 100644
index 0000000..a7a1a50
--- /dev/null
+++ b/oshc/main/templates/registration/password_reset_done.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+
{% trans "Email with password reset instructions has been sent." %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/password_reset_email.html b/oshc/main/templates/registration/password_reset_email.html
new file mode 100644
index 0000000..4628011
--- /dev/null
+++ b/oshc/main/templates/registration/password_reset_email.html
@@ -0,0 +1,5 @@
+{% load i18n %}
+{% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}:
+{% block reset_link %}
+ {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %}
+{% endblock %}
diff --git a/oshc/main/templates/registration/password_reset_form.html b/oshc/main/templates/registration/password_reset_form.html
new file mode 100644
index 0000000..11bcda4
--- /dev/null
+++ b/oshc/main/templates/registration/password_reset_form.html
@@ -0,0 +1,25 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+
+
+
{% trans 'Forgot Password' %}
+
+
+
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/registration_closed.html b/oshc/main/templates/registration/registration_closed.html
new file mode 100644
index 0000000..2ef839c
--- /dev/null
+++ b/oshc/main/templates/registration/registration_closed.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+
{% trans "Registration is currently closed." %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/registration_complete.html b/oshc/main/templates/registration/registration_complete.html
new file mode 100644
index 0000000..b102cf7
--- /dev/null
+++ b/oshc/main/templates/registration/registration_complete.html
@@ -0,0 +1,9 @@
+{% extends "base.html" %}
+{% load i18n %}
+{% block content %}
+
+
+
{% trans "You are now registered. Activation email sent." %}
+
+
+{% endblock %}
diff --git a/oshc/main/templates/registration/registration_form.html b/oshc/main/templates/registration/registration_form.html
new file mode 100644
index 0000000..e971995
--- /dev/null
+++ b/oshc/main/templates/registration/registration_form.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+{% load i18n %}
+x{% block content %}
+
+
+
+
+
{% trans 'Sign Up Here' %}
+
+
+
+
+
+{% endblock %}
diff --git a/oshc/oshc/settings.py b/oshc/oshc/settings.py
index 8daf95c..52c2541 100644
--- a/oshc/oshc/settings.py
+++ b/oshc/oshc/settings.py
@@ -10,8 +10,8 @@
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
-BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
@@ -24,7 +24,6 @@
ALLOWED_HOSTS = ['*']
-
# Application definition
INSTALLED_APPS = (
@@ -35,6 +34,7 @@
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'registration',
)
MIDDLEWARE_CLASSES = (
@@ -77,6 +77,20 @@
}
}
+# If True, users can register
+REGISTRATION_OPEN = True
+# One-week activation window; you may, of course, use a different value.
+ACCOUNT_ACTIVATION_DAYS = 7
+# If True, the user will be automatically logged in.
+REGISTRATION_AUTO_LOGIN = True
+# If true, email will be sent as HTML
+# REGISTRATION_EMAIL_HTML = True
+# The page you want users to arrive at after they successfully log in
+# The page users are directed to if they are not logged in,
+LOGIN_REDIRECT_URL = 'home'
+# and are trying to access pages requiring authentication
+LOGIN_URL = '/accounts/login/'
+
# Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/
diff --git a/oshc/oshc/urls.py b/oshc/oshc/urls.py
index c72008a..3adcfe4 100644
--- a/oshc/oshc/urls.py
+++ b/oshc/oshc/urls.py
@@ -4,4 +4,5 @@
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', include('main.urls')),
+ url(r'^accounts/', include('registration.backends.simple.urls')),
]
diff --git a/requirements.txt b/requirements.txt
index 89d5bdb..da31fca 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -2,3 +2,4 @@ Django==1.11.2
gunicorn==19.7.1
pytz==2017.2
whitenoise==3.3.0
+django-registration-redux==1.6