Django REST Framework - ListSerializer - Actualizaciones Múltiples

Imagen
 Se muestra un ejemplo, de como realizar la implementación de Múltiples actualizaciones en una sola petición , es decir enviando una lista de objetos, y usando la clase ListSerializer  realizamos las actualizaciones (inserciones u eliminaciones). El modelo para el ejemplo La Vista      def   post ( self ,  request ):          """ Ejemplo de manejo de listas en Serializer                     Para este ejemplo asumimos lo siguiente:           Se tienen que enviar todos los datos existentes de los empleados en el JSON ya que           se comparara con la base de datos y :            1.- Si se encuentran se actualizan los datos,            2.- Si no existen en la base de datos  se crean,            3.- Si se encuentran en la base de datos, pero no fueron pasados en el JSON se elimnan.          """          # Obtener el  JSON.          data  =  request .data          # Obtener los datos de la base de datos                  emp  =  Employes . objects . all ()   

MSDN Magazine Mayo 2010.

Ya esta disponible la versión de Agosto de MSDN Magazine,
este numero como siempre trae interesantes temas, uno de los
de los temas el que me encanto y les recomiendo fue:
Windows Phone 7: Windows Phone and the Cloud—an Introduction


En enlace completo de los temas lo pueden encontrar aqui.



Copiado de MSDN http://msdn.microsoft.com/es-mx/default.aspx.





August 2010 issue 
Federated Identity: Passive Authentication for ASP.NET with WIF
The goal of federated security is to provide a mechanism for establishing trust relationships between domains. Platform tools like Windows Identity Foundation (WIF) make it much easier to support this type of identity federation. We show you how.
Michele Leroux Bustamante
In Sync: Creating Synchronization Providers With The Sync Framework
The Sync Framework can be used to build apps that synchronize data from any data store using any protocol over a network. We’ll show you how it works and get you started building a custom sync provider.
Joydip Kanjilal


OData and AtomPub:
 Building an AtomPub Server Using WCF Data Services
Learn how to use the AtomPub protocol to pump up your blogs. Chris Sells includes a practical demonstration of mapping so you can expose a standard AtomPub service from a Web site and use Windows Live Writer to provide a rich editing experience against the service.
Chris Sells
Windows Azure: Tips for Migrating Your Applications to the Cloud
These tips are already helping many companies move their apps into the cloud. We'll share some of those that we discovered working with customers on real-world migrations.
George Huey and Wade Wegner
Speed SQL: Tuning Your Database Calls with Tier Interaction Profiling
Tier interaction profiling (TIP) is a feature of the Visual Studio profiling tools that measures the duration of synchronous calls to ADO.NET-compliant data stores. We’ll show you how TIP works and provide some best practices for using TIP to diagnose performance problems in your apps.
Mark Friedman
Smart Client: Building Distributed Apps with NHibernate and Rhino Service Bus, Part 2
Smart client applications are responsive and promote interactivity with the user. In this article, we continue building a smart client application using NHibernate for data access and Rhino Service Bus for reliable communication with the server.
Oren Eini
Windows Phone 7: Windows Phone and the Cloud—an Introduction
See how easy it is to create a Windows Phone 7 app and tie it to a Web service as Ramon Arjona walks you through the creation of a language translation tool.
Ramon Arjona

Columns

Editor's Note:
Does Your Program
Smell Like Bacon?

When building your program, are you content with “good enough”? If so, your expectations are fatally low.
Keith Ward
Don't Get Me Started:
Mars and Venus
It’s a fact that men and women don’t think alike—remember this when designing software for the half of users that aren’t like you.
David Platt
The Working Programmer:
Inside SQLite
After tackling NoSQL, Ted Neward turns back to the relational world of SQL—SQLite, that is. Learn all about the lightweight, embedded database whose running footprint can be as small as one file installed in a client file system.
Ted Neward
UI Frontiers:
Multi-Touch Manipulation
Events in WPF

Multi-touch has progressed from being a futuristic prop of sci-fi films to a mainstream means of user interface. We’ll show you how support for multi-touch in Windows 7 has filtered down and settled into various areas of the .NET Framework.
Charles Petzold
Cutting Edge:
Don’t Worry, Be Lazy
Being lazy in software development can be a good thing, but until the Microsoft .NET Framework 4, coders had to implement lazy behavior themselves. Dino Esposito shows how to use the new Lazy class to maximize your resources.
Dino Esposito
Data Points:
Deny Table Access to the Entity Framework Without Causing a Mutiny
Julie Lerman shows database administrators how to limit access to databases from the Entity Framework by allowing it to work only with views and stored procedures instead of tables—without impacting application code or alienating developers.
Julie Lerman
Test Run:
Fault Injection Testing with TestApi
Fault injection testing is the process of deliberately inserting an error into an application to determine whether it deals with the error properly. We’ll explain how you can introduce faults into .NET applications at run time using the Managed Code Fault Injection APIs of the TestApi library.
James McCaffrey

Comentarios

Entradas populares de este blog

Django. [Errno 10013] Intento de Acceso a un Socket no Permitido por sus permisos de acceso.

Crystal Reports para VS2010. El Texto Restante no parece se parte de la Formula.

ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)