Commit 35f05d59 authored by Jean Michel Rouly's avatar Jean Michel Rouly
Browse files

Introduced URLs model.

parent 4629038d
......@@ -11,7 +11,7 @@ MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'bookshare', # Or path to database file if using sqlite3.
# The following settings are not used with sqlite3:
'USER': 'bookshare',
......
......@@ -6,12 +6,12 @@ from django.conf.urls import patterns, include, url
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'bookshare.views.home', name='home'),
# url(r'^bookshare/', include('bookshare.foo.urls')),
url(r'^$', 'bookshare.views.home', name='home'),
url(r'^bookshare/', include('bookshare.foo.urls')),
# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
# url(r'^admin/', include(admin.site.urls)),
url(r'^admin/', include(admin.site.urls)),
)
from django.db import models
# Create your models here.
class Book( models.Mode ):
title = models.CharField(max_length = 200)
author = models.CharField(max_length = 200)
ISBN = models.CharField(max_length = 200)
uploaded = models.DateField(auto_add_now)
condition = TextField()
sold = models.BooleanField()
price = models.IntegerField()
# for later with moar space --> image upload
# slugfield
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
# Create your views here.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment