Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6473647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:29:28+00:00 2026-05-25T06:29:28+00:00

Learning django from learning website development using django. In chapter 3, building a bookmark

  • 0

Learning django from “learning website development using django”. In chapter 3, building a bookmark data model, I followed the instructions and code given except for–

from django.contrib.auth.models import User
class Bookmark(models.Model):
title = models.CharField(maxlength=200)
user = models.ForeignKey(User)
link = models.ForeignKey(Link)

where I changed

title = models.CharField(maxlength=200)

into

title = models.CharField(max_length=200)

as I was geting an error message. After that, I ran python manage.py syncdb, then, python manage.py sql bookmarks. When I checked http://localhost:8000/user/my_username, I get this error message:

Request Method:     GET
Request URL:    http://127.0.0.1:8000/user/j/
Django Version:     1.3
Exception Type:     TemplateSyntaxError
Exception Value:    

**Caught DatabaseError while rendering: no such column: bookmarks_bookmark.title**

Looking this up, I learned that sqlite3, the database i was using, cannot find bookmarks_bookmark.title. I went back into the book to make sure I have everything copied correctly, and I did except for that part that I changed (max_length). When I ran python manage.py sql bookmarks, it gave me–

BEGIN;
CREATE TABLE "bookmarks_bookmark" (
"id" integer NOT NULL PRIMARY KEY,
"title" varchar(200) NOT NULL,
"user_id" integer NOT NULL REFERENCES
"auth_user" ("id"),
"link_id" integer NOT NULL REFERENCES
"bookmarks_link" ("id"),
);
CREATE TABLE "bookmarks_link" (
"id" integer NOT NULL PRIMARY KEY,
"url" varchar(200) NOT NULL UNIQUE
);
COMMIT;

How do I fix this? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:29:29+00:00Added an answer on May 25, 2026 at 6:29 am

    Manual deleting works.

    sqlite3 yourdb.db 
    > drop table bookmarks_bookmark;
    > .quit
    cd yourpythonproj
    python2 manage.py syncdb
    python2 manage.py runserver
    

    bash script

    #!/bin/bash
    sqlite3 ../yourdb.db 'drop table yourtable'
    python2 manage.py syncdb
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning Python now because of the Django framework. I have been a Perl
Learning from my last question , most member names seem to get included in
I started learning Django recently and am having a strange problem with the tutorial.
In the process of learning Django and Python. I can't make sense of this.
So I am just starting out on learning Django, and I'm attempting to complete
I'm learning Python and django at the same time. I'm trying to create an
I am learning Django and I am trying to understand the use of models.py
I am still learning to do javascript and django and yesterday I tried to
I start using matplotlib a month ago, so I'm still learning. I'm trying to
I was wondering is learning Python and Django a hard/time consuming process for someone

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.