diff --git a/templates/base.html b/templates/base.html index fe141c8..f7ba21c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -4,7 +4,7 @@ - JobPortal - Free Bootstrap 4 Template by Colorlib + JobPortal @@ -28,6 +28,8 @@ + + @@ -45,10 +47,40 @@ {% if not user.is_authenticated %} - - + + + {% endif %} + {% if user.is_authenticated and user.is_employee %} +
+ + +
+ {% endif %} + {% if user.is_authenticated and user.is_employer %} +
+ + +
{% endif %} - @@ -56,9 +88,11 @@ {% block content %} -{% endblock %} -
+ {% endblock %} + + +
@@ -168,6 +202,13 @@ + {% if user.is_authenticated and user.is_employee %} + + {% else %} + + {% endif %} + + - \ No newline at end of file + diff --git a/users/models.py b/users/models.py index 38479da..3e71cf8 100644 --- a/users/models.py +++ b/users/models.py @@ -50,6 +50,9 @@ class Account(AbstractBaseUser, PermissionsMixin): verbose_name = _('user') verbose_name_plural = _('users') + def get_profile_id(self): + return self.profile.id + class Profile(models.Model): user = models.OneToOneField(Account, on_delete=models.CASCADE, related_name="profile")