Giter Club home page Giter Club logo

django-app2's Introduction

Django Job Board App Demo

How to Set up

  • python -m venv env
  • source env/bin/activate
  • pip install django
  • django-admin startproject config .
  • python manage.py startapp jobboard
  • Update INSTALLED_APPS in settings.py
  • Update views.py and urls.py

Django Models

  • python manage.py makemigrations
  • python manage.py migrate

CRUD Operations

  • python manage.py shell to enter the shell
  • from jobboard.models import JobPosting
  • JobPosting.objects.all()
  • JobPosting.objects.get(id=1)
  • JobPosting.objects.create(title='full stack developer', description='an awesome job', company='ABC tech', salary=120000)
  • job = JobPosting.objects.get(id=1)
  • job
  • job.description = "A good job" to update the description
  • job.save()

Django Admin

  • python manage.py createsuperuser ( enter username and password)
  • Go to http:localhost:8000/adminand login

Update admin.py

  • admin.site.register(JobPosting)

Update models.py

so that it doesn’t show JobPosting Object in the Panel

def __str__(self):
        return f"{self.title} | {self.company}"

django-app2's People

Contributors

languagexange avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.