Django cheat sheet

header
  1. admin.site.site_header = "header name to be displayed"
  2. url(r'^$', views.home, name='home'),
  3. url(r'', include('hello.urls') ),
  4. 'DIRS': [os.path.join(BASE_DIR, "templates")],
  5. # Register your models here.
    admin.site.register(Contact)
  6. # Create your models here.
    class Contact(models.Model):
  7. displayed models name:
  8. def __str__(self):
            return self.name
      
  9. # Application definition

    INSTALLED_APPS = [
        'knoob.apps.KnoobConfig',