Changes between Version 17 and Version 18 of DjangoCheatSheet


Ignore:
Timestamp:
11/29/2007 02:12:05 PM (7 years ago)
Author:
Richard D. Worth <rdworth@…>
Comment:

indented to 4 spaces

Legend:

Unmodified
Added
Removed
Modified
  • DjangoCheatSheet

    v17 v18  
    4141
    4242class Ticket (models.Model):
    43   user = models.ForeignKey (User)
    44   case_number = models.IntegerField()
    45   dollar_amount = models.FloatField('Cost (in dollars)', max_digits=10, decimal_places=2)
     43    user = models.ForeignKey (User)
     44    case_number = models.IntegerField()
     45    dollar_amount = models.FloatField('Cost (in dollars)', max_digits=10, decimal_places=2)
    4646}}}
    4747see: [http://www.djangoproject.com/documentation/model_api/ model api], [http://www.djangoproject.com/documentation/models/ model examples]
     
    5353python manage.py syncdb
    5454}}}
    55 
    56 
    57 
    5855
    5956== Design your urls ==
     
    7067
    7168info_dict = {
    72   'queryset': Ticket.objects.all()
     69    'queryset': Ticket.objects.all()
    7370}
    7471
     
    107104
    108105{% block content %}
    109   {% for invoice in object_list %}
    110     <p>{{ invoice.dollar_amount }}</p>
    111   {% endfor %}
     106    {% for invoice in object_list %}
     107        <p>{{ invoice.dollar_amount }}</p>
     108    {% endfor %}
    112109{% endblock %}
    113110}}}
Back to Top