Search Results

Search found 15231 results on 610 pages for 'presentation model'.

Page 67/610 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Django Auth Model Issue - AUTH_USER_MODEL Not Installed

    - by Ian Warner
    Trying to debug this error with getting a Django project running ImproperlyConfigured: AUTH_USER_MODEL refers to model 'accounts.User' that has not been installed Running python manage.py migrate Must iterate i am in no way a python or django expert - I have simply inherited someone elses project that I am trying to get running for the team here. I have followed steps to install postgres required modules including south creating database for postgres Any help appreciated on how to debug this. settings/base.py contains INSTALLED_APPS = DJANGO_APPS + THIRD_PARTY_APPS + LOCAL_APPS LOCAL_APPS = ( 'apps.core', 'apps.accounts', 'apps.project_tool', 'apps.internal', 'apps.external', ) so apps.accounts exits - but it asks for AUTH_USER_MODEL = 'accounts.User' - should it be AUTH_USER_MODEL = 'apps.accounts.User'?

    Read the article

  • Custom ValidationAttribute test against whole model

    - by griegs
    I know this is probably not possible but let's say I have a model with two properties. I write a ValidationAttribute for one of the properties. Can that VA look at the other property and make a decision? So; public class QuickQuote { public String state { get; set; } [MyRequiredValidator(ErrorMessage = "Error msg")] public String familyType { get; set; } So in the above example, can the validator test to see what's in the "state" property and take that into consideration when validating "familyType"? I know I can probably save the object to the session but would like to avoid any saving of state if possible.

    Read the article

  • Recommendations on SharePoint site permission model

    - by Sachin
    Hi All, I have a SharePoint site which contains a root site and site collection in it. Now there are some sites that inherits permissions from their parent site and some site has their own permission module. Now a user from owner group of root site browses site collection but there are few site which doesn't allow user to view the content of it. Now what I want is general recommendation on when creating a new site in SharePoint what is best possible approach to set site permission. In what case we can inherits permissions from parent site..? In what case we can we us unique permission for a site..? If a site has unique permission set then is it possible to creat a group at root level which has access to all site collection irrespective of site permission model? I want a general recommendation based on above scenario. Any help will be appriciable. Thanks Sachin

    Read the article

  • Model Based Testing Strategies

    - by Doubt
    What strategies have you used with Model Based Testing? Do you use it exclusively for integration testing, or branch it out to other areas (unit/functional/system/spec verification)? Do you build focused "sealed" models or do you evolve complex onibus models over time? When in the product cycle do you invest in creating MBTs? What sort of base test libraries do you exclusively create for MBTs? What difference do you make in your functional base test libraries to better support MBTs?

    Read the article

  • can't update rails model

    - by Tristan
    Hi there, I'm rather new to rails. I have a controller that's attempting to update a model using the following code: @test = Product.find(1) @test.increment!(:price) It does successfully retrieve the Product from the database, but does not update the price attribute. Does anyone know why this might be the case, or how I could get more feedback on what the problem is? Thanks a bunch! Tristan edit: price is an integer with value 0. I get the same problem when I set the price with @test.price=50 and then @test.save .

    Read the article

  • Default values for model fields in a Ruby on Rails form

    - by Callum Rogers
    I have a Model which has fields username, data, tags, date, votes. I have form using form_for that creates a new item and puts it into the database. However, as you can guess I want the votes field to equal 0 and the date field to equal the current date when it is placed into the database. How and where would I set/apply these values to the item? I can get it to work with hidden fields in the form but this comes with obvious issues (someone could set the votes field to a massive number.

    Read the article

  • Asp.Net MVC - Blank model not returning blank data

    - by Pino
    I have a form which a user can fill in x times with the data they want too. The form is posted to the following Action. [HttpPost] public ActionResult Manage(ProductOptionModel DataToAdd) { if (!ModelState.IsValid) { return View(DataToAdd); } var ProdServ = new ProductService(); if (DataToAdd.ID != 0) { //Edit Mode. DataToAdd = ProdServ.EditProductOption(DataToAdd); ViewData["Message"] = "Option Changes Made"; }else { //Add DataToAdd = ProdServ.AddProductOption(DataToAdd); ViewData["Message"] = "New Option Added"; } var RetModel = new ProductOptionModel() {ProductID = DataToAdd.ProductID}; return View(RetModel); } So at the bottom I blank the model (Leaving just the required field) and then return to the view. However the view holds the data from the previously submitted form. Any ideas why? I have debugged the code and checked that the RetModel variable is empty.

    Read the article

  • Thoughts on security model to store credit card details

    - by Faisal Abid
    Here is the model we are using to store the CC details how secure does this look? All our information is encrypted using public key encryption and the keypair is user dependent (its generated on the server and the private key is symmetric encrypted using the users password which is also Hashed on the database) So basically on first run the user sends in his password via a SSL connection and the password is used with the addition of salt to generate an MD5 hash, also the password is used to encrypt the private key and the private key is stored on the server. When the user wants to make a payment, he sends his password. The password decrypts the private key, and the private key decrypts the CC details and the CC details are charged.

    Read the article

  • Suggest Cassandra data model for an existing schema

    - by Andriy Bohdan
    Hello guys! I hope there's someone who can help me suggest a suitable data model to be implemented using nosql database Apache Cassandra. More of than I need it to work under high loads and large amounts of data. Simplified I have 3 types of objects: Product Tag ProductTag Product: key - string key name - string .... - some other fields Tag: key - string key name - unique tag words ProductTag: product_key - foreign key referring to product tag_key - foreign key referring to tag rating - this is rating of tag for this product Each product may have 0 or many tags. Tag may be assigned to 1 or many products. Means relation between products and tags is many-to-many in terms of relational databases. Value of "rating" is updated "very" often. I need to be run the following queries Select objects by keys Select tags for product ordered by rating Select products by tag order by rating Update rating by product_key and tag_key The most important is to make these queries really fast on large amounts of data, considering that rating is constantly updated.

    Read the article

  • Where to delete model image?

    - by WesDec
    I have a Model with an image field and I want to be able to change the image using a ModelForm. When changing the image, the old image should be deleted and replaced by the new image. I have tried to do this in the clean method of the ModelForm like this: def clean(self): cleaned_data = super(ModelForm, self).clean() old_profile_image = self.instance.image if old_profile_image: old_profile_image.delete(save=False) return cleaned_data This works fine unless the file indicated by the user is not correct (for example if its not an image), which result in the image being deleted without any new images being saved. I would like to know where is the best place to delete the old image? By this I mean where can I be sure that the new image is correct before deleting the old one?

    Read the article

  • generate EF model by System.Diagnostics.Process

    - by loviji
    Hello, after read this article i tried generate EF model by System.Diagnostics.Process: Process myProcess = new Process(); var cs = "Data Source=.\\SQLEXPRESS; Initial Catalog=uqs; Integrated Security=SSPI"; myProcess.StartInfo.FileName = @"C:\Windows\Microsoft.NET\Framework\v3.5\EdmGen.exe"; myProcess.StartInfo.Arguments = "/mode:fullgeneration /c:"+cs+" project:School /entitycontainer:SchoolEntities /namespace:SchoolModel /language:CSharp "; myProcess.Start(); 1.but i haven't get a result, because i can't do well formed arguments string. As I tried, there have many quotes. how to organize argument string? 2.how can i catch if generation completed or have occurred errors?

    Read the article

  • Cannot await 'Model.PersonalInfo'

    - by Gooftroop
    I have the following method in a DesignDataService class public async Task<T> GetData<T>(T dataObject) { var typeName = typeof(T).Name; switch (typeName) { case "PersonalInfo": var person = new PersonalInfo { FirstName = "Mickey", LastName = "Mouse" , Adres = new Address{Country="DLRP"} , }; return await person; } // end Switch } // GetData<T> How can I return a new PersonalInfo class from the DataService? For now I get the error Cannot await 'Model.PersonalInfo' Even when I change the return statement as follows return await person as Task; the error stays the same Thanks in advanced Danny

    Read the article

  • Facebook canvas app ASP.NET MVC HttpException: Invalid Model

    - by zznq
    I am working on a Facebook tab application. I am using asp.net MVC 2 with the "official" Microsoft Facebook SDK. Most of my views are working just fine. However, I have one that is causing a huge mess. I am simply returning a List<Tags> to the view and as my ViewModel. This problematic view is simply displaying the list in a foreach loop. Whenever navigate to this view I get a "System.Web.HttpException: Invalid Model" exception. The most puzzling part of all this is that the same code is running without fail on our regular(non-Facebook) app that works just fine with the same code. Any insight into why Facebook and asp.net MVC 2 would be causing this behavior would be much appreciated.

    Read the article

  • adding model validation errors in rescue

    - by ash34
    I have the following model with a virtual attribute class Mytimeperiod < ActiveRecord::Base validates presence of :from_dt validates_format_of :from_dt, :with => /\A\d{2}\/\d{2}\/\d{4}\Z/, :message => "format is mm/dd/yyyy" def from_dt self.from_date.strftime("%m/%d/%Y") if !self.from_date.blank? end def from_dt=(from_dt) self.from_date = Date.parse(from_dt) rescue self.errors.add_to_base("invalid from dt") end end I am using <%= f.error_messages %> to display the error messages on the form. I am using from_dt as a virtual attribute (string). The 'presence of' and 'format of' validation errors show up on the form, but when the user enters an invalid date format on the form and Date.Parse raises an exception I have a 'errors.add_to_base' statement in the rescue clause. Can anyone tell me why this error does not show up in the form error messages when I disable the 'format of' validation. thanks.

    Read the article

  • CodeIgniter model debugging errors

    - by Jono
    I am new to CodeIgniter, and I need a way to get more meaningful error messages. Specifically I am having trouble with some model relationships, but the error is vague. I am willing to try/install anything since I dont know how to fix this relationship. Is there a way to specify how verbose an error message is? Also, this could be related to DataMapper, but I cant tell. I dont care if they are logged or in the browser. In my browser error reads: An Error Was Encountered Unable to relate X with Y. Any more info would be great... which class, line number, a stacktrace. Increasing the log threshold did not help.

    Read the article

  • arbitrary typed data in django model

    - by Dmitry Shevchenko
    I have a model, say, Item. I want to store arbitrary amount of attributes on it, like title, description, release_date. And i want them to be not just strings but have python type, so string, boolean, datetime etc. What are my options here? EAV pattern with separate name-value table won't work because of the same DB type across all values. JSONField can probably help, but it doesn't know about datetime, for example. Also i was looking at PickeField, it fits perfectly, but i'm a bit concerned about performance.

    Read the article

  • Generating C code from a Matlab-Simulink model for DSP C6748

    - by Juanma
    I'm trying to generate C code from a Matlab-Simulink simple model (eg.: sine wave generator with a DAC at the output). This code must be executed with Code Composer Studio for TMS320C6748 DSP (Texas Instrument C6748). Specifically, for the development board OMAP-L138 ZOOM ™EVM DEVELOPMENT KIT. For this, I am using the following versions: Simulink (Version 7.7 - R2011a) Embedded Coder (Version 6.0 - R2011a) Code Composer Studio v3.3 I tried several options (with generic modules in Simulink and programming the C6748 timers, configuring a module "Target Preferences" with "OMAP_L138/C6748 EVM"...) but it isn't working. Is it possible to implement this idea? Is there an example working? Thanks

    Read the article

  • Bind selected value on combobox to view model

    - by Shaggy
    Hi, I have my silverlight app which pulls data into a datagrid from a view model. The vm is exposed via Mef. I also have a details grid which has comboboxes. The vm also contains the data to populate the combobox values. Upon first load, everything works fine and the selected items on te comboboxes are correct and I can select alternative values. However, if I sort my main data grid (allow sort=true) then I find the binding for selected value on the comboboxes dissapear. The combobox is still populated with data but nothing is selected. Has anyone come across this issue before? I am unsure how to solve this one. Thanks

    Read the article

  • How to load the model ????

    - by rajesh
    How can i load model i have tried several times but do not get the ans my code is <?php class NotesController extends AppController { var $name='Notes'; var $helpers = array('Html','Form','Ajax','Javascript'); var $uses = array('note'); var $components = array('ModelLoader'); function index(){ $this->ModelLoader->setController($this); $result = $this->params['url']['obj']; //print_r($result); $ee=$this->ModelLoader->load('note'); $pass = $this->note->search($result);

    Read the article

  • Django: How to create a model dynamically just for testing

    - by muhuk
    I have a Django app that requires a settings attribute in the form of: RELATED_MODELS = ('appname1.modelname1.attribute1', 'appname1.modelname2.attribute2', 'appname2.modelname3.attribute3', ...) Then hooks their post_save signal to update some other fixed model depending on the attributeN defined. I would like to test this behaviour and tests should work even if this app is the only one in the project (except for its own dependencies, no other wrapper app need to be installed). How can I create and attach/register/activate mock models just for the test database? (or is it possible at all?) Solutions that allow me to use test fixtures would be great.

    Read the article

  • What is the purpose of return'ing $this when setting vars in the model

    - by TaMeR
    I am a self thought hobby programmer and therefore don't have the fundamentals always down the way you professionals do. So please excuse me if this is basic. What is the purpose or benefit of return'ing $this when setting vars in the model. I have seen this done in other places too but cant figure this out. Sample code: public function setAlias($Alias){ $this->_Alias = (string) $Alias; return $this; } public function getAlias(){ return $this->_Alias; }

    Read the article

  • Entity-attribute-value model using codeigniter / php

    - by John Stewart
    SO I am trying to create a way to structure my database to be able customize forms. I looked into EAV pattern and here is my db structure: Table form - form_id - form_name - form_added_on - form_modified_at Table: form_fields - field_id - form_id - field_type (TEXT, RADIO etc..) - field_default_value - field_required Table: form_data - data_id - field_id - form_id - field_value so now I can store any custom form into the database and if I want to get the values for an individual form I can simply join it by "form_id" .. the problem: I want to be able to search through all the forms for a specific field value. How can I do that with EAV model? Also, I thought about just storing the custom data as a serialized (JSON) object but then I am not sure how can I query that data. Please note that I am using Codeigniter with MYSQL. So if conversation can use Codeigniter libraries if needed.

    Read the article

  • How ASP.NET MVC passes model to the view without explicitly passing it

    - by Vlad Bezden
    Here is one of the examples that I've seen on how to do validation on Controller: [HttpPost] public ViewResult Create(MyModel response) { if (ModelState.IsValid) { return View("Thanks"); } else { return View(); } } If there are validation errors, than return View() method is called without any parameters. Obviesly you have @Html.ValidationSummary() in your View and Model has all required properties attributes. The data that was entered into the form was preserved and displayed again when the view was rendered with the validation summary. My question is how data preserved? Since it was not passed to the View like return View(response); Thanks a lot. Sincerely, Vlad

    Read the article

  • ASP.NET MVC authorization & permission to use model classes

    - by Tomek
    Hi, This is my first post here, so hello :) Okey, let's get to the point... I am writing my first app in ASP.NET MVC Framework and i have a problem with checking privileges to use instances of model classes (read, edit). Sample code looks like this: // Controller action [CustomAuthorize(Roles="Editor, Admin")] public ActionResult Stats(int id) { User user = userRepository.GetUser(id); if (user == null || !user.Activated || user.Removed) return View("NotFound"); else if (!user.IsCurrentSessionUserOwned) return View("NotAuthorized"); return View(user); } So far authorize attribute protects only controller actions, so my question is: how to make (custom) authorize attribute to check not only user role, usernames but also did i.e. resources instantiated in action methods (above: User class, but there are other ORM objects like News, Photos etc.) All of these object to check have their unique ID's, so user have own ID, News have their ID and UserID field referecned to Users table (i mean these objects are LINQ2SQL classes). How should i resolve that problem?

    Read the article

  • Problem with migrating a model in ruby

    - by Shreyas Satish
    I run script/generate model query edit query.rb in models.. class Query < ActiveRecord::Base #I even tried Migrations instead of Base def sef.up create table :queries do|t| t.string :name end end def self.down drop_table :queries end end ,run rake db:migrate. and what I see in db is this: mysql> desc queries; +------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+----------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | created_at | datetime | YES | | NULL | | | updated_at | datetime | YES | | NULL | | +------------+----------+------+-----+---------+----------------+ Where is the "name" field? HELP ! Cheers !

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >