MCPcopy
hub / github.com/django/django / unique_kwargs

Method unique_kwargs

django/contrib/gis/utils/layermapping.py:378–387  ·  view source on GitHub ↗

Given the feature keyword arguments (from `feature_kwargs`), construct and return the uniqueness keyword arguments -- a subset of the feature kwargs.

(self, kwargs)

Source from the content-addressed store, hash-verified

376 return kwargs
377
378 def unique_kwargs(self, kwargs):
379 """
380 Given the feature keyword arguments (from `feature_kwargs`), construct
381 and return the uniqueness keyword arguments -- a subset of the feature
382 kwargs.
383 """
384 if isinstance(self.unique, str):
385 return {self.unique: kwargs[self.unique]}
386 else:
387 return {fld: kwargs[fld] for fld in self.unique}
388
389 # Verification routines used in constructing model keyword arguments.
390 def verify_ogr_field(self, ogr_field, model_field):

Callers 1

_saveMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected