Giter Club home page Giter Club logo

django_models's Introduction

Task 76: Django Models

Create a new GitHub repository with a README.md, and Python .gitignore file.
Clone it to your machine/computer, which will create a new folder on your computer with your repository’s content.
Create a new virtual environment in that folder named .env and install Django in it.
Create a new Django project. Use your Zuriboard Student ID as the name of the project.
Create a new application using the Django startapp command. The app should be called blog.

Add the blog app to the main_projects INSTALLED_APPS.

Create a new model in the blog app called Post. It should have the following fields:

Post


Title : A string of maxlength 200, use Django’s models.CharField

Text : Any amount of text, use Django’s TextField

Author : A Foreign Key to the current user model. Make use of Django’s get_user_model function.

Created_date : A date-time column, use Django’s models.DateTimeField.

Published_date : A date-time column, use Django’s models.DateTimeField.


Create migrations for your new model using the makemigrations Django command.
Run all migrations using the migrate Django command.
Stage and Commit your Django project and push your changes to your GitHub repository.
Ensure your final code/submission is on the default branch of your GitHub repository.

django_models's People

Contributors

4dbyron avatar

Stargazers

 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.