Giter Site home page Giter Site logo

django-helloworld's Introduction

django-helloworld

A Django 'Hello World' program example.

Installation

You need install the pre-requirements for run this Hello World example.

Update repositories of available packages to install, with the following command:

$ sudo apt update

Install necessary minimum dependencies, with the following command:

$ sudo apt install python3-dev python3-pip python3-virtualenv sqlitebrowser

For run this example need to install Django framework execute the follow command:

$ sudo pip install -r requirements.txt

And later followed by:

$ python3 manage.py migrate

At which point you should see:

Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions, sites
Running migrations:

  Applying contenttypes.0001_initial... OK
  Applying auth.0001_initial... OK
  Applying admin.0001_initial... OK
  Applying admin.0002_logentry_remove_auto_add... OK
  Applying admin.0003_logentry_add_action_flag_choices... OK
  Applying contenttypes.0002_remove_content_type_name... OK
  Applying auth.0002_alter_permission_name_max_length... OK
  Applying auth.0003_alter_user_email_max_length... OK
  Applying auth.0004_alter_user_username_opts... OK
  Applying auth.0005_alter_user_last_login_null... OK
  Applying auth.0006_require_contenttypes_0002... OK
  Applying auth.0007_alter_validators_add_error_messages... OK
  Applying auth.0008_alter_user_username_max_length... OK
  Applying auth.0009_alter_user_last_name_max_length... OK
  Applying sessions.0001_initial... OK
  Applying sites.0001_initial... OK
  Applying sites.0002_alter_domain_unique... OK

For use the Django Admin Interface, it's needed to create a superuser for management, with the following command:

$ python3 manage.py createsuperuser --username admin --email [email protected]

At which point you should see:

Password:
Password (again):

Superuser created successfully.

Run application

After which you can run:

$ python3 manage.py runserver

Then, you can open the URL http://127.0.0.1:8000/ in your web browser and you can see the hello world example like this:

A Django 'Hello World' program example

A Django 'Hello World' program example

Also you can open in your web browser the URL http://127.0.0.1:8000/admin for access to the Django Admin Interface like this:

Django Admin Interface running

Django Admin Interface running

django-helloworld's People

Contributors

macagua avatar gechandesu 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.