Thanks for clarifying that for me. I can access all of the info in the
detail view now.
Brian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users
On Saturday 18 February 2006 03:12, bsnipes wrote:
> I finally see! What is returned by get_object() is dependent upon
> the results of the __repr__ method in the model setup. Hmmm. now
> to get it into a parsable format...
No, get_object() gets the object itself, with .name and all the oth
I finally see! What is returned by get_object() is dependent upon the
results of the __repr__ method in the model setup. Hmmm. now to
get it into a parsable format...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gr
Don't know if this helps, but this is what I get from the shell:
>>> from django.models.foodlog import foods,periods
>>> foods.get_object(pk=1)
1
>>> foods.get_values(pk=1)
[{'eat_date': datetime.datetime(2006, 2, 10, 19, 51), 'period_id': 3,
'id': 1, 'calories': 400, 'description': 'mac and chee
Still must be doing something wrong.
My urls.py has:
(r'^foodlog/$', 'foodlog.views.index'),
(r'^foodlog/(\d+)/$', 'foodlog.views.details'),
My views.py has:
- snip
def index(request):
latest_log_entries = foods.get_list()
return render_to_response('foodlog/index',
On 2/16/06, bsnipes <[EMAIL PROTECTED]> wrote:
> I am just learning Python and Django and can't seem to be able to
> figure this out. As a test app I am trying to make a 'foodlog' app to
> track food eaten, when, and calories. My model file looks like this:
>
> --- snip
> from django.cor
I am just learning Python and Django and can't seem to be able to
figure this out. As a test app I am trying to make a 'foodlog' app to
track food eaten, when, and calories. My model file looks like this:
--- snip
from django.core import meta
class Period(meta.Model):
name = met
7 matches
Mail list logo