Code

Opened 7 years ago

Closed 7 years ago

#3921 closed (worksforme)

Error report - Your first Django app, part 1,2

Reported by: Ondrej.Suchomel Owned by: anonymous
Component: Documentation Version: 0.96
Severity: Keywords: __str__
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Part 1:
Python command line doesn´t display any data from DB when typing poll.obejct.something. It shows "[<Poll: Poll object>]". It looks that adding methods str(self) in models.py didn´t work.
Part 2:
manage.py syncdb doesn´t work. When I commented added methods(mentioned above), it worked

=> error in syntax of the methods.

Attachments (0)

Change History (3)

comment:1 Changed 7 years ago by Ondrej.Suchomel <ondrej@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 7 years ago by Ondrej.Suchomel <ondrej@…>

  • Owner changed from jacob to anonymous
  • Status changed from new to assigned

comment:3 Changed 7 years ago by ubernostrum

  • Resolution set to worksforme
  • Status changed from assigned to closed

I'm unable to reproduce this; adding __str__ to the models as indicated in the tutorial produced the output shown in the tutorial, so this is an issue somewhere in the code you're writing as you follow along. Please post to the django-users mailing list (http://groups.google.com/group/django-users/) with a detailed description of the problem, including the code you're using.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.