---
title: "Django on Ubuntu"
description: "Django | The Web framework for perfectionists with deadlines Settings it up: sudo apt-get install django Check out the in JS."
url: "https://h3manth.com/scribe/django-ubuntu/"
canonical_url: "https://h3manth.com/scribe/django-ubuntu/"
markdown_url: "https://h3manth.com/scribe/blog/django-ubuntu.md"
publishDate: "2010-01-26T00:00:00.000Z"
author: "Hemanth HM"
category: "python"
tags: ["python","ubuntu","web"]
word_count: 255
reading_time_minutes: 2
x_markdown_tokens: 593
content_signal: "ai-train=yes, search=yes, ai-input=yes"
---

# Django on Ubuntu

> Django | The Web framework for perfectionists with deadlines Settings it up: sudo apt-get install django Check out the in JS.

**Django | The Web framework for perfectionists with deadlines**

**Settings it up:** ` sudo apt-get install django `

Check out the options of the command _django-admin_

**Start s project** `hemanth@ubuntu:~/django$ django-admin startproject mysite` `hemanth@ubuntu:~/django$ cd mysite` `hemanth@ubuntu:~/django$ ls ` ` **init**.py manage.py settings.py urls.py ` **This is the basis of the application**

manage.py => application we use to RUN certain commands.

setting.py => The default settings file called, settings.py

urls.py => It allows us to describe via a regex where to direct http requests.

**Startapp** ` hemanth@ubuntu:~/django/mystie$ ./manage.py startapp myblog hemanth@ubuntu:~/django/mystie$ cd myblog ; ls **init**.py models.py tests.py views.py `

**init**.py => runs when the app is loaded.

models.py => This is where we describe our database structure.

views.py => This is how we describe how our data is shown to the user.

Unlock admin panel ` In urls.py [ uncommenting ]:`

## from django.contrib import admin

## admin.autodiscover()

(remove the #) and also from the #(r'admin/',include(admin.site.urls)),

` In settings.py [ INSTALLED_APPS should have 'django.contrib.admin'] : INSTALLED_APPS = (`
    
    
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.admin',
    

) 

SyncDB [ Create's if not present ]: 

P.S : The settings.py must have DB detials, for the easy of it let it be sqllite3 DATABASE_ENGINE = 'sqlite3' ` hemanth@ubuntu:~/django/mysite$ ./manage.py syncdb `

**Start Server** ` hemanth@ubuntu:~/mystie$ ./manage.py runserver Validating models... 0 errors found Django version 1.2 alpha 1 SVN-12205, using settings 'mystie.settings' Development server is running at http://127.0.0.1:8000/ Quit the server with CONTROL-C. ` _Got to http://127.0.0.1:8000/admin_

P.S : For people in <3 with Drupal have look at [pinax](http://pinaxproject.com/)
