Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/natty4/project catalog admin dashboard #23

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ __pycache__/
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
Expand Down Expand Up @@ -129,4 +128,6 @@ dmypy.json
.pyre/
plan.md
csec_project_catalog/.env
csec_project_catalog/media/
.vscode/settings.json

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ Every developer must follow this steps when developing on a new feature.
2. After developing the feature, the developer must request a pull request to the master branch if the test is passed.

3. Developer must follow Standard Coding Style provided by Flake8 and black.


## Datanase Configration for PostgreSQL

```psql
create user muday_user with encrypted password 'muday_password';
create database muday;
grant all privileges on database muday to muday_user;
```
466 changes: 466 additions & 0 deletions csec-company-list.html

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions csec-login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<title>login</title>
<meta content="Admin Dashboard" name="description" />
<meta content="Themesbrand" name="author" />
<link rel="shortcut icon" href="assets/images/favicon.ico">

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/icons.css" rel="stylesheet" type="text/css">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- Background -->
<div class="account-pages"></div>
<!-- Begin page -->
<div class="wrapper-page">

<div class="card">
<div class="card-body">

<h3 class="text-center m-0">
<a href="index.html" class="logo logo-admin"><img src="assets/images/csec.png" height="100" alt="logo"></a>
</h3>

<div class="p-3">
<h4 class="text-muted font-18 m-b-5 text-center">Welcome Back !</h4>
<p class="text-muted text-center">csec-intern </p>

<form class="form-horizontal m-t-30" action="index.html">

<div class="form-group">
<label for="username">User Id</label>
<input type="text" class="form-control" id="username" placeholder="Enter username">
</div>

<div class="form-group">
<label for="userpassword">Password</label>
<input type="password" class="form-control" id="userpassword" placeholder="Enter password">
</div>

<div class="form-group row m-t-20">
<div class="col-6">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customControlInline">
<label class="custom-control-label" for="customControlInline">Remember me</label>
</div>
</div>
<div class="col-6 text-right">
<button class="btn btn-primary w-md waves-effect waves-light" type="submit">Log In</button>
</div>
</div>

<div class="form-group m-t-10 mb-0 row">
<div class="col-12 m-t-20">
<a href="csec-recoverpw.html" class="text-muted"><i class="mdi mdi-lock"></i> Forgot your password?</a>
</div>
</div>
</form>
</div>

</div>
</div>

<div class="m-t-40 text-center">
<p class="text-white-50">Don't have an account ? <a href="csec-register.html" class="text-white"> Signup Now </a> </p>
<!-- <p class="text-muted">© 2018 Agroxa. Crafted with <i class="mdi mdi-heart text-danger"></i> by Themesbrand</p> -->
</div>

</div>

<!-- END wrapper -->

<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/waves.min.js"></script>

<script src="../plugins/jquery-sparkline/jquery.sparkline.min.js"></script>

<!-- App js -->
<script src="assets/js/app.js"></script>

</body>

</html>
80 changes: 80 additions & 0 deletions csec-recoverpw.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<title>Agroxa - Responsive Bootstrap 4 Admin Dashboard</title>
<meta content="Admin Dashboard" name="description" />
<meta content="Themesbrand" name="author" />
<link rel="shortcut icon" href="assets/images/favicon.ico">

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/icons.css" rel="stylesheet" type="text/css">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- Background -->
<div class="account-pages"></div>

<!-- Begin page -->
<div class="wrapper-page">

<div class="card">
<div class="card-body">

<h3 class="text-center m-0">
<a href="index.html" class="logo logo-admin"><img src="assets/images/csec.png" height="100" alt="logo"></a>
</h3>

<div class="p-3">
<h4 class="text-muted font-18 mb-3 text-center">Reset Password</h4>
<div class="alert alert-info" role="alert">
Enter your Username and instructions will be sent to you!
</div>

<form class="form-horizontal m-t-30" action="index.html">

<div class="form-group">
<label for="username">Usermame</label>
<input type="text" class="form-control" id="username" placeholder="Enter Username">
</div>

<div class="form-group row m-t-20">
<div class="col-12 text-right">
<button class="btn btn-primary w-md waves-effect waves-light" type="submit">Reset</button>
</div>
</div>

</form>
</div>

</div>
</div>

<div class="m-t-40 text-center">
<p class="text-white-50">Don't have an account ? <a href="pages-register.html" class="text-white"> Signup Now </a> </p>
<!-- <p class="text-muted">© 2018 Agroxa. Crafted with <i class="mdi mdi-heart text-danger"></i> by Themesbrand</p> -->
</div>

</div>

<!-- END wrapper -->

<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/waves.min.js"></script>

<script src="../plugins/jquery-sparkline/jquery.sparkline.min.js"></script>

<!-- App js -->
<script src="assets/js/app.js"></script>

</body>

</html>
117 changes: 117 additions & 0 deletions csec-register.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<title>register</title>
<meta content="Admin Dashboard" name="description" />
<meta content="Themesbrand" name="author" />
<link rel="shortcut icon" href="assets/images/favicon.ico">
<link href="assets/css/new.css" rel="stylesheet" type="text/css">

<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/icons.css" rel="stylesheet" type="text/css">
<link href="assets/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- Background -->
<div class="account-pages"id="p-3"></div>

<!-- Begin page -->
<div class="wrapper-page">
<div class="card" >
<div class="card-body" id="register-card">

<h3 class="text-center m-0">
<a href="index.html" class="logo logo-admin" ><img src="assets/images/csec.png" height="80" alt="logo"></a>
</h3>

<div class="p-3" >
<h4 class="text-muted font-18 m-b-5 text-center" >Sign up</h4>


<form class="form-horizontal m-t-30" action="index.html">



<div class="form-group">
<label>Full name</label>
<div>
<div class="input-group" id="side">
<input type="text" id="firstName" class="form-control " placeholder="First name">
<input type="text" id="LastName" class="form-control " placeholder="Last name">

</div>
</div>
</div>



<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" placeholder="Enter username">
</div>

<div class="form-group">
<label for="useremail">Email</label>
<input type="email" class="form-control" id="useremail" placeholder="Enter email">
</div>

<div class="form-group">
<label>Password</label>
<div>
<div class="input-group">
<input type="password" id="password" class="form-control floating-label" placeholder="Enter password">
<input type="password" id="verify_password" class="form-control floating-label" placeholder="Verify password">

</div>
</div>
</div>

<div class="form-group">
<label for="phone">Phone</label>
<input type="tel" class="form-control" id="phone" placeholder="Enter password">
</div>


<div class="form-group row m-t-20">
<div class="col-12 text-right">
<button class="btn btn-primary w-md waves-effect waves-light" type="submit">Register</button>
</div>
</div>

<div class="form-group m-t-10 mb-0 row">

</div>
</form>
</div>

</div>
</div>

<div class="m-t-40 text-center">
<p class="text-muted">Already have an account ? <a href="csec-login.html" class="text-white">Login </a> </p>
</div>

</div>

<!-- END wrapper -->

<!-- jQuery -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.bundle.min.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/waves.min.js"></script>

<script src="../plugins/jquery-sparkline/jquery.sparkline.min.js"></script>

<!-- App js -->
<script src="assets/js/app.js"></script>

</body>

</html>
14 changes: 14 additions & 0 deletions csec_project_catalog/.env_example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ENGINE="django.db.backends.sqlite3"
NAME="/home/astu-csec/Desktop/.VQ/CSEC/CSEC-project-catlog/csec_project_catalog/db.sqlite3"
# No need to set the below if your database is sqlite3
USER=""
PASSWORD=""
HOST=""
PORT=5432

SECRET_KEY="django-insecure-u@y%4=81%2%$m4e)ay=i=s36n+n%22191c(#)4*5w7=n6tg33r"
DEBUG=True

# Telegram Config
TG_API_KEY="<your-telegram-api-key>"
TG_TG_CHANNEL_ID="<your-telegram-TG_CHANNEL_ID>"
10 changes: 9 additions & 1 deletion csec_project_catalog/authentication/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ class UserRegistrationForm(forms.ModelForm):

class Meta:
model = User
fields = ("first_name", "last_name", "username", "phone_number", "email")
fields = (
"first_name",
"last_name",
"username",
"phone_number",
"email",
"gender",
"birthdate",
)

def clean(self):
cleaned_data = super(UserRegistrationForm, self).clean()
Expand Down
Loading