Commits

Ralph Leyga committed 834a6a8

added testcase

Comments (0)

Files changed (24)

build/lib.linux-i686-2.6/jobsboard/__init__.py

Empty file removed.

build/lib.linux-i686-2.6/jobsboard/admin.py

-from django.contrib import admin
-
-from tagging.models import Tag
-from jobsboard.models import Job, Company, Applicant
-
-
-class Company_Admin(admin.ModelAdmin):
-    fieldsets = (
-              (None, {
-                      'fields': ('added_by', 'name', 
-                                 'address', 'description',
-                                 ('telephone', 'fax'), 'tags',)
-                      }),
-                        )
-    list_display = ('added_by', 'name', 'telephone', 'fax', 'address', 'tags',)
-    list_display_links = ('added_by', 'name', 'telephone', 'fax', 'address', 'tags',)
-    list_filter = ('added_by',)
-    search_fields = ('name', 'telephone', 'fax', 'description', 'address', 'tags',)
-    ordering = ('name', 'added_by',)
-    save_on_top = True
-
-
-class Job_Admin(admin.ModelAdmin):
-    fieldsets = (
-              (None, {
-                      'fields': ('posted_by', 'company', 'title', 'description', 'status', 'date_due', 'tags',)
-                      }),
-                        )
-    list_display = ('posted_by', 'company', 'title', 'description', 'status', 'date_due', 'tags')
-    list_display_links = ('posted_by', 'company', 'title', 'description', 'status', 'date_due', 'tags')
-    list_filter = ('status', 'date_due', 'company',)
-    search_fields = ('title', 'description', 'tags',)
-    ordering = ('status', 'company', 'title', 'posted_by',)
-    save_on_top = True
-
-
-class Applicant_Admin(admin.ModelAdmin):
-    fieldsets = (
-              (None, {
-                      'fields': ('job', 'user', 'status',)
-                      }),
-                        )
-    list_display = ('job', 'user', 'status', 'date_applied',)
-    list_display_links = ('job', 'user', 'status', 'date_applied',)
-    list_filter = ('status', 'job', 'date_applied',)
-    ordering = ('job', 'user',)
-    save_on_top = True
-
-
-admin.site.register(Job, Job_Admin)
-admin.site.register(Company, Company_Admin)
-admin.site.register(Applicant, Applicant_Admin)

build/lib.linux-i686-2.6/jobsboard/forms.py

-#!/usr/bin/env python
-from django.utils.translation import ugettext_lazy as _
-from django import forms
-from datetime import datetime
-from jobsboard.models import *
-from jobsboard.forms import *
-from django.contrib.admin import widgets
-from django.forms.extras.widgets import SelectDateWidget
-
-class JobForm(forms.ModelForm):
-
-#    date_due = forms.DateField(widget=SelectDateWidget())
-
-    class Meta:
-        model = Job
-        exclude = ('posted_by','date_added','tags','title_slug',)
-
-    #def __init__(self, user=None, *args, **kwargs):
-    #    self.user = user
-    #    super(JobForm, self).__init__(*args, **kwargs)
-    #    self.fields['company'] = forms.ModelChoiceField(queryset=Company.objects.filter(added_by=user))
-
-class CompanyForm(forms.ModelForm):
-    class Meta:
-        model = Company
-        exclude = ('added_by','name_slug',)
-        
-class ApplicantForm(forms.ModelForm):
-    class Meta:
-        model = Applicant
-        exclude = ('user', 'job', 'status', 'date_applied')

build/lib.linux-i686-2.6/jobsboard/models.py

-from datetime import datetime
-from django.conf import settings
-from django.db import models
-from django.utils.translation import ugettext_lazy as _
-from django.contrib.auth.models import User
-from django.template.defaultfilters import slugify
-from jobsboard.signals import *
-from django.db.models.signals import *
-from tagging.fields import TagField
-
-class Company(models.Model):
-    """
-    A company with its details.
-    """
-    name = models.CharField(_('name'), max_length=200)
-    name_slug = models.SlugField(_('slug'))
-    telephone = models.CharField(_('telephone'), max_length=30, blank=True, null=True)
-    fax = models.CharField(_('fax'), max_length=30, blank=True, null=True)
-    address = models.TextField(_('address'))
-    description = models.TextField(_('description'))
-    date_added = models.DateTimeField(_('date added'), default=datetime.now, editable=False)
-    added_by = models.ForeignKey(User, related_name="companies_added", blank=False, null=False)
-    tags = TagField(help_text='separate your tags with a comma and use dash (-) instead of space between words ( example: music, top, top-artists )')
-    
-    class Meta:
-        ordering = ['name']
-        verbose_name = _('company')
-        verbose_name_plural = _('companies')
-    
-    def __unicode__(self):
-        return self.name
-
-    def get_absolute_url(self):
-        return ("company_detail", [self.pk])
-    get_absolute_url = models.permalink(get_absolute_url)
-
-    def save(self):
-        self.name_slug = slugify(self.name)
-        super(Company, self).save()
-                
-
-class Job(models.Model):
-    """
-    A job with its details.
-    """
-    STATUS_CHOICES = (
-        (1, _('Open')),
-        (2, _('Filled')),
-        (3, _('Cancelled')),
-        (4, _('Stale')),
-    )
-    
-    posted_by = models.ForeignKey(User, related_name="jobs_posted", blank=False, null=False)
-    company = models.ForeignKey(Company, related_name="company_jobs", blank=False, null=False)
-    title = models.CharField(_('title'), max_length=200)
-    title_slug = models.SlugField(_('slug'))
-    description = models.TextField(_('description'))
-    status = models.IntegerField(_('status'), choices=STATUS_CHOICES, default=1)
-    date_added = models.DateTimeField(_('date added'), auto_now_add=True, editable=False)
-    date_updated = models.DateTimeField(_('date updated'), auto_now=True, editable=False)
-    date_due = models.DateField(_('date due'), blank=False, null=False)
-    tags = TagField(help_text='separate your tags with a comma and use dash (-) instead of space between words ( example: music, top, top-artists )')
-    class Meta:
-        ordering = ['title']
-    
-    def __unicode__(self):
-        return self.title
-
-    def get_absolute_url(self):
-        return ("job_details", [self.pk])
-    get_absolute_url = models.permalink(get_absolute_url)
-    
-    def get_status(self,set_status):
-        return self.set_status
-    
-    def save(self):
-        job = None
-        if self.id:
-            job = Job.objects.get(id=self.id)
-            if job.status == int(self.status):
-                pass
-            else:
-                job_pre_status_changed.send(sender=self,old_job=job, new_job=self)
-                if settings.DEBUG and not settings.PRODUCTION:
-                    print '-------------------------------->'
-                    print 'old job: %s ======= new job: %s' % (job.status, self.status)
-                    print '-------------------------------->'
-        self.title_slug = slugify(self.title)
-        super(Job, self).save()
-        if job:
-            if job.status == int(self.status):
-                pass
-            else:
-                job_post_status_changed.send(sender=self,old_job=job, new_job=self)
-                if settings.DEBUG and not settings.PRODUCTION:
-                    print '-------------------------------->'
-                    print 'old job: %s ======= new job: %s' % (job.status, self.status)
-                    print '-------------------------------->'
-
-
-class Applicant(models.Model):
-    """
-    A job applicant.
-    """
-    STATUS_CHOICES = (
-        ((0, 'unattended')),
-        ((1, 'candidate')),
-        ((2, 'not qualified')),
-        ((3, 'over qualified')),
-        ((4, 'delisted')),
-        ((5, 'winner')),
-    )
-    user = models.ForeignKey(User, related_name="job_applicant")
-    job = models.ForeignKey(Job, related_name="job_applicant")
-    status = models.IntegerField(_('status'), choices=STATUS_CHOICES, default=0)
-    date_applied = models.DateTimeField(_('date applied'), auto_now_add=True, editable=False)
-    
-    class Meta:
-        unique_together = (('user', 'job'),)
-        
-    def is_at(self):
-        if self.status==0:
-            return self.status
-            
-    def __unicode__(self):
-        return '%s applied for %s' % (self.user.username, self.job)
-        
-    def get_absolute_url(self):
-        return ("job_details", [self.job.pk])
-    get_absolute_url = models.permalink(get_absolute_url)
-    
-    def is_candidate(self):
-        if self.status==1:
-            return self.status
-        
-    def is_notqualified(self):
-        if self.status==2:
-            return self.status
-    
-    def is_overqualified(self):
-        if self.status==3:
-            return self.status
-        
-    def is_delisted(self):
-        if self.status==4:
-            return self.status
-        
-    def is_winner(self):
-        if self.status==5:
-            return self.status
-    
-    def save(self):
-        instance = None
-        super(Applicant, self).save()
-

build/lib.linux-i686-2.6/jobsboard/signals.py

-##!/usr/bin/env python
-
-import django.dispatch
-from jobsboard.models import *
-
-job_pre_status_changed = django.dispatch.Signal(providing_args=['old_job','new_job'])
-job_post_status_changed = django.dispatch.Signal(providing_args=['old_job','new_job'])
-
-
-applicant_pre_status_changed = django.dispatch.Signal(providing_args=['job','applicant','old_status','new_status'])
-applicant_post_status_changed = django.dispatch.Signal(providing_args=['job','applicant','old_status','new_status'])
-
-
-company_pre_edit = django.dispatch.Signal(providing_args=['name','added_by'])
-
-
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/applied_jobs.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-
-{% block head_title %}Applied Jobs - List{% endblock %}
-
-{% block body %}
-    <h1>Applied Job{{ jobs|pluralize }} ({{ jobs.count }})</h1>
-    <br>
-
-    {% for job in jobs %}
-    <span><a href="{% url job_details job.job.id %}">{{ job.job.title }}</a> at <a href="{% url company_detail job.job.company.id %}">{{ job.job.company }}</a></span>۰ <span style="color:#999;">{{ job.date_applied|timesince }}</span> ago ۰<a href="{% url apply_remove_from_list job.id %}" onclick="return check(this);">Delete</a>
-    <br><span>Job Status:{{ job.job.get_status_display }}</span>
-    <br><span>Your Status:{{ job.get_status_display|title }}</span>
-    <br><br>
-    {% endfor %}
-
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/base.html

-{% load i18n %}
-
-<html>
-<head>
-<title>{% block head_title %}{% endblock %}</title>
-</head>
-<script>
-    function check(frm) {
-            var dataIsValid = confirm("Are you sure you wanto to delete from the applied job?");
-            /* all your validation/processing code goes here */
-            if(dataIsValid) {
-                return(true);
-            } else {
-                return(false);
-            }
-            }
-
-    function check_job(frm) {
-            var dataIsValid = confirm("Are you sure you want to delete this job?");
-            /* all your validation/processing code goes here */
-            if(dataIsValid) {
-                return(true);
-            } else {
-                return(false);
-            }
-            }
-
-    function check_applicant_status(frm) {
-            var dataIsValid = confirm("Are you sure you want to change the status?");
-            /* all your validation/processing code goes here */
-            if(dataIsValid) {
-                return(true);
-            } else {
-                return(false);
-            }
-            }
-    function check_company(frm) {
-                var dataIsValid = confirm("Are you sure you want to delete this company?");
-                /* all your validation/processing code goes here */
-                if(dataIsValid) {
-                  return(true);
-                } else {
-                  return(false);
-                }
-              }
-</script>
-<body>
-<h1>MrPau Jobsboard-Demo</h1>
-
-you logged as <b>{{ user }}</b>
-<ul>
-    <li><a href="{% url jobs_list %}">Jobs List</a></li>
-    <li><a href="{% url company_list %}">Companies</a></li>
-    {% if user.is_authenticated %}
-    <li><a href="{% url apply_list %}">Applied Jobs</a></li>
-    <li><a href="{% url your_job_post %}">Your Posted Jobs</a></li>
-    <li><a href="{% url your_company %}">Your Companies</a></li>
-    <li><a href="{% url job_create %}">Post a Job</a></li>
-    <li><a href="{% url company_create %}">Add New Company</a></li>
-    {% endif %}
-</ul>
-{% block body %}
-{% endblock %}
-</body>
-</html>
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/company_detail.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% comment %}
-<!--
-    Display the company detail.
--->
-{% load uni_form %}
-{% load avatar_tags %}
-{% load markup %}
-{% load flagtags %}
-{% load theme_tags %}
-{% endcomment %}
-
-{% block head_title %}Company Details- {{ com.name|title }}{% endblock %}
-
-{% block body %}
-<div>
-    {% if user.is_authenticated %}
-        <h1>{{ com.name }}</h1>
-        <span>
-        {% if com.telephone %}Telephone: {{ com.telephone }}<br>{% endif %}
-        {% if com.fax %}Fax: {{ com.fax }}<br>{% endif %}
-        {{ com.address }}<br>
-        Date Added: {{ com.date_added|date:"F j, Y" }}<br>
-        Added by :{{ com.added_by }}
-</span>
-        <br>
-        <p>
-        {{ com.description|urlize|safe }}
-        </p>
-        {% if com.tag %}Tag: {{ com.tag }}{% endif %}
-            {% ifnotequal com.added_by request.user %}
-            {% else %}<br>
-                <a href="{% url company_edit com.id %}">Edit</a>
-                ۰ <a href="{% url com_remove com.id %}" onclick="return nd_check_company(this);">Delete</a>۰
-            {% endifnotequal  %}
-
-{% comment %}
-<!--This commented code requires django-flag-->
-
-        {% if user.is_authenticated %}
-            {% silk "flag_red" %}
-            <a href="#" onclick="return false;"><span id="flag-toggle">Flag</span></a><br>
-            <div id="flag-form" class="hidden">
-                {% flag com 'added_by' %}
-            </div>
-        {% endif %}
-{% endcomment %}
-
-        <br>
-        <div>
-            <b>{{ jobs.count }} Job{{ jobs|pluralize }} Posted</b>
-        </div>
-        <p>Inform the school where you graduated to verify your account inorder to apply to any opened jobs.</p>
-        <ul>
-            {% for job in jobs %}
-                <li>{% include 'jobsboard/inc_job_list.html' %}</li>
-            {% endfor %}
-        </ul>
-    {% else %}
-        <p>You are not allowed to view this page.</p>    
-    {% endif %}
-</div>
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/company_form.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}
-
-    {% if com_obj %}
-        {{ com_obj|title }}
-    {% else %}
-        Add new company
-    {% endif %}
-
-{% endblock %}
-
-{% block body %}
-
-<div>
-    <div>
-        {% if com_obj %}
-            <h1>{{ com_obj|title }}</h1>
-        {% else %}
-            <h1>Add new company</h1>
-        {% endif %}
-    </div>
-    {% if user.is_authenticated %}
-        <form method="POST" action="">
-            <fieldset>
-                {{ com_form.as_p }}
-                <div>
-                    <input type="submit" value="Update&raquo;"/>
-                </div>
-            </fieldset>
-        </form>
-    {% else %}
-        <p>You are not allowed to edit this</p>    
-    {% endif %}
-
-</div>
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/company_list.html

-{% extends "jobsboard/base.html" %}
-
-{% comment %}
-{% load i18n %}
-{% load uni_form %}
-{% load pagination_tags %}
-{% load avatar_tags %}
-{% load markup %}
-{% endcomment %}
-
-
-
-{% block head_title %}Company List{% endblock %}
-
-{% block body %}
-
-<div>
-    <div>
-        <h1>Company</h1>
-        <div>
-            <form action="" method="get">
-                <input type="text" name="q">
-                <input type="submit" value="Search" name="submit">
-            </form>
-        </div>
-    </div>
-
-    <span>Total Companies {{ company.count }}</span>
-
-    <ul>
-        {% for com in company %}
-            <li>{% include 'jobsboard/inc_company_list.html' %}</li>
-        {% endfor %}
-    </ul>
-</div>
-
-{% endblock %}

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/inc_company_list.html

-
-<b><a href="{% url company_detail com.id %}">{{ com.name|title }}</a></b>
-<br>
-<span>
-    Added on {{ com.date_added|date:"F j, Y" }} - {{ com.date_added|timesince }} ago<br>
-    {{ com.address }}
-</span>
-{% ifnotequal com.added_by user %}
-        {% else %}<br>
-<a href="{% url company_edit com.id %}">Edit</a>
-۰ <a href="{% url com_remove com.id %}" onclick="return check_company(this);">Delete</a>
-{% endifnotequal %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/inc_job_list.html

-    <b><a href="{% url job_details job.id %}" >{{ job.title|title }}</a></b>
-    at 
-    <b><a href="{{ job.company.get_absolute_url }}" >{{ job.company }}</a></b>
-    <br>
-    <span>Posted by: {{ job.posted_by }}</a> ;
-     {{ job.date_added|date:"F j, Y" }} - {{ job.date_added|timesince }} ago
-    ; Status {{ job.get_status_display|title }}
-    </span>
-    {% ifnotequal job.posted_by user %}
-    {% else %}
-        <br>
-        <a href="{% url job_edit job.id %}" >Edit</a> 
-        ۰ <a href="{% url job_remove job.id %}" onclick="return check_job(this);">Delete</a>
-    {% endifnotequal  %}
-
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/job_detail.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}Jobs Board - Details{% endblock %}
-
-{% block body %}
-<div>
-    {% if job %}
-        <h1>{{ job.title }}</h1>
-            <span>Company: <b><a href="{{ job.company.get_absolute_url }}">{{ job.company }}</a></b><br>
-            Posted By: {{ job.posted_by }}<br>
-            <b>Posted since</b>: {{ job.date_added|date:"F j, Y" }} - {{ job.date_added|timesince }} ago<br>
-            <b>Status</b>: {{ job.get_status_display }}
-        </span>
-        {% ifequal job.posted_by request.user %}-
-            Change Status to
-            <a href="{% url job_status job.id 1 %}">Open</a> |
-            <a href="{% url job_status job.id 2 %}">Filled</a> |
-            <a href="{% url job_status job.id 3 %}">Canceled</a> |
-            <a href="{% url job_status job.id 4 %}">Stale</a> |
-        {% endifequal  %}
-
-        <p>{{ job.description|safe }}</p>
-
-        {% if user.is_authenticated %}
-            {% ifnotequal job.posted_by user %}
-                {% if meapp %}
-                    <b>You have already applied for this job</b>
-                {% else %}
-                    {% ifequal job.status jobstatus  %}
-                        <form method="POST" action="">
-                            <fieldset>
-                                {{ app_form }}
-                                <div>
-                                <input type="submit" value="Apply for this job &raquo;"/>
-                                </div>
-                            </fieldset>
-                        </form>
-                    {% endifequal %}
-                {% endif %}
-            {% else %}
-                <a href="{% url job_edit job.id %}">Edit</a> ۰ 
-                <a href="{% url job_remove job.id %}" onclick="return check_job(this);">Delete</a>
-
-            {% endifnotequal  %} ۰ 
-        {% endif %}
-
-{% comment %}
-
-{# requires django-flag #}
-{% silk "flag_red" %}
-    <a href="#" onclick="return false;">
-        <span id="flag-toggle">Flag as inappropriate</span></a>
-    <div id="flag-form" class="hidden">
-        {% flag job 'posted_by' %}
-    </div>
-{% endcomment %}
-
-</div>
-
-<div>
-    <h1>Applicant{{ apps|pluralize }} ({{ apps.count }})</h1>
-    {% if apps %}
-        {% for appcount in application.job.all %}
-            Candidates:{{ appcount.is_candidate.count }}<br><br>
-        {% endfor %}
-        <ul>
-            {% for app in apps %}
-                <li>
-                    <div>
-                        <b>
-                         {{ app.user }}</b>
-                        <br/>Date Applied: {{ app.date_applied|date:"F j, Y" }} - {{ app.date_applied|timesince }} ago
-                        <br/>Status: 
-                        {% if app.is_candidate %} <b style="color:#F08080;">{{ app.get_status_display|title }}</b> {% endif %}
-                        {% ifequal app.is_at 0 %}<b style="color:#008000;">{{ app.get_status_display|title }}</b> {% endifequal %}
-                        {% if app.is_notqualified%} <b style="color:#20B2AA;">{{ app.get_status_display|title }}</b> {% endif %}
-                        {% if app.is_overqualified %} <b style="color:#32CD32;">{{ app.get_status_display|title }}</b> {% endif %}
-                        {% if app.is_delisted %} <b style="color:##C71585;">{{ app.get_status_display|title }}</b> {% endif %}
-                        {% if app.is_winner %} <b style="color:##808000;">{{ app.get_status_display|title }}</b> {% endif %}
-                    </div>
-
-                    {% ifequal job.posted_by user %}
-                        -
-                        <a href="{% url applicant_status app.id 1 %}" title="Candidate"  onclick="return check_applicant_status(this);">Candidate</a> |
-                        <a href="{% url applicant_status app.id 0 %}" title="Unattended"  onclick="return check_applicant_status(this);">Unattended</a> | 
-                        <a href="{% url applicant_status app.id 2 %}" title="Not Qualified" onclick="return check_applicant_status(this);">Not Qualified</a> | 
-                        <a href="{% url applicant_status app.id 3 %}" title="Over Qualified" onclick="return check_applicant_status(this);">Over Qualified</a> | 
-                        <a href="{% url applicant_status app.id 4 %}" title="Delisted" onclick="return check_applicant_status(this);">Delisted</a> | 
-                        <a href="{% url applicant_status app.id 5 %}" title="Winner" onclick="return check_applicant_status(this);">Winner</a> | 
-                        <a href="{% url job_apply_remove app.id job.id %}" title="Delete"  onclick="return check(this);">Delete</a> | 
-                    {% endifequal  %}
-                    {% if app.is_candidate %}
-                        {% ifequal app.user request.user %}
-                            |&nbsp;<a href="{% url apply_remove app.id %}" onclick="return check(this);">Delete</a>
-                            {% endifequal %}<br>
-                        {% endif %}
-                    </div>
-                </li> 
-            {% endfor %}
-        </ul>
-
-    {% else %}
-        No applicants.  Apply now
-    {% endif %}
-</div>
-{% else %}
-    <p>No job found</p>
-{% endif %}
-
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/job_form.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% comment %}
-{% load uni_form %}
-{% uni_form form helper %}
-{% endcomment %}
-
-{% block head_title %}
-
-    {% if is_edit %}
-        {{ job_obj.title }}
-    {% else %}
-        Post a New job
-    {% endif %}
-{% endblock %}
-
-{% block body %}
-<div>
-
-        {% if is_edit %}
-            <h1>{{ job_obj.title }}</h1>
-        {% else %}
-            <h1>Post a New job</h1>
-        {% endif %}
-
-    {% if user.is_authenticated %}
-        <form method="POST" action="">
-            <fieldset>
-                {{ job_form.as_p }}
-                <input type="submit" value="Update&raquo;"/>
-            </fieldset>
-        </form>
-    {% else %}
-            <p>You are not allowed to edit this</p>    
-    {% endif %}
-</div>
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/jobs_list.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}Jobs Board - List{% endblock %}
-
-{% block body %}
-
-<div>
-    <div>
-        <h2>Jobs Board</h2>
-        <div>
-            <form action="" method="get">
-                <input type="text" name="q">
-                <input type="submit" value="Search" name="submit">
-            </form>
-        </div>
-    </div>
-
-        <p>Inform the school where you graduated to verify your account so that you may apply to jobs.</p>
-
-        <h3>Total Jobs {{ jobs.count }}</h3>
-        <ul>
-            {% for job in jobs %}
-                <li>{% include 'jobsboard/inc_job_list.html' %}</li>
-            {% endfor %}
-        </ul>
-</div>
-
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/your_company.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}You Company{% endblock %}
-
-{% block body %}
-<div>
-    <div>
-        <div>
-            <h1>Your Company</h1>
-        </div>
-        <div>
-            <form action="" method="get">
-                <input type="text" name="q">
-                <input type="submit" value="Search" name="submit">
-            </form>
-        </div>
-    </div>
-        <span>Total Companies {{ company.count }}</span>
-    <ul>
-        {% for com in company %}
-            <li>{% include 'jobsboard/inc_company_list.html' %}</li>
-        {% endfor %}
-    </ul>
-</div>
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templates/jobsboard/your_job_post.html

-{% extends "jobsboard/base.html" %}
-
-{% load i18n %}
-
-{% block head_title %}Your Job Post{% endblock %}
-
-{% block body %}
-<div>
-    <div>
-        <h1>Your Posted Jobs</h1>
-        <div>
-            <form action="" method="get">
-                <input type="text" name="q">
-                <input type="submit" class="nd_jobsboard_search" value="Search" name="submit">
-            </form>
-        </div>
-    </div>
-
-    <p>Inform the school where you graduated to verify your account so that you may apply to jobs.</p>
-    <span>Total Jobs {{ jobs.count }}</span>
-
-    <ul>
-        {% for job in jobs %}
-            <li>{% include 'jobsboard/inc_job_list.html' %}</li>
-        {% endfor %}
-    </ul>
-</div>
-{% endblock %}
-

build/lib.linux-i686-2.6/jobsboard/templatetags/__init__.py

-#!/usr/bin/env python
-

build/lib.linux-i686-2.6/jobsboard/templatetags/jobsboard_extras.py

-#!/usr/bin/env python
-
-from django.template import Library, Node, TemplateSyntaxError
-from django.db.models import get_model
-
-from jobsboard.models import *
-
-register = Library()
-
-
-class RandomLinksNode(Node):
-    """
-    Class to view the job in random
-    """
-    def __init__(self, num, varname):
-        self.num, self.varname = num, varname
-    
-    def render(self, context):
-        context[self.varname] = Job.objects.filter(status=1).order_by("?")[:self.num]
-        return ''
-
-
-def get_random_jobs(parser, token):
-    """
-    Function to get RandomLinksNode
-    Code for displaying the random job.
-    You can assign any number you want to view in the list
-            {% get_random_job 5 as jobs %}
-            {% for job in jobs %}
-                {{ job.title }}
-            {% endfor %}
-    """
-
-    bits = token.contents.split()
-    if len(bits) != 4:
-        raise TemplateSyntaxError, "get_random_jobs tag takes exactly 2 arguments"
-    if bits[2] != 'as':
-        raise TemplateSyntaxError, "second argument to the get_random_jobs tag must be 'as'"
-    return RandomLinksNode(bits[1], bits[3])
-get_random_jobs = register.tag(get_random_jobs)
-
-
-class LatestLinksNode(Node):
-    """
-    Class to view the latest jobs
-    """
-    def __init__(self, num, varname):
-        self.num, self.varname = num, varname
-    
-    def render(self, context):
-        context[self.varname] = Job.objects.all().order_by('-date_added')[:self.num]
-        return ''
-
-
-def get_latest_jobs(parser, token):
-    """
-    Function to get the LatestLinksNode to view the Latest job
-    Code for displaying the latest job.
-            {% get_latest_job 5 as jobs %}
-            {% for job in jobs %}
-                {{ job.title }}
-            {% endfor %}
-    """
-
-    bits = token.contents.split()
-    if len(bits) != 4:
-        raise TemplateSyntaxError, "get_latest_jobs tag takes exactly 2 arguments"
-    if bits[2] != 'as':
-        raise TemplateSyntaxError, "second argument to the get_latest_jobs tag must be 'as'"
-    return LatestLinksNode(bits[1], bits[3])
-get_latest_jobs = register.tag(get_latest_jobs)
-
-            
-            
-

build/lib.linux-i686-2.6/jobsboard/tests.py

-"""
-This file demonstrates two different styles of tests (one doctest and one
-unittest). These will both pass when you run "manage.py test".
-
-Replace these with more appropriate tests for your application.
-"""
-
-from django.test import TestCase
-
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
-        """
-        Tests that 1 + 1 always equals 2.
-        """
-        self.failUnlessEqual(1 + 1, 2)
-
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
-
->>> 1 + 1 == 2
-True
-"""}
-

build/lib.linux-i686-2.6/jobsboard/urls.py

-#!/usr/bin/env python
-from django.conf.urls.defaults import *
-
-urlpatterns = patterns('',
-    url(r'^$', 'jobsboard.views.job_list', name='jobs_list'),
-    url(r'^create/$', 'jobsboard.views.job_create', name='job_create'),
-    url(r'^createcompany/$', 'jobsboard.views.company_create', name='company_create'),
-    url(r'^edit/(?P<jobid>\d+)/$', 'jobsboard.views.job_edit', name='job_edit'),
-    url(r'^detail/(?P<jobid>\d+)/$', 'jobsboard.views.job_detail', name='job_details'),
-    url(r'^company/$', 'jobsboard.views.company_list', name='company_list'),
-    url(r'^company/edit/(?P<comid>\d+)/$', 'jobsboard.views.company_edit', name='company_edit'),
-    url(r'^company/detail/(?P<comid>\d+)/$', 'jobsboard.views.company_detail', name='company_detail'),
-    url(r'^detail/applicant/remove/(?P<id>\d+)/$', 'jobsboard.views.apply_remove', name='apply_remove'),
-    url(r'^applied/$', 'jobsboard.views.apply_list', name='apply_list'),
-    url(r'^applied/remove/(?P<id>\d+)/$', 'jobsboard.views.apply_remove_from_list', name='apply_remove_from_list'),
-    url(r'^detail/(?P<id>\d+)/appremove/(?P<jobid>\d+)$', 'jobsboard.views.job_apply_remove', name='job_apply_remove'),
-    url(r'^detail/(?P<id>\d+)/remove/$', 'jobsboard.views.job_remove', name='job_remove'),
-    url(r'^company/(?P<id>\d+)/remove/$', 'jobsboard.views.company_remove', name='com_remove'),
-    url(r'^detail/(?P<id>\d+)/remove/$', 'jobsboard.views.job_remove', name='job_remove'),
-    url(r'^detail/applicant/(?P<id>\d+)/status/(?P<status>\d+)/$', 'jobsboard.views.applicant_status', name='applicant_status'),
-    url(r'^detail/(?P<id>\d+)/status/(?P<status>\d+)/$', 'jobsboard.views.job_status', name='job_status'),
-    url(r'^yourjobpost/$', 'jobsboard.views.your_job_post', name='your_job_post'),
-    url(r'^yourcompany/$', 'jobsboard.views.your_company', name='your_company'),
-)

build/lib.linux-i686-2.6/jobsboard/views.py

-# Create your views here.
-from django.core.urlresolvers import reverse
-from django.shortcuts import render_to_response, get_object_or_404
-from django.template import RequestContext
-from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
-from django.conf import settings
-
-from django.contrib.auth.decorators import login_required
-from django.contrib.auth.models import User
-
-from django.utils.translation import ugettext_lazy as _
-from django.utils.translation import ugettext
-
-
-from jobsboard.models import *
-from jobsboard.forms import *
-from jobsboard.signals import *
-
-from django.core.signals import *
-from django.db.models.signals import *
-
-
-jobstatus = 1
-
-
-def job_list(request, template_name="jobsboard/jobs_list.html"):
-    """
-    display the list of jobs
-    """
-    is_me = False
-    jobs = Job.objects.all().order_by('-date_added')
-    if request.user.is_authenticated():
-        other_user = get_object_or_404(User, username=request.user.username)
-        if request.user == request.user:
-            is_me = True
-        else:
-            is_me = False
-            
-    search_terms = request.GET.get('q', '')
-    if search_terms:
-        jobs = (jobs.filter(title_slug__icontains=search_terms)
-               |jobs.filter(title__icontains=search_terms)
-               |jobs.filter(description__icontains=search_terms)
-               |jobs.filter(status__icontains=search_terms)
-               |jobs.filter(date_added__icontains=search_terms)
-               |jobs.filter(date_updated__icontains=search_terms)
-               |jobs.filter(company__name__icontains=search_terms)
-               |jobs.filter(date_due__icontains=search_terms)
-               |jobs.filter(tags__icontains=search_terms))
-    return render_to_response(template_name, dict({
-            "jobs":jobs,
-            "is_me":is_me,
-        }), context_instance=RequestContext(request))
-
-
-@login_required
-def job_create(request, form_class=JobForm, template_name="jobsboard/job_form.html"):
-    """
-    post new job.  the user must be verified first
-    """
-
-    job_form=form_class()
-    if request.method == "POST":
-        #job_form = form_class(request.user, request.POST)
-        job_form = form_class(request.POST)
-        if job_form.is_valid():
-            job = job_form.save(commit=False)
-            job.posted_by = request.user
-            job.save()
-            request.user.message_set.create(message=_("The job '%s' was added successfully.") % job.title)
-
-            return HttpResponseRedirect(reverse("jobsboard.views.job_list"))
-    else:
-        job_form = form_class()
-
-
-    return render_to_response(template_name, {
-        "job_form": job_form
-    }, context_instance=RequestContext(request))
-
-
-@login_required
-def job_edit(request,jobid,form_class=JobForm, template_name="jobsboard/job_form.html"):
-    """
-    edit job posted.  The user may able to set the status and update information about the job posted.
-    """
-
-    job_obj = Job.objects.get(id=jobid)
-    is_edit=True
-    if job_obj.posted_by == request.user:
-        job_form = form_class(request.POST, instance=job_obj)
-        if request.method == "POST":
-            if job_form.is_valid():
-                job = job_form.save(commit=False)
-                job.id = job_obj.id
-                job.save()
-                request.user.message_set.create(message=_("The job '%s' was changed successfully. ") % job.title)
-                return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[job_obj.id]))
-        else:
-            job_form = form_class(instance=job_obj)
-    else:
-        return HttpResponseRedirect(reverse("jobsboard.views.job_list"))
-    return render_to_response(template_name, {
-        "job_form":job_form,
-        "job_obj":job_obj,
-        "is_edit":is_edit,
-        },context_instance=RequestContext(request))
-
-
-def job_detail(request,jobid, form_class=ApplicantForm, template_name="jobsboard/job_detail.html"):
-    """
-    display the job information and company.  the applicant may able to apply if he/she is a verified user
-    """
-
-
-    job_obj = get_object_or_404(Job, id = jobid)
-    meapp = Applicant.objects.filter(user=request.user, job=job_obj)
-    app = Applicant.objects.filter(job = job_obj)
-    job_d = Job.objects.filter(id = jobid)
-    
-    if request.method == "POST":
-        app_form = form_class(request.POST)
-        if app_form.is_valid():
-            app = app_form.save(commit=False)
-            app.user = request.user
-            app.job = job_obj
-            app.status = 1
-            app.save()
-            request.user.message_set.create(message=_("The applicant '%s' was applied successfully. ") % app.job)
-            return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[job_obj.id]))
-    else:
-        app_form = form_class()
-
-    return render_to_response(template_name, {
-        "job":job_obj,
-        "apps":app,
-        "app_form":app_form,
-        "jobstatus":jobstatus,
-        "meapp":meapp,
-        },context_instance=RequestContext(request))
-
-
-@login_required
-def applicant_status(request, id, status):
-    """
-    change the status of the applicant
-        1 - Open
-        2 - Filled
-        3 - Cancelled
-        4 - Stale
-    
-    the user who post the job is authorize to change the applicants status
-    """
-
-    applicant = Applicant.objects.get(pk=id)
-    job = get_object_or_404(Job, id = applicant.job.id)
-    
-    if job.posted_by==request.user:
-        applicant.status = status
-        applicant.save()
-        request.user.message_set.create(message=_("The applicant '%s' was changed successfully. ") % applicant.user)
-        return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[job.id]))
-    else:
-        request.user.message_set.create(message=_("Not successfully save.  May be you are not authorize"))
-        return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[job.id]))
-
-
-@login_required
-def apply_remove(request, id):
-    """
-    remove applicant from applied jobs
-    """
-
-    apply = Applicant.objects.get(pk = id)
-    if apply.user==request.user:
-        apply.delete()
-        request.user.message_set.create(message=_("Successfully remove from '%s'") % apply.job)
-    else:
-        request.user.message_set.create(message=_("Not successfully remove from '%s'") % apply.job)
-    return HttpResponseRedirect(reverse("jobsboard.views.job_list"))
-
-@login_required
-def apply_list(request, template_name='jobsboard/applied_jobs.html'):
-    """
-    display the list of users applied jobs
-    """
-
-    job = Applicant.objects.filter(user=request.user)
-    return render_to_response(template_name, {
-        "jobs": job,
-    }, context_instance=RequestContext(request))
-
-
-@login_required
-def apply_remove_from_list(request, id):
-    """
-    remove applicant from the list user''s applied
-    """
-
-    try:
-        apply = Applicant.objects.get(pk = id)
-    except Exception:
-        return HttpResponseRedirect(reverse('jobsboard.views.apply_list'))
-    
-    if apply.user==request.user:
-        apply.delete()
-        msg = "Your application has been successfully removed from '%s'" % (apply.job,)
-        request.user.message_set.create(message=_(msg))
-    else:
-        msg = "Your application has not been removed from '%s'" % (apply.job,)
-        request.user.message_set.create(message=_(msg))
-    return HttpResponseRedirect('')
-
-
-@login_required
-def job_apply_remove(request, id, jobid):
-    """
-    remove applicant by employers
-    """
-
-    job = get_object_or_404(Job, id = jobid)
-    apply = Applicant.objects.get(pk = id)
-    if job.posted_by==request.user:
-        apply.delete()
-        request.user.message_set.create(message=_("Successfully remove from '%s'") % apply.job)
-    else:
-        request.user.message_set.create(message=_("Not successfully remove from '%s'") % apply.job)
-    return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[jobid]))
-
-
-@login_required
-def job_remove(request, id):
-    """
-    remove job by the employer
-    """
-
-    job = get_object_or_404(Job, id = id)
-    if job.posted_by==request.user:
-        job.delete()
-        request.user.message_set.create(message=_("Successfully remove from '%s'") % job.title)
-    else:
-        request.user.message_set.create(message=_("Not successfully remove from '%s'") % job.title)
-        
-    return HttpResponseRedirect(reverse('jobsboard.views.your_job_post'))
-
-
-def job_status(request, status, id):
-    """
-    employer change the status of applicant
-    """
-
-    job = get_object_or_404(Job, id = id)
-    if job.posted_by==request.user:
-        job.status=status
-        job.save()
-        request.user.message_set.create(message=_("Successfully update the '%s'") % job.title)
-    else:
-        request.user.message_set.create(message=_("Not successfully update the '%s'") % job.title)
-    return HttpResponseRedirect(reverse("jobsboard.views.job_detail", args=[id]))
-
-
-@login_required
-def company_remove(request, id):
-    """
-    remove the company by the user who added the company
-    """
-
-    com = get_object_or_404(Company, id = id)
-    if com.added_by==request.user:
-        com.delete()
-        request.user.message_set.create(message=_("Successfully remove from '%s'") % com.name)
-    else:
-        request.user.message_set.create(message=_("Not successfully remove from '%s'") % com.name)
-    return HttpResponseRedirect(reverse('jobsboard.views.your_company'))
-
-
-def company_list(request, template_name="jobsboard/company_list.html"):
-    """
-    display the list of company
-    """
-
-    is_me = False
-    company = Company.objects.all().order_by('name')
-    if request.user.is_authenticated():
-        other_user = get_object_or_404(User, username=request.user.username)
-
-        if request.user == other_user:
-            is_me = True
-        else:
-            is_me = False
-
-    search_terms = request.GET.get('q', '')
-    if search_terms:
-        company = (company.filter(name__icontains=search_terms)
-               |company.filter(name_slug__icontains=search_terms)
-               |company.filter(telephone__icontains=search_terms)
-               |company.filter(fax__icontains=search_terms)
-               |company.filter(address__icontains=search_terms)
-               |company.filter(description__icontains=search_terms)
-               |company.filter(added_by__username__icontains=search_terms)
-               |company.filter(date_added__icontains=search_terms)
-               |company.filter(tags__icontains=search_terms))
-    return render_to_response(template_name, dict({
-            "company":company,
-            "is_me":is_me,
-        }), context_instance=RequestContext(request))
-
-
-@login_required
-def company_create(request, form_class=CompanyForm, template_name="jobsboard/company_form.html"):
-    """
-    add company.  verified user only can be able to add new company
-    """
-    if request.method == "POST":
-        com_form = form_class(request.POST)
-        if com_form.is_valid():
-            com = com_form.save(commit=False)
-            com.added_by = request.user
-            com.save()
-            request.user.message_set.create(message=_("Successfully saved post '%s'") % com.name)
-            return HttpResponseRedirect(reverse("jobsboard.views.company_list"))
-    else:
-        com_form = form_class()
-
-    return render_to_response(template_name, {
-        "com_form": com_form
-    }, context_instance=RequestContext(request))
-
-
-#Modify the existing company
-@login_required
-def company_edit(request,comid,form_class=CompanyForm, template_name="jobsboard/company_form.html"):
-    """
-    edit the company detail by verified user who added the company
-    """
-
-    com_obj = get_object_or_404(Company, id=comid)
-    if com_obj.added_by == request.user:
-        if request.method == "POST":
-            com_form = form_class(request.POST, instance=com_obj)
-            if com_form.is_valid():
-                com = com_form.save(commit=False)
-                com.id = com_obj.id
-                com.save()
-                request.user.message_set.create(message=_("Successfully saved '%s'") % com.name)
-
-                return HttpResponseRedirect(reverse("jobsboard.views.company_list"))
-        else:
-            com_form = form_class(instance=com_obj)
-    else:
-        return HttpResponseRedirect(reverse("jobsboard.views.company_list"))
-    return render_to_response(template_name, {
-        "com_form":com_form,
-        "com_obj":com_obj,
-        },context_instance=RequestContext(request))
-
-
-def company_detail(request,comid, template_name="jobsboard/company_detail.html"):
-    """
-    display the detail of the company
-    """
-
-    com_d = get_object_or_404(Company,id = comid)
-    job_d = Job.objects.filter(company=com_d)
-    return render_to_response(template_name, {
-        "com":com_d,
-        "jobs":job_d,
-        },context_instance=RequestContext(request))
-
-@login_required
-def your_job_post(request, template_name="jobsboard/your_job_post.html"):
-    """
-    display the list of job posted by verified user
-    """
-
-    job = Job.objects.filter(posted_by = request.user)
-    
-    search_terms = request.GET.get('q', '')
-    if search_terms:
-        job = (job.filter(title_slug__icontains=search_terms)
-               |job.filter(title__icontains=search_terms)
-               |job.filter(description__icontains=search_terms)
-               |job.filter(status__icontains=search_terms)
-               |job.filter(date_added__icontains=search_terms)
-               |job.filter(date_updated__icontains=search_terms)
-               |job.filter(company__name__icontains=search_terms)
-               |job.filter(date_due__icontains=search_terms)
-               |job.filter(tags__icontains=search_terms))
-
-
-    return render_to_response(template_name, {
-        "jobs":job,
-    }, context_instance=RequestContext(request))
-
-
-#List of company you added
-@login_required
-def your_company(request, template_name="jobsboard/your_company.html"):
-    """
-    display the list of company of verified user added
-    """
-
-    company = Company.objects.filter(added_by=request.user)
-    search_terms = request.GET.get('q', '')
-    if search_terms:
-        company = (company.filter(name__icontains=search_terms)
-               |company.filter(name_slug__icontains=search_terms)
-               |company.filter(telephone__icontains=search_terms)
-               |company.filter(fax__icontains=search_terms)
-               |company.filter(address__icontains=search_terms)
-               |company.filter(description__icontains=search_terms)
-               |company.filter(date_added__icontains=search_terms)
-               |company.filter(tags__icontains=search_terms))
-    return render_to_response(template_name, dict({
-            "company":company,
-        }), context_instance=RequestContext(request))
-

examples/jobsboarddemo/jobsboard

Binary file modified.

jobsboard/tests.py

 """
 
 from django.test import TestCase
+from django.test.client import Client
+from django.contrib.auth.models import User
+from django.template import Context, Template
+from django.http import HttpResponse, HttpResponseForbidden, HttpResponseRedirect
 
-class SimpleTest(TestCase):
-    def test_basic_addition(self):
+from jobsboard.models import Company, Job
+
+class CompanyViewTestCase(TestCase):
+    def setUp(self):
+        self.u = User.objects.create_user('testuser', 'testuser@gmail.com', password='password')
+        self.u.is_active = True
+        self.u.save()
+
+        self.u1 = User.objects.create_user('testuser1', 'testuser1@gmail.com', password='password1')
+        self.u1.is_active = True
+        self.u1.save()
+
+        if self.client.login(username='testuser', password='password'):
+            company = self.client.post('/createcompany/', 
+                        {
+                            'name': 'company 1',
+                            'description': 'web and software development company',
+                            'address':'midsayap',
+                            'fax':'111-11-111',
+                            'added_by': self.u,
+                            'tags': 'company1'
+                        })
+
+            self.com = Company.objects.get(pk=1)
+
+            job1 = self.client.post('/create/', {
+                    'title':'bank accountant',
+                    'posted_by':self.u,
+                    'company':self.com.id,
+                    'description':'basic accountant work',
+                    'status':1,
+                    'date_due':'2000-01-01'
+                    })
+
+            job2 = self.client.post('/create/', {
+                    'title':'web dev',
+                    'posted_by':self.u,
+                    'company':self.com.id,
+                    'description':'basic accountant work',
+                    'status':1,
+                    'date_due':'2000-01-01'
+                    })
+
+            job3 = self.client.post('/create/', {
+                    'title':'programmer',
+                    'posted_by':self.u,
+                    'company':self.com.id,
+                    'description':'basic accountant work',
+                    'status':1,
+                    'date_due':'2000-01-01'
+                    })
+
+            self.getj1 = Job.objects.get(pk=1)
+
+            updatejob1 = self.client.post('/edit/%d/' % self.getj1.id, 
+                        {
+                        'title':'bank accountant update',
+                        'posted_by':self.u,
+                        'company':self.com.id,
+                        'description':'basic accountant work',
+                        'status':1,
+                        'date_due':'2000-01-01'
+                        })
+
+        else: 
+            print "client.login FAILED"
+
+        self.c = Company.objects.get(pk=1)
+
+        self.j1 = Job.objects.get(pk=1)
+        self.j2 = Job.objects.get(pk=2)
+        self.j3 = Job.objects.get(pk=3)
+
+    def testCompany_Unicode(self):
         """
-        Tests that 1 + 1 always equals 2.
+        company unicode..
         """
-        self.failUnlessEqual(1 + 1, 2)
+        self.assertEquals(self.c.__unicode__(), 'company 1')
 
-__test__ = {"doctest": """
-Another way to test that 1 + 1 is equal to 2.
+    def testCompany_URL(self):
+        """
+        check company url
+        """
+        self.assertEquals(self.c.get_absolute_url(), '/company/%d/' % self.c.id)
 
->>> 1 + 1 == 2
-True
-"""}
+    def testCompany_Slugify(self):
+        """
+        slugify must be slugfied from the company name
+        """
+        self.assertEquals(self.c.name_slug, 'company-1')
 
+    def testJob_Unicode(self):
+        """
+        unicode must be correct
+        """
+        self.assertEquals(self.j1.__unicode__(),'bank accountant update')
+
+    def testJob_URL(self):
+        """
+        check if url match
+        """
+        self.assertEquals(self.j1.get_absolute_url(), '/detail/%d/' % self.j1.id)
+
+    def testJob_Slugify(self):
+        """
+        check slugy job title
+        """
+        self.assertEquals(self.j1.title_slug, 'bank-accountant-update')
+
+    def testJob_GetLatest_Tag(self):
+        """
+        test template tag for get latest jobs
+        """
+        t = Template("""
+        {% load jobsboard_extras %}
+        {% get_latest_jobs 5 as jobs %}
+            {% for job in jobs %}
+                {{ job.title }}
+            {% endfor %}
+        """)
+        html = t.render(Context())
+
+    def testJob_Random_Tag(self):
+        """
+        test template tag for random jobs
+        """
+        t = Template("""
+        {% load jobsboard_extras %}
+        {% get_random_jobs 5 as jobs %}
+            {% for job in jobs %}
+                {{ job.title }}
+            {% endfor %}
+        """)
+        html = t.render(Context())
+
+    def testJob_List(self):
+        """
+        test view list of jobs
+        """ 
+        company = self.client.get('', {'q':'web'})
+        html = company
+
+    def testYourJob_List(self):
+        """
+        test view list of jobs
+        """
+        company = self.client.get('/yourjobpost/', {'q':'bank'})
+        html = company
+