# Path: users/models.py
# class User(AbstractUser):
#     bio = MarkupField(blank=True, default_markup_type=DEFAULT_MARKUP_TYPE, escape_html=True)
# 
#     SEARCH_PRIVATE = 0
#     SEARCH_PUBLIC = 1
#     SEARCH_CHOICES = (
#         (SEARCH_PUBLIC, 'Allow search engines to index my profile page (recommended)'),
#         (SEARCH_PRIVATE, "Don't allow search engines to index my profile page"),
#     )
#     search_visibility = models.IntegerField(choices=SEARCH_CHOICES, default=SEARCH_PUBLIC)
# 
#     EMAIL_PUBLIC = 0
#     EMAIL_PRIVATE = 1
#     EMAIL_NEVER = 2
#     EMAIL_CHOICES = (
#         (EMAIL_PUBLIC, 'Anyone can see my e-mail address'),
#         (EMAIL_PRIVATE, 'Only logged-in users can see my e-mail address'),
#         (EMAIL_NEVER, 'No one can ever see my e-mail address'),
#     )
#     email_privacy = models.IntegerField('E-mail privacy', choices=EMAIL_CHOICES, default=EMAIL_NEVER)
# 
#     public_profile = models.BooleanField('Make my profile public', default=True)
# 
#     objects = UserManager()
# 
#     def get_absolute_url(self):
#         return reverse('users:user_detail', kwargs={'slug': self.username})
# 
#     @property
#     def has_membership(self):
#         try:
#             self.membership
#             return True
#         except Membership.DoesNotExist:
#             return False
# 
#     @property
#     def sponsorships(self):
#         from sponsors.models import Sponsorship
#         return Sponsorship.objects.visible_to(self)
# 
#     @property
#     def api_v2_token(self):
#         try:
#             return Token.objects.get(user=self).key
#         except Token.DoesNotExist:
#             return ""


import datetime
from django.conf import settings
from django.urls import reverse
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.template.defaultfilters import slugify
from django.utils import timezone
from markupfield.fields import MarkupField
from cms.models import ContentManageable, NameSlugModel
from fastly.utils import purge_url
from users.models import User
from .managers import JobQuerySet, JobTypeQuerySet, JobCategoryQuerySet
from .signals import (
    job_was_submitted, job_was_approved, job_was_rejected, comment_was_posted
)
    country = models.CharField(
        max_length=100,
        db_index=True)
    location_slug = models.SlugField(
        max_length=350,
        editable=False)
    country_slug = models.SlugField(
        max_length=100,
        editable=False)

    description = MarkupField(
        verbose_name='Job description',
        default_markup_type=DEFAULT_MARKUP_TYPE)
    requirements = MarkupField(
        verbose_name='Job requirements',
        default_markup_type=DEFAULT_MARKUP_TYPE)

    contact = models.CharField(
        verbose_name='Contact name',
        null=True,
        blank=True,
        max_length=100)
    email = models.EmailField(
        verbose_name='Contact email')
    url = models.URLField(
        verbose_name='URL',
        null=True,
        blank=False)

    submitted_by = models.ForeignKey(

# Path: users/models.py
# class User(AbstractUser):
#     bio = MarkupField(blank=True, default_markup_type=DEFAULT_MARKUP_TYPE, escape_html=True)
# 
#     SEARCH_PRIVATE = 0
#     SEARCH_PUBLIC = 1
#     SEARCH_CHOICES = (
#         (SEARCH_PUBLIC, 'Allow search engines to index my profile page (recommended)'),
#         (SEARCH_PRIVATE, "Don't allow search engines to index my profile page"),
#     )
#     search_visibility = models.IntegerField(choices=SEARCH_CHOICES, default=SEARCH_PUBLIC)
# 
#     EMAIL_PUBLIC = 0
#     EMAIL_PRIVATE = 1
#     EMAIL_NEVER = 2
#     EMAIL_CHOICES = (
#         (EMAIL_PUBLIC, 'Anyone can see my e-mail address'),
#         (EMAIL_PRIVATE, 'Only logged-in users can see my e-mail address'),
#         (EMAIL_NEVER, 'No one can ever see my e-mail address'),
#     )
#     email_privacy = models.IntegerField('E-mail privacy', choices=EMAIL_CHOICES, default=EMAIL_NEVER)
# 
#     public_profile = models.BooleanField('Make my profile public', default=True)
# 
#     objects = UserManager()
# 
#     def get_absolute_url(self):
#         return reverse('users:user_detail', kwargs={'slug': self.username})
# 
#     @property
#     def has_membership(self):
#         try:
#             self.membership
#             return True
#         except Membership.DoesNotExist:
#             return False
# 
#     @property
#     def sponsorships(self):
#         from sponsors.models import Sponsorship
#         return Sponsorship.objects.visible_to(self)
# 
#     @property
#     def api_v2_token(self):
#         try:
#             return Token.objects.get(user=self).key
#         except Token.DoesNotExist:
#             return ""


# Path: jobs/models.py
import datetime
from django.conf import settings
from django.urls import reverse
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
from django.template.defaultfilters import slugify
from django.utils import timezone
from markupfield.fields import MarkupField
from cms.models import ContentManageable, NameSlugModel
from fastly.utils import purge_url
from users.models import User
from .managers import JobQuerySet, JobTypeQuerySet, JobCategoryQuerySet
from .signals import (
    job_was_submitted, job_was_approved, job_was_rejected, comment_was_posted
)

    country = models.CharField(
        max_length=100,
        db_index=True)
    location_slug = models.SlugField(
        max_length=350,
        editable=False)
    country_slug = models.SlugField(
        max_length=100,
        editable=False)

    description = MarkupField(
        verbose_name='Job description',
        default_markup_type=DEFAULT_MARKUP_TYPE)
    requirements = MarkupField(
        verbose_name='Job requirements',
        default_markup_type=DEFAULT_MARKUP_TYPE)

    contact = models.CharField(
        verbose_name='Contact name',
        null=True,
        blank=True,
        max_length=100)
    email = models.EmailField(
        verbose_name='Contact email')
    url = models.URLField(
        verbose_name='URL',
        null=True,
        blank=False)

    submitted_by = models.ForeignKey(

        User,