From 9522ba59facbf54273027ec7ef9f8429e59bf43c Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:48:37 +0530 Subject: [PATCH 01/33] Add files via upload --- forms.py | 8 ++++++++ test.py | 12 ++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 forms.py create mode 100644 test.py diff --git a/forms.py b/forms.py new file mode 100644 index 0000000..c5ee927 --- /dev/null +++ b/forms.py @@ -0,0 +1,8 @@ +from flask_wtf import FlaskForm +from wtforms import StringField,PasswordField,SubmitField + +class register(FlaskForm): + roll_no=StringField(label='Rollno') + password1=StringField(label='Password') + login=SubmitField(label='Login') + \ No newline at end of file diff --git a/test.py b/test.py new file mode 100644 index 0000000..4b6573a --- /dev/null +++ b/test.py @@ -0,0 +1,12 @@ +from flask import Flask,render_template +from forms import register +app = Flask(__name__) +app.config['SECRET_KEY']='265ace69ca3210b6295e4b3f' + + +@app.route('/') +@app.route('/login') +def home(): + form=register() + return render_template('login.html',form=form) + From be4d13fe700f554bc3740fca06880867ee723d78 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:49:31 +0530 Subject: [PATCH 02/33] Create base.html --- templates/base.html | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 templates/base.html diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..5f7627e --- /dev/null +++ b/templates/base.html @@ -0,0 +1,47 @@ + + + + + + + + + {% block title%} + {%endblock%} + + + + + + + + {%block content%}{%endblock%} + + + + + + + + + + + + + + From 93d3b740935d7f3d74419192448f67c6fa72c91b Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:49:49 +0530 Subject: [PATCH 03/33] Add files via upload --- templates/login.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 templates/login.html diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..0ab878d --- /dev/null +++ b/templates/login.html @@ -0,0 +1,33 @@ +{% extends 'base.html'%} +{% block title %} +Register Page +{% endblock %} + +{% block content %} + + +
+
+ +
+
+

+ Login to your Account +

+
+ {{ form.roll_no.label() }} + {{ form.roll_no(class="form-control", placeholder="Rollno") }} + + {{ form.password1.label() }} + {{ form.password1(class="form-control",type="password", placeholder="Password",) }} +
+ {{ form.login(class="btn btn-lg btn-block btn-primary") }} + + + + +
+
+ + +{% endblock %} \ No newline at end of file From f9c83c728c42c2566581ad6531e9660740d4895f Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:50:28 +0530 Subject: [PATCH 04/33] Create forms.py --- login_page/forms.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 login_page/forms.py diff --git a/login_page/forms.py b/login_page/forms.py new file mode 100644 index 0000000..f2f47c8 --- /dev/null +++ b/login_page/forms.py @@ -0,0 +1,8 @@ +from flask_wtf import FlaskForm +from wtforms import StringField,PasswordField,SubmitField + +class register(FlaskForm): + roll_no=StringField(label='Rollno') + password1=StringField(label='Password') + login=SubmitField(label='Login') + From 49d36253190c462e0607dcbce1bd1671915bee23 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:51:03 +0530 Subject: [PATCH 05/33] Create run.py --- login_page/run.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 login_page/run.py diff --git a/login_page/run.py b/login_page/run.py new file mode 100644 index 0000000..690df03 --- /dev/null +++ b/login_page/run.py @@ -0,0 +1,12 @@ +from flask import Flask,render_template +from forms import register +app = Flask(__name__) +app.config['SECRET_KEY']='265ace69ca3210b6295e4b3f' + + +@app.route('/') +@app.route('/login') +def home(): + form=register() + return render_template('login.html',form=form) + From 921bafec9e7be23f993922b0276299828f643138 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:51:38 +0530 Subject: [PATCH 06/33] Delete forms.py --- forms.py | 8 -------- 1 file changed, 8 deletions(-) delete mode 100644 forms.py diff --git a/forms.py b/forms.py deleted file mode 100644 index c5ee927..0000000 --- a/forms.py +++ /dev/null @@ -1,8 +0,0 @@ -from flask_wtf import FlaskForm -from wtforms import StringField,PasswordField,SubmitField - -class register(FlaskForm): - roll_no=StringField(label='Rollno') - password1=StringField(label='Password') - login=SubmitField(label='Login') - \ No newline at end of file From 29a9fa22b7b30e4954a558c32503ca2053ce290d Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:51:46 +0530 Subject: [PATCH 07/33] Delete test.py --- test.py | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 test.py diff --git a/test.py b/test.py deleted file mode 100644 index 4b6573a..0000000 --- a/test.py +++ /dev/null @@ -1,12 +0,0 @@ -from flask import Flask,render_template -from forms import register -app = Flask(__name__) -app.config['SECRET_KEY']='265ace69ca3210b6295e4b3f' - - -@app.route('/') -@app.route('/login') -def home(): - form=register() - return render_template('login.html',form=form) - From e793c2a43961ccd76ad89ba35d9b441b88ff4cd2 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:53:56 +0530 Subject: [PATCH 08/33] Create base.html --- login_page/templates/base.html | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 login_page/templates/base.html diff --git a/login_page/templates/base.html b/login_page/templates/base.html new file mode 100644 index 0000000..5f7627e --- /dev/null +++ b/login_page/templates/base.html @@ -0,0 +1,47 @@ + + + + + + + + + {% block title%} + {%endblock%} + + + + + + + + {%block content%}{%endblock%} + + + + + + + + + + + + + + From a0c088d0de462621d433d8c995d3ba5559c0b07d Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:54:13 +0530 Subject: [PATCH 09/33] Add files via upload --- login_page/templates/login.html | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 login_page/templates/login.html diff --git a/login_page/templates/login.html b/login_page/templates/login.html new file mode 100644 index 0000000..0ab878d --- /dev/null +++ b/login_page/templates/login.html @@ -0,0 +1,33 @@ +{% extends 'base.html'%} +{% block title %} +Register Page +{% endblock %} + +{% block content %} + + +
+
+ +
+
+

+ Login to your Account +

+
+ {{ form.roll_no.label() }} + {{ form.roll_no(class="form-control", placeholder="Rollno") }} + + {{ form.password1.label() }} + {{ form.password1(class="form-control",type="password", placeholder="Password",) }} +
+ {{ form.login(class="btn btn-lg btn-block btn-primary") }} + + + + +
+
+ + +{% endblock %} \ No newline at end of file From 9a37e599b4bd872cbb7639f386f3c11e81735e38 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 11:54:28 +0530 Subject: [PATCH 10/33] Delete templates directory --- templates/base.html | 47 -------------------------------------------- templates/login.html | 33 ------------------------------- 2 files changed, 80 deletions(-) delete mode 100644 templates/base.html delete mode 100644 templates/login.html diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index 5f7627e..0000000 --- a/templates/base.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - {% block title%} - {%endblock%} - - - - - - - - {%block content%}{%endblock%} - - - - - - - - - - - - - - diff --git a/templates/login.html b/templates/login.html deleted file mode 100644 index 0ab878d..0000000 --- a/templates/login.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends 'base.html'%} -{% block title %} -Register Page -{% endblock %} - -{% block content %} - - -
-
- -
-
-

- Login to your Account -

-
- {{ form.roll_no.label() }} - {{ form.roll_no(class="form-control", placeholder="Rollno") }} - - {{ form.password1.label() }} - {{ form.password1(class="form-control",type="password", placeholder="Password",) }} -
- {{ form.login(class="btn btn-lg btn-block btn-primary") }} - - - - -
-
- - -{% endblock %} \ No newline at end of file From f73b973fe4dab7b7ca4e290e89e64640a6f0a040 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 18:49:15 +0800 Subject: [PATCH 11/33] Create student_login.html --- login_page/templates/student_login.html | 132 ++++++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 login_page/templates/student_login.html diff --git a/login_page/templates/student_login.html b/login_page/templates/student_login.html new file mode 100644 index 0000000..4cd44d6 --- /dev/null +++ b/login_page/templates/student_login.html @@ -0,0 +1,132 @@ + + + + + + + Bootstrap Site + + + + + + + +
+

Your profile :

+
+
+
+
+ + +
+ Required +
+
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + +
+
+ + +
+ +
+
+ + +
+ Required +
+
+
+ +
+
+ + + + From 88c80f5b84c52386c658da63486341dd1e596c28 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:02:13 +0800 Subject: [PATCH 12/33] Update student_login.html --- login_page/templates/student_login.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/login_page/templates/student_login.html b/login_page/templates/student_login.html index 4cd44d6..df93ea2 100644 --- a/login_page/templates/student_login.html +++ b/login_page/templates/student_login.html @@ -122,6 +122,14 @@

Your profile :

Required +
+ + +
+ Required +
+
+ From 1c8928314a5551049032c5a6ead41d7f6e9c90fe Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Fri, 1 Apr 2022 16:51:33 +0530 Subject: [PATCH 13/33] Update student_login.html --- login_page/templates/student_login.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login_page/templates/student_login.html b/login_page/templates/student_login.html index df93ea2..df3997a 100644 --- a/login_page/templates/student_login.html +++ b/login_page/templates/student_login.html @@ -18,7 +18,7 @@
-

Your profile :

+

Student profile :

From 8017750913fe7950767334ed9cc63df7ddc455fe Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:23:54 +0800 Subject: [PATCH 14/33] Create Faculty_login.html --- login_page/templates/Faculty_login.html | 107 ++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 login_page/templates/Faculty_login.html diff --git a/login_page/templates/Faculty_login.html b/login_page/templates/Faculty_login.html new file mode 100644 index 0000000..d7fa29b --- /dev/null +++ b/login_page/templates/Faculty_login.html @@ -0,0 +1,107 @@ + + + + + + + Bootstrap Site + + + + + + + +
+

Faculty profile :

+
+
+ +
+ + +
+ Required +
+
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+ Required +
+
+
+ + +
+ Required +
+
+ + +
+
+
+ + From 38e35b980981cd8179b7ed51911f8de9f8f516ed Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:48:56 +0800 Subject: [PATCH 15/33] Update student_login.html --- login_page/templates/student_login.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/login_page/templates/student_login.html b/login_page/templates/student_login.html index df3997a..e14b1e3 100644 --- a/login_page/templates/student_login.html +++ b/login_page/templates/student_login.html @@ -18,7 +18,7 @@
-

Student profile :

+

Your profile :

@@ -69,13 +69,6 @@

Student profile :

-
- - -
- Required -
-
From 0f93186a00d1eb8a50c062a420f8f7262eb0bd3d Mon Sep 17 00:00:00 2001 From: sanjay0001 <75019244+sanjay0001@users.noreply.github.com> Date: Fri, 1 Apr 2022 17:20:40 +0530 Subject: [PATCH 16/33] Update README.md --- README.md | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b90c14f..91d66d4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,40 @@ # Connection_Web_App -This app acts as a connecting bridge between juniors, seniors and faculties for their respective institution. +Problem Description: + After 12 th standard, many of the students would join colleges. When they enter into college, Majority of them don’t know what are the things they should do or +shouldn’t do in college. For example, a first-year student doesn’t know about how to prepare himself for the industry and he/she also don’t know what are +the things to do for higher studies and the problem goes on. Every first-year student has many doubts on many topics. when time goes on, they slowly came to know about their need, what to do and how to prepare. At this time, they probably in 3 rd year.so they almost wasted huge amount of time in unnecessary +things and activities. + Connection web app aims at tackling the above issues and providing a seamlessly integrated, web-based questioning and answering application that enables the students to put a question or doubts on the web app and any student (probably seniors) or faculty of the institution can give the solution or answer for the question or doubt. + +Use Cases: +User – Put questions or doubts +User – Answer questions or doubts +User – Read questions and answers +User – Share their experience on college, the mistakes they made, the thing +they learned and etc., + +Description of the software solution: + Connection is the web-based application that enables college students to ask their doubts (related to college, carrier, courses, placement preparation and +etc.,) and senior students or faculty members can give solution for the problem the student face. This web app act as a connection bridge between junior +students, senior students and faculty members. This application can only usable by same college students (As of now this application will be only available for +Rajalakshmi engineering college students) + +Enhancement Requests: +1. User Profile +Users can have profile, that profile shows their resignation for faculties and +details (Roll Number, Name, year, department) for students. + +Functional Requirements: +1. User Registration +User must be able to register for the application through a valid email id. On +using the application for the first time, user must create a profile. +2. Post question or doubts +User can able to post questions on the application. +3. Answer questions and doubts +User can able to answer the questions. One question can have multiple +solutions. +4. View questions and their answers +When user enter into the application, the application feed some questions +and respective answer to the user. +5. Search questions +User can search questions and find respective answers. From 34319d5e4482f5f8890bcc41b4f414fc5d82a4e5 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:57:34 +0800 Subject: [PATCH 17/33] Create front_page.html --- main_template/front_page.html | 133 ++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 main_template/front_page.html diff --git a/main_template/front_page.html b/main_template/front_page.html new file mode 100644 index 0000000..db61470 --- /dev/null +++ b/main_template/front_page.html @@ -0,0 +1,133 @@ + + + + + + + Bootstrap Site + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+

:-selvendran

+
Card subtitle
+

Some quick example text to build on the card title and make up the bulk of + the card's content.

+ + +
+ + +
+ +
    +
    +
  • its a very easy answer so i will not answer
  • + + +
    + +
+ +
+
+
+
+
+ + + + + + + + + + + + From 05842779001820bc8b20f9152e6c8f90ede74c2c Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Fri, 1 Apr 2022 19:58:48 +0800 Subject: [PATCH 18/33] Create edit_page.html --- main_template/edit_page.html | 188 +++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 main_template/edit_page.html diff --git a/main_template/edit_page.html b/main_template/edit_page.html new file mode 100644 index 0000000..8bbb117 --- /dev/null +++ b/main_template/edit_page.html @@ -0,0 +1,188 @@ + + + + + + + Bootstrap Site + + + + + + + + + + + + +
+ +
+

Edit personal info :

+
+
+ + +
+ + +
+ +
+ + +
+ Required +
+
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + +
+
+ + +
+ + +
+ + +
+
+
+
+ + + From 0e638d22cf1e151d2b4efa100ddc95433e5f7180 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Sat, 2 Apr 2022 00:50:34 +0800 Subject: [PATCH 19/33] Create AddQuestion.html --- main_template/AddQuestion.html | 105 +++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 main_template/AddQuestion.html diff --git a/main_template/AddQuestion.html b/main_template/AddQuestion.html new file mode 100644 index 0000000..827cc9d --- /dev/null +++ b/main_template/AddQuestion.html @@ -0,0 +1,105 @@ + + + + + + + AddQuesion + + + + + + + + + + + +
+
+
+
+
+
Add Question:
+
+
+ + + + +
+
+
+
+
+
+
+ + + + + + From b3b31985947c63c544b3a6e556f1edd6a0675495 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Sat, 2 Apr 2022 00:51:28 +0800 Subject: [PATCH 20/33] Create editpage.html --- main_template/editpage.html | 186 ++++++++++++++++++++++++++++++++++++ 1 file changed, 186 insertions(+) create mode 100644 main_template/editpage.html diff --git a/main_template/editpage.html b/main_template/editpage.html new file mode 100644 index 0000000..e66a8bc --- /dev/null +++ b/main_template/editpage.html @@ -0,0 +1,186 @@ + + + + + + + Edit_page + + + + + + + + + + + + +
+ +
+

Edit personal info :

+
+
+ + +
+ + +
+ +
+ + +
+ Required +
+
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ + +
+
+ + +
+ Required +
+
+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + +
+
+ + +
+ + +
+ + +
+
+
+
+ + + From b63277498574f73137a8d3519394d83e9203adb3 Mon Sep 17 00:00:00 2001 From: selvendranks <65431516+selvendranks@users.noreply.github.com> Date: Sat, 2 Apr 2022 00:52:15 +0800 Subject: [PATCH 21/33] Create profile.html --- main_template/profile.html | 154 +++++++++++++++++++++++++++++++++++++ 1 file changed, 154 insertions(+) create mode 100644 main_template/profile.html diff --git a/main_template/profile.html b/main_template/profile.html new file mode 100644 index 0000000..6e278d7 --- /dev/null +++ b/main_template/profile.html @@ -0,0 +1,154 @@ + + + + + + + Profile + + + + + + + + + + + + + + + + +
+

Your Profile :

+
+
+ +
+ ... +
+
Name : Selvendran
+ +
+
    +
  • Roll No :200701229
  • +
  • Department : Computer science and Engineering
  • +
  • Mail : 200701229@rajalakshmi.edu.in
  • +
+
+ + Edit Profile +
+
+
+
+

Your Questions :

+
+
+

Some quick example text to build on the card title and make up the bulk of the + card's content.

+ Delete Question +
+
    +
  • An item
  • +
  • A second item
  • +
  • A third item
  • +
+
+ + + +
+ + + + + + + + + + + + From b04006fd6aee037f8eae1d054cc7d9fa75dd90d2 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:44:17 +0530 Subject: [PATCH 22/33] Create __init__.py --- main_app/Connecx/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main_app/Connecx/__init__.py diff --git a/main_app/Connecx/__init__.py b/main_app/Connecx/__init__.py new file mode 100644 index 0000000..fd66a88 --- /dev/null +++ b/main_app/Connecx/__init__.py @@ -0,0 +1,9 @@ +from flask import Flask,render_template +from flask_sqlalchemy import SQLAlchemy + +app = Flask(__name__) +app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///Quora.db' +app.config['SECRET_KEY']='2418faa391fc381ac9f81b29' +db=SQLAlchemy(app) + +from Connecx import routes From eb39800e022aca2297f29d948fc9a499d0599bdc Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:44:51 +0530 Subject: [PATCH 23/33] Delete main_app/Connecx directory --- main_app/Connecx/__init__.py | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 main_app/Connecx/__init__.py diff --git a/main_app/Connecx/__init__.py b/main_app/Connecx/__init__.py deleted file mode 100644 index fd66a88..0000000 --- a/main_app/Connecx/__init__.py +++ /dev/null @@ -1,9 +0,0 @@ -from flask import Flask,render_template -from flask_sqlalchemy import SQLAlchemy - -app = Flask(__name__) -app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///Quora.db' -app.config['SECRET_KEY']='2418faa391fc381ac9f81b29' -db=SQLAlchemy(app) - -from Connecx import routes From 26c4696ee72afac72a4c6512f4d77596e14408ba Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:45:30 +0530 Subject: [PATCH 24/33] Create test.py --- main_app/test.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 main_app/test.py diff --git a/main_app/test.py b/main_app/test.py new file mode 100644 index 0000000..fdec961 --- /dev/null +++ b/main_app/test.py @@ -0,0 +1,6 @@ +from Connecx import app + +if(__name__=='__main__'): + app.run(debug=True) + + From 62d6668e8b481d2a01f78ecdb5c6d2e17fba6a89 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:45:54 +0530 Subject: [PATCH 25/33] Create __init__.py --- main_app/Connecx/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 main_app/Connecx/__init__.py diff --git a/main_app/Connecx/__init__.py b/main_app/Connecx/__init__.py new file mode 100644 index 0000000..fd66a88 --- /dev/null +++ b/main_app/Connecx/__init__.py @@ -0,0 +1,9 @@ +from flask import Flask,render_template +from flask_sqlalchemy import SQLAlchemy + +app = Flask(__name__) +app.config['SQLALCHEMY_DATABASE_URI']='sqlite:///Quora.db' +app.config['SECRET_KEY']='2418faa391fc381ac9f81b29' +db=SQLAlchemy(app) + +from Connecx import routes From 9c8d6651336386dad43578f1537bdb3a8f4fc043 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:46:41 +0530 Subject: [PATCH 26/33] Add files via upload --- main_app/Connecx/forms.py | 21 ++++++++++++++++ main_app/Connecx/models.py | 23 +++++++++++++++++ main_app/Connecx/routes.py | 51 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 main_app/Connecx/forms.py create mode 100644 main_app/Connecx/models.py create mode 100644 main_app/Connecx/routes.py diff --git a/main_app/Connecx/forms.py b/main_app/Connecx/forms.py new file mode 100644 index 0000000..2c4fad7 --- /dev/null +++ b/main_app/Connecx/forms.py @@ -0,0 +1,21 @@ +from flask_wtf import FlaskForm +from Connecx.models import user +from wtforms import StringField,PasswordField,SubmitField +from wtforms.validators import length,EqualTo,DataRequired + + +class register(FlaskForm): + roll_no=StringField(label='Roll.no') + password1=PasswordField(label='Password') + login=SubmitField(label='Login') + +class User_register(FlaskForm): + username=StringField(label="Username") + password1=PasswordField(label="Password") + password2=PasswordField(label="Confirm Password") + rollno=StringField(label="Roll.No") + dept=StringField(label="Department") + gender=StringField(label="Gender") + hosteler=StringField(label="Mode of Access") + batch=StringField(label="Batch(Year of Finishing)") + submit=SubmitField(label="Submit") diff --git a/main_app/Connecx/models.py b/main_app/Connecx/models.py new file mode 100644 index 0000000..9ed6dc3 --- /dev/null +++ b/main_app/Connecx/models.py @@ -0,0 +1,23 @@ +from Connecx import db + + +class user(db.Model): + username=db.Column(db.String(length=50),nullable=False) + rollno=db.Column(db.String(),nullable=False,unique=True) + dept=db.Column(db.String(length=30)) + batch=db.Column(db.Integer()) + gender=db.Column(db.String(),nullable=False) + hostelers=db.Column(db.String(),nullable=False) + password1=db.Column(db.String(length=50),nullable=False) + ID=db.Column(db.Integer(),nullable=False,unique=True,primary_key=True) + score=db.Column(db.Float(),default=0.0) + + + + + + + + + + \ No newline at end of file diff --git a/main_app/Connecx/routes.py b/main_app/Connecx/routes.py new file mode 100644 index 0000000..f3babba --- /dev/null +++ b/main_app/Connecx/routes.py @@ -0,0 +1,51 @@ +from Connecx import app +from flask import render_template,redirect,url_for,flash,request + +from Connecx.forms import register,User_register +from Connecx import db +from Connecx.models import user + + +@app.route('/') +@app.route('/login') +def home(): + form=register() + return render_template('login.html',form=form) + +@app.route('/signup') +def signup_user(): + + return render_template('selection.html') + +@app.route('/student',methods=['GET','POST']) +def student_signup(): + form=User_register() + if form.validate_on_submit(): + dept_select=request.form.get('Department') + gender_type=request.form.get('gender') + hstl=request.form.get('place') + user_create=user(username=form.username.data,rollno=form.rollno.data,dept=dept_select, + batch=form.batch.data,gender=gender_type,hostelers=hstl,password1=form.password1.data) + db.session.add(user_create) + db.session.commit() + return redirect(url_for('home')) + + return render_template('student_signup.html',form=form) + + +@app.route('/faculty',methods=['GET','POST']) +def faculty_signup(): + form=User_register() + if form.validate_on_submit(): + + gender_type=request.form.get('gender') + hstl=request.form.get('place') + user_create=user(username=form.username.data,rollno=form.rollno.data,dept='', + batch='',gender=gender_type,hostelers=hstl,password1=form.password1.data) + db.session.add(user_create) + db.session.commit() + return redirect(url_for('home')) + return render_template('faculty_signup.html',form=form) +@app.route('/Home') +def front_page(): + return render_template('front_page.html') \ No newline at end of file From 41560fa37d75db0d884ee5862d146e11974f64cb Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:47:19 +0530 Subject: [PATCH 27/33] Create base.html --- main_app/Connecx/templates/base.html | 47 ++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 main_app/Connecx/templates/base.html diff --git a/main_app/Connecx/templates/base.html b/main_app/Connecx/templates/base.html new file mode 100644 index 0000000..11b286a --- /dev/null +++ b/main_app/Connecx/templates/base.html @@ -0,0 +1,47 @@ + + + + + + + + + {% block title%} + {%endblock%} + + + + + + + + {%block content%}{%endblock%} + + + + + + + + + + + + + + From 7d8a7ff5e5ceddb1044749dec26ce7581212523c Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 07:47:42 +0530 Subject: [PATCH 28/33] Add files via upload --- .../Connecx/templates/faculty_signup.html | 136 ++++++++++++++++ main_app/Connecx/templates/front_page.html | 132 +++++++++++++++ main_app/Connecx/templates/login.html | 34 ++++ main_app/Connecx/templates/selection.html | 10 ++ .../Connecx/templates/student_signup.html | 150 ++++++++++++++++++ 5 files changed, 462 insertions(+) create mode 100644 main_app/Connecx/templates/faculty_signup.html create mode 100644 main_app/Connecx/templates/front_page.html create mode 100644 main_app/Connecx/templates/login.html create mode 100644 main_app/Connecx/templates/selection.html create mode 100644 main_app/Connecx/templates/student_signup.html diff --git a/main_app/Connecx/templates/faculty_signup.html b/main_app/Connecx/templates/faculty_signup.html new file mode 100644 index 0000000..85db3f9 --- /dev/null +++ b/main_app/Connecx/templates/faculty_signup.html @@ -0,0 +1,136 @@ +{% extends 'base.html'%} +{% block title %} +Faculty Signup +{% endblock %} + +{% block content %} + + + + + + + + Bootstrap Site + + + + + + + +
+

Faculty profile :

+
+
+
+ {{form.hidden_tag()}} + +
+ + {{form.username(class="form-control")}} + +
+ Required +
+
+
+ + {{form.rollno(class='form-control')}} + +
+ Required +
+
+
+ +
+ +
+
+ + +
+
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + +
+
+ + +
+ + +
+ + {{form.password1(class='form-control')}} +
+ Required +
+
+
+ + {{form.password2(class='form-control')}}
+ Required +
+
+{{form.submit(class='btn btn-lgbtn-block btn-primary')}} +
+
+
+ + +{%endblock%} \ No newline at end of file diff --git a/main_app/Connecx/templates/front_page.html b/main_app/Connecx/templates/front_page.html new file mode 100644 index 0000000..552cdb5 --- /dev/null +++ b/main_app/Connecx/templates/front_page.html @@ -0,0 +1,132 @@ + + + + + + + Connexc + + + + + + + + + + + + + + + +
+
+
+
+
+
+ +
+

:-selvendran

+
Card subtitle
+

Some quick example text to build on the card title and make up the bulk of + the card's content.

+ + +
+ + +
+ +
    +
    +
  • its a very easy answer so i will not answer
  • + + +
    + +
+ +
+
+
+
+
+ + + + + + + + + + + diff --git a/main_app/Connecx/templates/login.html b/main_app/Connecx/templates/login.html new file mode 100644 index 0000000..fe0a706 --- /dev/null +++ b/main_app/Connecx/templates/login.html @@ -0,0 +1,34 @@ +{% extends 'base.html'%} +{% block title %} +Login Page +{% endblock %} + +{% block content %} + + +
+
+ +
+
+

+ Login to your Account +

+
+ {{ form.roll_no.label() }} + {{ form.roll_no(class="form-control", placeholder="Rollno") }} + + {{ form.password1.label() }} + {{ form.password1(class="form-control",type="password", placeholder="Password",) }} +
+ {{ form.login(class="btn btn-lg btn-block btn-primary") }} + + not a user?signup + + + +
+
+ + +{% endblock %} \ No newline at end of file diff --git a/main_app/Connecx/templates/selection.html b/main_app/Connecx/templates/selection.html new file mode 100644 index 0000000..c68fb70 --- /dev/null +++ b/main_app/Connecx/templates/selection.html @@ -0,0 +1,10 @@ +{% extends 'base.html'%} +{% block title %} +Register Page +{% endblock %} + +{% block content %} + student + Faculty + +{%endblock%} diff --git a/main_app/Connecx/templates/student_signup.html b/main_app/Connecx/templates/student_signup.html new file mode 100644 index 0000000..270cd3e --- /dev/null +++ b/main_app/Connecx/templates/student_signup.html @@ -0,0 +1,150 @@ +{% extends 'base.html'%} +{% block title %} +Student Signup +{% endblock %} + +{% block content %} + + + + + + + Bootstrap Site + + + + + + + +
+

Your profile :

+
+
+
+ {{form.hidden_tag()}} +
+ + {{form.username(class="form-control")}} + + +
+ Required +
+
+
+ + {{form.rollno(class='form-control')}} +
+ Required +
+
+
+ +
+ +
+
+ + {{form.batch(class='form-control')}} +
+ Required +
+
+
+ + +
+
+ +
+ + + + +
+
+ + +
+
+ + +
+ +
+ +
+ +
+ + +
+
+ + +
+ +
+
+ + {{form.password1(class='form-control')}} +
+ Required +
+
+
+ + {{form.password2(class='form-control')}} +
+ Required +
+
+{{form.submit(class='btn btn-lgbtn-block btn-primary')}} +
+ +
+
+ + + + + + + +{%endblock%} From 64506df4711f97c7eae9ddf5d310a3c7188a7e35 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 09:29:38 +0530 Subject: [PATCH 29/33] Update routes.py --- main_app/Connecx/routes.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/main_app/Connecx/routes.py b/main_app/Connecx/routes.py index f3babba..fd4a7f5 100644 --- a/main_app/Connecx/routes.py +++ b/main_app/Connecx/routes.py @@ -6,10 +6,25 @@ from Connecx.models import user -@app.route('/') -@app.route('/login') + +@app.route('/login',methods=['GET','POST']) def home(): form=register() + if(request.method=='POST'): + r_n=form.roll_no.data + pwrd=form.password1.data + for i in user.query.all(): + if(r_n==i.rollno): + if(pwrd==i.password1): + return redirect(url_for('front_page')) + else: + pass + else: + pass + + + + return render_template('login.html',form=form) @app.route('/signup') @@ -46,6 +61,8 @@ def faculty_signup(): db.session.commit() return redirect(url_for('home')) return render_template('faculty_signup.html',form=form) + + @app.route('/Home') def front_page(): - return render_template('front_page.html') \ No newline at end of file + return render_template('front_page.html') From a98d3fa0e7cb1b1b81113b4cc4a01612b45f4094 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:18:09 +0530 Subject: [PATCH 30/33] Update front_page.html --- main_template/front_page.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/main_template/front_page.html b/main_template/front_page.html index db61470..2bb0e2c 100644 --- a/main_template/front_page.html +++ b/main_template/front_page.html @@ -4,7 +4,7 @@ - Bootstrap Site + Connexc + + + + + + + + + + + + + + +
+

Your Profile :

+
+
+ +
+ ... +
+
Name : Selvendran
+ +
+
    +
  • Roll No :200701229
  • +
  • Department : Computer science and Engineering
  • +
  • Mail : 200701229@rajalakshmi.edu.in
  • +
+
+ + Edit Profile +
+
+
+
+

Your Questions :

+
+
+

Some quick example text to build on the card title and make up the bulk of the + card's content.

+ Delete Question +
+
    +
  • An item
  • +
  • A second item
  • +
  • A third item
  • +
+
+ + + +
+ + + + + + + + + + + + \ No newline at end of file From de377a85d6da9a55ee3c45ca5f685cda57616325 Mon Sep 17 00:00:00 2001 From: shrish <59884160+MSHRISH@users.noreply.github.com> Date: Sat, 2 Apr 2022 11:20:21 +0530 Subject: [PATCH 33/33] Update routes.py --- main_app/Connecx/routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main_app/Connecx/routes.py b/main_app/Connecx/routes.py index fd4a7f5..e734c63 100644 --- a/main_app/Connecx/routes.py +++ b/main_app/Connecx/routes.py @@ -66,3 +66,7 @@ def faculty_signup(): @app.route('/Home') def front_page(): return render_template('front_page.html') + +@app.route('/profile') +def profile_page(): + return render_template('profile.html')