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 9221601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:36:47+00:00 2026-06-18T03:36:47+00:00

I am following a tutorial on Django which is basically a series of short

  • 0

I am following a tutorial on Django which is basically a series of short todos that lead to the building of a web application to manage bookmarks.

So far I’ve:
– installed Django 1.4.2 properly
– created the project and its folders (be low my question is related to that…)
– set the database engine (sqlite3)
– defined views.py to show a simple message on a webpage (Congrats youve created a webpage…)
– defined an entry for the main page in the urls.py. See below:

from django.conf.urls.defaults import *
from bookmarks.views import *
urlpatterns = patterns('',
(r'^$', main_page),
)

so, so f, everything worked like a charm.

Then I had to work on the database. I’ve:

-created the data model by typing the following in models.py:

from django.db import models

class Link(models.Model):
    url = models.URLField(unique=True)

-defined the INSTALLED APPS in settings.py as follow:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django_bookmarks.bookmarks',
)

here’s the tricky part. I had to sync the data tables. So I typed:

manage.py syncdb

but I got an error message saying: there is no bookmarks module

So I checked the folder structure and it was as follow

django_bookmarks
├── bookmarks
│   ├── __init__.py
│   ├── models.py
│   ├── tests.py
│   └── views.py
├── django_bookmarks
│   ├── __init__.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
└── manage.py

So, at that point, I moved the “bookmarks” folder into django_bookmarks (the subfolder one). When I did “syncdb” it worked fine. Then I replaced the “bookmarks” to its original place just like shown on the tree above. So I continue thinking I triumphed…

I then had to work on the data Bookmark Data Model. I followed the tutorial’s directive and typed the following in bookmarks/models.py:

from django.contrib.auth.models import User

class Bookmark(models.Model):
    title = models.CharField(maxlength=200)
    user = models.ForeignKey(User)
    link = models.ForeignKey(Link)

To create the table I had to type “manage.py syncdb” again. BUT then comes the error message: no bookmarks module. So I cut-pasted the “bookmarks” folder again in the “django_bookmarks” (the subfolder one) thinking it would work.. but it didnt.. it printed about 17 lines (Python traceback) which line 15 (or 16..) was about models.py (models.CharField(maxlength=200)) and the line in

Python27/lib/site-packages/django/db/models/fields/__init__

and the very last message being:

TypeError: __init__() got an unexpected keyword argument 'maxlength'

I don’t see what’s wrong. I followed the tutorial
(except when I could not sync tables and I resorted to pasting the “bookmarks” folder elsewhere…)
…and the folder tree seems pretty standard.
Why it does not find the “bookmark” module?

Any help will do 🙂 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-06-18T03:36:48+00:00Added an answer on June 18, 2026 at 3:36 am

    there’s no maxlength attribute of CharField. but there is max_length. you’re missing the underscore

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In a blog application (which I have mostly built following a tutorial), I would
I have a Django web application, which allows users to do stop/start/install_pkg on a
I am following the tutorial on the DJango site, which I previsouly did using
First, I'm following the tutorial on the Django Poll application on their site and
I am following a tutorial for django , im hosting my project in a
I'm following the Django tutorial and got stuck with an error at part 4
I am following the django tutorial here . I have copied everything exactly. After
I'm following the Django-CMS introductory tutorial and have got everything working up to the
In answering another question, someone showed me the following tutorial, in which the author
I've built a Django web application and some Django-Piston services. Using a web interface

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.