upwork helper Part 2 job viewer

Last updated on by michaelyin

As I said in the last post, the second part of the program which help me better find work on upwork is a web app which display the job data in better UI, there are many options to do this job, django seems a good choice because django has a a very good doc and tons of package for future expansion.

Now I need to choose a frontend framework to help me develop web app quickly, bootstrap3 seems the best option.

1. Job viewer

Create data model called Job in the django model like this

class Job(models.Model):
    class Meta:
        db_table = 'job'

    job_id = models.CharField(max_length=20)
    skills = models.CharField(max_length=200, db_index=True)

    category = models.TextField()
    sub_category = models.TextField()
    job_type = models.TextField()
    url = models.TextField()

    date_created = models.DateTimeField(db_index=True)
    duration = models.TextField(null=True)

    title = models.TextField()
    snippet = models.TextField()
    workload = models.TextField(null=True)

Now the job info such as job description and title can be seen clearly, if I want to see more detail about the client who post the job, I can click the detail button, I can see all the history job about the client so I can know if this client professional.

To make web app support job search, Haystack is imported because it features a unified, familiar API that allows you to plug in different search backends without having to modify your code

class JobList(ListView): queryset = SearchQuerySet().all() paginate_by = 10 template_name = 'job/list.html' context_object_name = "jobs"

def get_queryset(self):
    term = self.request.GET.get('key', '').strip()
    return super(JobList, self).get_queryset().filter(content=term).order_by('-date_created')

You can see the search code is consist with django, which is very easy to use.

Send Me Message

Tell me more about your project and see if I can help you.

Contact Me