From 931a8855109ea6bb468a07e38cd683f099d3da35 Mon Sep 17 00:00:00 2001 From: Eligiusz Kurzawa Date: Mon, 28 Dec 2020 20:28:52 +0100 Subject: [PATCH] 2# added user model, base HTML --- .idea/vcs.xml | 6 + jobportal/settings.py | 1 + jobportal/urls.py | 19 +- jobs/urls.py | 6 + jobs/views.py | 6 +- templates/base.html | 171 +++++++++ templates/jobs/index.html | 697 +++++++++++++++++++++++++++++++++++ users/__init__.py | 0 users/admin.py | 3 + users/apps.py | 5 + users/migrations/__init__.py | 0 users/models.py | 27 ++ users/tests.py | 3 + users/urls.py | 6 + users/views.py | 3 + 15 files changed, 935 insertions(+), 18 deletions(-) create mode 100644 .idea/vcs.xml create mode 100644 jobs/urls.py create mode 100644 templates/base.html create mode 100644 templates/jobs/index.html create mode 100644 users/__init__.py create mode 100644 users/admin.py create mode 100644 users/apps.py create mode 100644 users/migrations/__init__.py create mode 100644 users/models.py create mode 100644 users/tests.py create mode 100644 users/urls.py create mode 100644 users/views.py diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/jobportal/settings.py b/jobportal/settings.py index 46cd4af..657f932 100644 --- a/jobportal/settings.py +++ b/jobportal/settings.py @@ -38,6 +38,7 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'jobs', + 'users', ] MIDDLEWARE = [ diff --git a/jobportal/urls.py b/jobportal/urls.py index 4687e27..3ef1c28 100644 --- a/jobportal/urls.py +++ b/jobportal/urls.py @@ -1,23 +1,10 @@ -"""jobportal URL Configuration - -The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/3.1/topics/http/urls/ -Examples: -Function views - 1. Add an import: from my_app import views - 2. Add a URL to urlpatterns: path('', views.home, name='home') -Class-based views - 1. Add an import: from other_app.views import Home - 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') -Including another URLconf - 1. Import the include() function: from django.urls import include, path - 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) -""" from django.contrib import admin -from django.urls import path +from django.urls import path, include from django.conf.urls.static import static from django.conf import settings urlpatterns = [ path('admin/', admin.site.urls), + path('', include('jobs.urls')), + path('users/', include('users.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/jobs/urls.py b/jobs/urls.py new file mode 100644 index 0000000..09985ee --- /dev/null +++ b/jobs/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from .views import * + +urlpatterns = [ + path('', HomeView.as_view(), name="home"), +] diff --git a/jobs/views.py b/jobs/views.py index 91ea44a..d2338c4 100644 --- a/jobs/views.py +++ b/jobs/views.py @@ -1,3 +1,5 @@ -from django.shortcuts import render +from django.views.generic import TemplateView -# Create your views here. + +class HomeView(TemplateView): + template_name = 'jobs/index.html' \ No newline at end of file diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..2647d1a --- /dev/null +++ b/templates/base.html @@ -0,0 +1,171 @@ +{% load static %} + + + + + + JobPortal - Free Bootstrap 4 Template by Colorlib + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{% block content %} + +{% endblock %} + +
+
+
+
+
+

Subcribe to our Newsletter

+

Far far away, behind the word mountains, far from the countries Vokalia and Consonantia, there live the blind texts. Separated they live in

+
+
+ +
+
+
+
+
+
+
+ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/templates/jobs/index.html b/templates/jobs/index.html new file mode 100644 index 0000000..92d48b6 --- /dev/null +++ b/templates/jobs/index.html @@ -0,0 +1,697 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} + +
+
+
+
+
+

We have 0 great job offers you deserve!

+

Your Dream
Job is Waiting

+ + +
+
+
+
+ +
+
+
+
+
+
+
+

Search Millions of Jobs

+

A small river named Duden flows by their place and supplies.

+
+
+
+
+
+
+
+

Easy To Manage Jobs

+

A small river named Duden flows by their place and supplies.

+
+
+
+
+
+
+
+

Top Careers

+

A small river named Duden flows by their place and supplies.

+
+
+
+
+
+
+
+

Search Expert Candidates

+

A small river named Duden flows by their place and supplies.

+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+ Recently Added Jobs +

Recent Jobs

+
+
+
+
+ +
+ +
+
+

Frontend Development

+
+ Partime +
+
+
+ +
Western City, UK
+
+
+ + +
+
+ +
+
+ +
+
+

Full Stack Developer

+
+ Full Time +
+
+
+ +
Western City, UK
+
+
+ + + +
+
+
+
+ +
+
+

Open Source Interactive Developer

+
+ Freelance +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+ +
+ +
+
+

Frontend Development

+
+ Internship +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+
+ +
+
+

Open Source Interactive Developer

+
+ Temporary +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+ +
+ +
+
+

Frontend Development

+
+ Partime +
+
+
+ +
Western City, UK
+
+
+ + +
+
+ +
+
+ +
+
+

Full Stack Developer

+
+ Full Time +
+
+
+ +
Western City, UK
+
+
+ + + +
+
+
+
+ +
+
+

Open Source Interactive Developer

+
+ Freelance +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+ +
+ +
+
+

Frontend Development

+
+ Internship +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+
+ +
+
+

Open Source Interactive Developer

+
+ Temporary +
+
+
+ +
Western City, UK
+
+
+ + +
+
+
+
+
+
+
    +
  • <
  • +
  • 1
  • +
  • 2
  • +
  • 3
  • +
  • 4
  • +
  • 5
  • +
  • >
  • +
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+ 0 + Jobs +
+
+
+
+
+
+ 0 + Members +
+
+
+
+
+
+ 0 + Resume +
+
+
+
+
+
+ 0 + Company +
+
+
+
+
+
+
+
+ + +
+
+
+
+ Testimonial +

Happy Clients

+
+
+
+
+ +
+
+
+
+ +
+
+
+
+ Our Blog +

Recent Blog

+
+
+
+
+
+ + +
+ +

Even the all-powerful Pointing has no control about the blind texts

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias architecto enim non iste maxime optio, ut com

+
+
+
+
+
+ + +
+ +

Even the all-powerful Pointing has no control about the blind texts

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet nobis natus incidunt officia assumenda.

+
+
+
+
+
+ + +
+ +

Even the all-powerful Pointing has no control about the blind texts

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi obcaecati praesentium,

+
+
+
+
+
+ + +
+ +

Even the all-powerful Pointing has no control about the blind texts

+

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolor minima, dolores quis, dolorum accusamu

+
+
+
+
+
+
+ +{% endblock %} \ No newline at end of file diff --git a/users/__init__.py b/users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/users/admin.py b/users/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/users/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/users/apps.py b/users/apps.py new file mode 100644 index 0000000..4ce1fab --- /dev/null +++ b/users/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class UsersConfig(AppConfig): + name = 'users' diff --git a/users/migrations/__init__.py b/users/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/users/models.py b/users/models.py new file mode 100644 index 0000000..c8ed058 --- /dev/null +++ b/users/models.py @@ -0,0 +1,27 @@ +from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager +from django.contrib.auth.models import PermissionsMixin +from django.db import models +from django.utils.translation import gettext_lazy as _ + + +class UserManager(BaseUserManager): + pass + + +class Account(AbstractBaseUser, PermissionsMixin): + email = models.EmailField(_('email address'), unique=True) + first_name = models.CharField(_('first name'), max_length=50, blank=False) + last_name = models.CharField(_('last name'), max_length=50, blank=False) + date_joined = models.DateTimeField(_('date joined'), auto_now_add=True) + is_active = models.BooleanField(_('active'), default=True) + is_staff = models.BooleanField(_('is_staff'), default=False) + is_employee = models.BooleanField(default=False) + is_employer = models.BooleanField(default=False) + + objects = UserManager() + USERNAME_FIELD = 'email' + REQUIRED_FIELDS = [] + + class Meta: + verbose_name = _('user') + verbose_name_plural = _('users') diff --git a/users/tests.py b/users/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/users/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/users/urls.py b/users/urls.py new file mode 100644 index 0000000..06cf910 --- /dev/null +++ b/users/urls.py @@ -0,0 +1,6 @@ +from django.urls import path +from .views import * + +urlpatterns = [ + +] diff --git a/users/views.py b/users/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/users/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.