I have three models. User, Product, and Season.
I used a standard "has many through" approach:
user has_many :seasons
user has_many :products, :through => :seasons
product has_many :seasons
product has_many :users, :through => :seasons
seasons belong_to :product
seasons belong_to :user
On my "show" view for my users, I display the ...
is it possible to pass derived types where base types are expected to strongly typed views?
I.e
Products/List
News/List
where "list" view Inherits System.Web.Mvc.ViewPage<Model<BaseList>>
controller renders view i.e View("List", ProductsList)
edited
return View("List", new Model<ProductsList>());
Model<T> where T : IMyList
Pr...
I've got a problem with my site search not linking properly to my views pages. I've got a views page set up to display recipe data. It has the URL properties of:
index.php?q=recipe/%1/%2
where %1 is the recipe category, for example, breakfast, and %2 is the recipe name, for example, Muffin. The view goes through the recipe node conten...
I am a newbie to Drupal so this may be a simple answer...
I am building a site that on the homepage I want to be able to call up events that will happen in the next 6 months and then disappear after the event has past. I have made a field called event_start_date that you can enter the "From" and "To" dates. I already used Views to call ...
Hi
I have created a project that uses mysql stored procedures and views.
I have a lot of difficulties to find a hosting service that would support them.
Do you know where I can go?
thank you.
...
I have an index of users where I display the user name, location of user and a field called categories, which can range from zero to many items. I'm having trouble getting the categories to display properly. Here are my details:
User
has_many :user_categories
has_many :categories, :through => :user_categories
Categories
has_many ...
I've created a Block using a View and would like to add some information to it that cannot be obtained from the View itself. I need to write a small function that queries for some extra data.
I thought of putting this function in the MYTHEME_preprocess_node but when I put a simple $variables['test'] = 'test' and then do a print $test in...
Hi,
We are working on Grid Views in an ASP.NET application.
Here we would like to avoid the database calls for binding dataset/data table to grid view whenever a user clicks on sort (column sorting), pagination links or whenever he updates a record.
Would you please let me know the best practice to handle it?
If would be great if you...
Hello,
I have a django view that looks like...
def add_user(request):
if User.objects.get(username__exact = request.POST['username']):
context = { 'message': "Username already taken"}
return render_to_response("mytemplate.html", context, RequestContext(request))
newUser = User(username="fre...
When inside a View, within MVC, and you have your JavaScript, I tried to move it to a JavaScript file in the same directory, and it reports it can not file the javascript file
As an example I user NerdDinner and the DinnerForm.aspx, created a JavaScript file in the same directory as the DinnerForm.aspx called DinnerForm.js and reference...
For some reason, trying to view any node of a certain content type leads to a 404 error. When viewed in a View table, they display just fine. What could be happening?
Viewing the database with phpMyAdmin shows the data just fine.
The problematic node type was created with CCK.
...
the mysql certification guide suggests that views can be used for:
creating a summary that may involve calculations
selecting a set of rows with a WHERE clause, hide irrelevant information
result of a join or union
allow for changes made to base table via a view that preserve the schema of original table to accommodate other applicati...
In the world of oracle, I have the impression that views based on other views are considered to be bad practice. I myself have complained about this when the trying to solve performance issues and the nesting seemed excessive and hid away unneeded complexity in the underlying views. Now I find myself in the situation of thinking that it ...
Hi,
I have a taxonomy vocab assigned to a content type in Drupal 6. I've then exposed (using "is one of") it as a field in views which allows a user to search via keywords.
The problem is when it runs the query it is first referencing the term so instead of using a like statement it looks the term up in the taxonomy table and brings ba...
I would like my views to be able to specify a class for the <body> tag, which lies in my master page.
My first take was to do something like this:
<asp:Content ContentPlaceHolderID="BodyClassContent" runat="server">
view-item</asp:Content>
However, that would require this in the master page, which doesn't work:
<body class="<as...
We're evaluating asp.net MVC and are looking for some more complicated examples over and above NerdDinner.
Specifically, in a more complex web app, I might have a navigation bar (including primary nav, a search box and a log-in status display), a main content area, a sub-content area (including related content) and a footer. In MVC a c...
hi-
i'm working on designing an asp.net mvc web app. There will be half a dozen (maybe more to come) different user groups of the app and they all work with similar but tweaked UIs, each with a few custom fields but all using the same objects.
one idea for creating the UI is to store Control info with each field value in the database...
I'm revising this question again because I solved a majority of the issues. The current bug that I could use some help with is that when I remove an object using the technique described below, I end up with orphaned database rows that should be getting deleted. Details below.
I'm using the Ryan Bates technique from Advanced Rails reci...
The issue that I'm having is that I have My start page, then the user can select a button from there to open a settings page (Modal View). From the settings page the user selects the switch to turn on the PIN code page (another Modal View). I have been killing myself trying to implement this simple process. The app has a Nav&Tab Bar fram...
I have a view that pulls about 200 columns from a table, no joins. The procs that use the view only use about 10 columns from it. Does having the extra 190 columns have a significant impact on performance using the view?
EDIT: Just to clarify based on original questioner's comment, the query in his proc only uses 10 columns out of 200. ...