Hi
i am trying to create a signup form for my django app. for this i have extended the user model. This is my
Forms.py
from contact.models import register
from django import forms
from django.contrib import auth
class registerForm(forms.ModelForm):
class Meta:
model=register
fields = ('latitude', 'longitude', 'status')
class Meta:
…
Using Direct3D11, I'm trying to pass a matrix into my vertex shader from the instance buffer that is associated with a given model's vertices and I can't seem to construct my InputLayout without throwing an exception.
The shader looks like this:
cbuffer ConstantBuffer : register(b0)
{
matrix World;
matrix View;
matrix Projection;…
I got one problem with showing error message to element.
Is there any option to turn on messages on place where is Html.ValidationMessageFor(model = model.ConfirmPassword). Becsoue for me it isn’t show up. I would like to have summary and near field information too not only red border. Any one know how to do it?
using…
I have been reading up on porting ASP.NET Membership Provider into .NET 3.5 using LINQ & Entities. However, the DB model that every single sample shows is the newer model while I've inherited a rather old model. Differences:
The User Table is split into a pair of User & Membership Tables.
All of the…
Scenario: large project with many third party apps. Want to add tagging to those apps without having to modify the apps' source.
My first thought was to first specify a list of models in settings.py (like ['appname.modelname',], and call django-tagging's register function on each of them. The register function…
HI,
I am working in an asp .net mvc application. I am using the model and storing some of the values which i need to preserve between the page posts, in the form of datacontexts.
Say my model looks something like this:
public SelectedUser SelectedUserDetails
{
//get and set has
…
My task is - to create a model attribute by given request parameters, to validate it (in same method) and to give it whole to the View.
I was given this code:
//Create the model attribute by request parameters
Promotion promotion = Promotions.get(someRequestParam);
//Add the attribute…
Calling Index view is giving me this very very annoying error . Can anybody tell me what to do about it
Error:
The model item passed into the dictionary is of type 'System.Collections.Generic.List1[MvcApplication13.Models.Groups]', but this dictionary requires a model item of type…
I developed small CakePHP application, and now I want to add one more table (in fact, model/controller/view) into system, named notes. I had already created a table of course.
But when I run command cake bake model, I do not get table Notes on the list. I can add it manually, but…
In Entity Framework v1 If you create a Custom Entity to map it to a Stored Procedure during FunctionImport and then Select "Update Model from Database" the Update Model Wizard removes the Custom Entity (as added Manually in the SSDL XML prior to functionImport) from the SSDL.
…
In Spring MVC when placing an object in the view model like so:
public String getUser( Model model ) {
//...fetch user...
model.addAttribute( "user", user );
return "viewName";
}
and accessing it's values in the JSP / JSTL view like this:
...
<p>
…
I've got an NSArrayController bound to a mutable array in my controller, which manages an array of my model objects. The array controller is bound to my UI. It works well.
Now I'm trying to manually observe when a value changes in my model in my controller class…
I have settled on trying to use ASP.NET MVC but the first part I want to replace is the Model. I am using LLBL Pro for the model.
I have a table called "Groups" that is a simple look up table. I want to take thhe results of the table and populate a list in MVC.…
I have two models, Event and Series, where each Event belongs to a Series. Most of the time, an Event's start_time is the same as its Series' default_time.
Here's a stripped down version of the models.
#models.py
class Series(models.Model):
name =…
Hi all
I've see a lot of MVC examples where domain-objects are passed directly to views, this will work fine if your view is simple.
The common alternative is to have a view-model which has all the same properties as your domain-model + any extra…
I have a PHP MVC application using Zend Framework. As presented in the quickstart, I use 3 layers for the model part :
Model (business logic)
Data mapper
Table data gateway (or data access object, i.e. one class per SQL table)
The model is UML…
I am struggling trying to perform what I would think would be a relatively common task. I have an NSTableView that is bound to it's array via an NSArrayController. The array controller has it's content set to an NSMutableArray that contains one or…
Hello
I have a such model:
GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female') )
class Profile(models.Model):
user = models.ForeignKey(User)
gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
class FrontPage(models.Model):
…
I have a WCF based application that uses the services to access repositories on the server side. I am passing DTOs from the server to the client and was wondering how best to make the DTOs part pf the view model.
I have a workign example of just…
Hi.
I have a model, called Student, which has some fields, and a OneToOne relationship with user (django.contrib.auth.User).
class Student(models.Model):
phone = models.CharField(max_length = 25 )
birthdate =…
I need to pickle a complex object that refers to django model objects. The standard pickling process stores a denormalized object in the pickle. So if the object changes on the database between pickling and unpickling,…
I have a external library which includes a core data model, I would like to add a new entity to this model which has a relationship with one of the entities from the library. I know I could modify the original, but is…
I'm trying to seamlessly integrate some legacy data into a django application. I would like to know if it's possible to use an alternate datasource for a django model. For example, can I contact a server to populate a…
I posted this question on the django-users list, but haven't had a reply there yet.
I have models that look something like this:
class ProductGroup(models.Model):
name = models.CharField(max_length=10,…