Closed AJLeonardi closed 11 years ago
Should be able to make a symmetrical relationship between the two. Looking into it.
Rather than doing that, just added an if inside the for loop encasing the list creation for companies. If any of them are the same as the user's favCompany, they do not show.
For having more companies, this depends on how we do it. It may be something as simple as a 'if company in user.favCompany' statement, if it were a list. Otherwise we could create a loop in the view that populated a list with the objects and pass that through, if necessary.
Seeing if Django has a good way to save multiple references to objects(companies) from an object(user) is the main issue.
Currently the favorite company is showin in both the favorites list, and the all company list which looks awkward.
Fixing this is easy if we expect to keep it as one Favorite company. This gets more complicated if we have a list of favorite companies.