Hay all, I'm having difficulty accessing the first related object within a template.
I'm using
{{ course.student_set.all[0].get() }}
but its throwing loads of errors. How do i get the first related object?
Thanks
...
My question is a design question :
let's say i have a data entry web page with 4 drop down lists, each depending on the previous one, and a bunch of text boxes.
ddlCountry (DropDownList)
ddlState (DropDownList)
ddlCity (DropDownList)
ddlBoro (DropDownList)
txtAddress (TxtBox)
txtZipcode(TxtBox)
and an object that represents a dataro...
So how do you display complex aggregated ViewModels whose Models have relations to each other?
NO wpf disciple ever spoke about that, guess why its not possible...
Do you think thats true?
Don`t understand me?
Look: A CustomerViewModel has many OrderViewModel and those many ProductViewModel.
You have 3 Workspaces to enter the new d...
Given two related tables (reports, report_fields) where there can be many report_fields entries for each reports entry, I need to allow the user to enter new report_fields, delete existing report_fields, and re-arrange the order.
Currently I am using a DetailsView to handle the editing of the reports. I added some logic to handle repor...
I am working on a django project and i want to send a signal when something get's added to some models related set, e.g. we have an owner wo has a set of collectables and each time the method owner.collectable_set.add(something) is getting called i want signal like "collectable_added" or something. signals are clear to me, but in which m...
Hay, i have a simple model
class Manufacturer(models.Model):
name = models.CharField()
car_count = models.IntegerField()
class Car(models.Model):
maker = ForeignKey(Manufacturer)
I want to update the car_count field when a car is added to a manufacturer, I'm aware i could just count the Manufacturer.car_set() to get the v...
Hello,
I'm trying to display related posts based on a custum taxonomy. I found a query at wordpress.org that kind of works. However the original post gets duplicated in the results multiple times. (words is the name of the custom taxonomy I use) What seems to happen is that the single post gets duplicated according to what amount showpo...
This event belongs to form view
protected void companyForm_ItemInserting(object sender, FormViewInsertEventArgs e)
{
some logic
}
I have some customValidator (server side) i want to know y i dont need to check page.isvalid property in above event... while in some events i have to check it otherwise event code is processed despi...
Hi!
I made a website that I submitted to google a few months ago. It comes up in results, but it could be much better.
I've noticed that all the results in front of my site, there's a 'Similar' link just near the 'Cached' link, but it doesn't show up for my site. I know that that link gives related results, so I wonder if there's some...
Hi!
I would like to ask for more information on how Chamfer Matching algorithm (an edge matching algorithm) can be used to find 'similar' images. I would like to know if it is possible to place a 'score' for the matched results.
Thanks!
...
My Question is, how do I compare a group of tags to another posts tags in my database to get related posts?
To start off, I've searched the internet and stackoverflow to find out how to do this. My closest find was this post http://stackoverflow.com/questions/2153062/how-to-find-related-items-in-php. But it actually doesn't solve much f...
Hi all,
I'm trying to make a query return 3 articles related to the one a user is reading. For this purpose I've made a tabel with a set of tags related to all articles (up to 5 tags pr. article).
How do I construct my query the most effective way to return 3 related articles?
Incase there is no related articles - how to return 3 rand...
I have setup like so (changed for simplicity)
class Author(models.Model)
name = models.CharField(max_length=100)
...
class Document(models.Model):
title = models.CharField(max_length=200)
content - models.TextField()
author = models.ForeignKey("Author", related_name="documents")
date_published = models.DateTimeF...
We have a products table. Users can create new products as copies of existing products.
Instead of simply duplicating this data, we're thinking in order to minimize database size, we would store only the differences from the "parent" product. (were talking thousands of products)
My thinking is that, for each new "child" product, we cre...
I'm trying to use Django's annotate feature to add the count of a related model to a queryset. However, I don't want a full count of related objects, I only want to count the active ones (i.e., "is_active=True"). I can't figure out how to filter down the count.
The (simplified) relevant models:
class Post(models.Model):
user = mode...
Hi, i'm tring to put a list of recommended items in checkout cart page, i was trying to use the related products block that is in layaout/catalog.xml, but it works for a single product in product view page, and in the checkout cart page can be more than one product, so, how can i make something like this, if it can be done??
...
I'm still stuck with the inline Tree-like-eiditing of related models on same page.
I've got three models, A, B and C.
Class A
Class B
fb = foreignkey(A)
Class C
fc = foreignkey(B)
In admin.py I'm doing something like
AdminA
inlines = [inlineB]
AdminB
inlines = [inlineC]
I want that when I edit/add model A, I sh...
I want to know the something about related fields, how it can be helped,
and for which kind of scenario I should use fields.related,
if anybody can provide small example for real use of fields.related it would be great
Thanks in advance.......
...
pls use this
http://code.google.com/p/google-web-toolkit-doc-1-6/wiki/DevGuideJavaFromJavaScript
IFI means int float int but if
i want to use String then how can i write? pls help
...
im trying to figure out how to find related topics items using mysql & php, this is my table for topics
topics{id, topic, founder,vote_up, vote_down date}
for instance say i was on topic page of php
topic {3,php,getaway, 6, 8, 20.06.2009 ect]
how would i find all the related topics to this topic:
if you get what i mean:)) thanks, ...