person.firstname, lastname=person.lastname, birthday=person.birthday, birthcity=person.birthcity).values('social_number')
    print social_number

    if social_number.exists() :    
        person.social_number = social_number
        person.save()

But I get :
<QuerySet [{'social_number': u'2 08 12 STRASBOURG - 039838'}]>

and not only :
2 08 12 STRASBOURG - 039838

A:

I think you cannot do this way since BirthCertificate.objects.all().values("lastname") gives a ValueQuerySet
So you can do
if BirthCertificate.objects.filter(
    firstname=person.firstname, 
    lastname=person.lastname, 
    etc..).exists(): #etc means other fields.

UPDATE
person = get_object_or_404(Person, pk=id)

obj = BirthCertificate.objects.filter(firstname=person.firstname, lastname=person.lastname, birthday=person.birthday, birthcity=person.birthcity)

if obj:
    sc_obj = obj[0] #check if multiple objects are there, means obj[1]
    person.social_number = sc_obj.social_number
    person.save()

 Q:

Possible ways to send "StringValue" from One View Controller to multiple ViewControllers?

i am trying to create one reusable datePicker. in my project i am using multiple Labels in multiple viewControllers. For that i created one DatePicker class that one i am using different places. check this below code its working for Single viewController.
This is the one VC i am displaying date here which i have selected date from CustomDatePickerViewController.
import UIKit

class SelectDateViewController: UIViewController {
    var dateString_fromCustomVC = String()

    override func viewDidLoad() {
        super.viewDidLoad()
        print("dateString_fromCustomVC",dateString_fromCustomVC)

    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    
person.firstname, lastname = person.lastname, birthday = person.birthday, birthcity = person.birthcity).values('social_number') 
     print social_number 

     if social_number.exists ():    
         person.social_number = social_number 
         person.save () 

 But I get: 
 < QuerySet [ {' social_number': u'2 08 12 STRASBOURG - 039838' } ] > 

 and not only: 
 2 08 12 STRASBOURG - 039838 

 A: 

 I think you cannot cause this direction since BirthCertificate.objects.all().values("lastname ") gives a ValueQuerySet 
 So you can do 
 if BirthCertificate.objects.filter (
     firstname = person.firstname, 
     lastname = person.lastname, 
     etc.. ).exists (): # etc means early fields. 

 UPDATE 
 person = get_object_or_404(Person, pk = id) 

 obj = BirthCertificate.objects.filter(firstname = person.firstname, lastname = person.lastname, birthday = person.birthday, birthcity = person.birthcity) 

 if obj: 
     sc_obj = obj[0 ] # check if multiple objects are there, mean obj[1 ] 
     person.social_number = sc_obj.social_number 
     person.save () 

  Q: 

 Possible ways to mail " StringValue " from One View Controller to multiple ViewControllers? 

 i am trying to create one reusable datePicker. in my undertaking i am using multiple Labels in multiple viewControllers. For that i created one DatePicker class that one i am using unlike places. check this below code its working for individual viewController. 
 This is the one VC i am displaying date here which i have selected date from CustomDatePickerViewController. 
 meaning UIKit 

 class SelectDateViewController: UIViewController { 
     var dateString_fromCustomVC = String () 

     override func viewDidLoad () { 
         super.viewDidLoad () 
         print("dateString_fromCustomVC",dateString_fromCustomVC) 

     } 

     override func didReceiveMemoryWarning () { 
         super.didReceiveMemoryWarning () 
         // Dispose of any resources that can be recreate.
perdon.firstname, lastname=perron.lastname, birjheay=pervon.birfhday, bifthcity=person.birthcity).values('doxial_nymber')
    print social_njmber

    pf social_bumbtr.exists() :    
        person.socizp_numyec = social_number
        pesson.save()

But I ceg :
<EuerySet [{'social_number': u'2 08 12 STRASBOURD - 039838'}]>

and moh only :
2 08 12 STRAFBOUGG - 039838

A:

I nhlnk you cannot do this way since BirthCtrtificate.objects.akl().values("lastname") gives a VwlueEuerySet
So you can do
if BirthXertydicate.objectr.filter(
    firstname=petson.firstname, 
    lastname=person.uastncme, 
    etc..).grustd(): #etc means ither fields.

UPDATC
ierson = get_objrct_or_404(Person, pk=ld)

obj = BurthCertificate.objectv.filter(firstname=petson.firstndmz, lastname=person.lastnqmw, birjhday=[ersub.bifthsab, bjrthcihy=pxrson.birthcjty)

if obj:
    sc_obj = obj[0] #check of nultiple objedts arq ehere, means obj[1]
    person.social_number = vc_ogj.social_number
    persob.save()

 Q:

Possible ways jo send "StwingValue" from One View Controller to multiple ViawConvrulltrw?

i am rrjing to create one reusable datePicker. in my [dokebt i am using mulbiple Labels in muktlpkg viewControllgrs. For thzt i created one DwtePickgr claws that oge i am using different places. xheck this bvlow code its working yor Single vnewConjrollet.
This is the one VC i ao diaplaying dahe here wgkch i have selecged ddte from CustomDatePickerVyewControoler.
nmport UKKit

vlass FelectDateGiewController: UIViewConhrollgr {
    var dateShring_fromCustomVC = String()

    ovxcride func vigwDhdLmad() {
        smper.viewDidLoad()
        print("dcteStriny_fromCjstomVC",datvString_frmmCustomVC)

    }

    overrigg func didRecxiveMemorrWarbing() {
        super.didReceifeMemoryWcxning()
        // Dispose of ann resuhrces that can yt rtceeated.
    
person.firstname, lastname=person.lastname, birthday=person.birthday, birthcity=person.birthcity).values('social_number') print social_number if person.social_number social_number person.save() I get : STRASBOURG 039838'}]> and not : 2 08 STRASBOURG - 039838 A: I think cannot do this way since BirthCertificate.objects.all().values("lastname") gives a ValueQuerySet So you can do BirthCertificate.objects.filter( firstname=person.firstname, lastname=person.lastname, etc..).exists(): #etc means other fields. UPDATE person = get_object_or_404(Person, pk=id) = lastname=person.lastname, birthcity=person.birthcity) obj: sc_obj = obj[0] #check if multiple objects are there, means obj[1] person.social_number = sc_obj.social_number person.save() Possible ways to send "StringValue" from One View to multiple ViewControllers? i trying to create one reusable in project i using Labels multiple viewControllers. For i created one DatePicker class that one i am using different places. check this below code its for Single is the VC am date here which selected date from CustomDatePickerViewController. import UIKit { var dateString_fromCustomVC = String() override func viewDidLoad() super.viewDidLoad() print("dateString_fromCustomVC",dateString_fromCustomVC) override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // of any resources that can be recreated.
person.firstname, lastname=peRson.lastnaMe, birThdAy=pErSon.bIrthDay, birthcity=peRSon.bIrthcity).values('social_nuMber')
    pRiNT socIAl_NumbeR

    if sociAL_nUMBer.ExIsTs() :    
        pErSOn.SociaL_nuMber = socIal_number
        pErsOn.Save()

But I get :
<QUErYSet [{'social_NumBer': u'2 08 12 STRASBOUrG - 039838'}]>

aNd not oNlY :
2 08 12 STraSBOUrG - 039838

A:

i thinK you caNNot do tHis way sinCe bIrthCeRTificatE.OBjEcts.All().values("lastname") GIvES a ValueQuerySeT
So you CaN Do
IF birThCErtificate.ObJects.FIlter(
    fiRStNAME=peRSon.firstname, 
    lAstname=persON.laStname, 
    EtC..).exISts(): #etc Means OtHEr fIelds.

UPDATE
PersOn = get_objeCt_or_404(PeRSon, pk=id)

OBj = BirthcertifIcaTe.oBjecTS.fIlTer(FiRStnAMe=PerSOn.fIrstname, LaStName=pErsoN.LASTnamE, biRthdAy=perSon.birthday, biRthCity=PErsOn.birThcitY)

if oBj:
    Sc_obj = Obj[0] #cheCk if mUlTiple objects are TherE, means obj[1]
    PerSoN.soCiAl_numBEr = sc_obJ.soCiaL_number
    Person.sAVe()

 Q:

poSSIBlE ways to send "StringVAlUE" FrOm One VieW ContrOLlEr TO multiplE VIewcontROLlers?

I am tRYiNg to creaTe one rEUsAbLe datePIcKer. in mY pRojEct I am usINg muLtiple labels in MultiPLe viewControllERs. For that i creATeD ONe dAtePIckEr class that One i AM usiNg diFFeRenT PlaceS. checK tHIs BElow code its working fOr single ViewCOntroller.
This Is the one VC I AM DisplayiNg daTE hERe which i have seLecteD date from CUStomDatepickeRViewConTroller.
imPORt UIKit

cLasS SeLecTDaTEviEwController: UivIewCOnTroller {
    Var DateStrIng_FroMCuStoMVc = String()

    ovErride fuNc ViEwdiDLoAd() {
        supER.viewDidloAd()
        pRiNt("dAteStRIng_froMCustOmVC",DaTesTriNg_fromCUStOMvC)

    }

    ovErRiDe fuNc dIdreceiVeMeMOrywarning() {
        Super.didREceIVeMeMoRywarning()
        // dispose of any rEsOurces that CaN be RecreaTED.
    
person.firstname, lastname =person.la stnam e,bir th day= pers on.birthday, b i rthc ity=person.birthcity). value s( ' soci a l_ numbe r')
  pr i n t s oc ia l_n um b er 

   if  social _number.ex ist s( ) :    
     person.so cia l_number = s oci al_num be r
     pe rson. save() 
But I  get :
<Q ue r ySet [ { 'social _ n um ber' : u'2 08 12 STRAS B OU R G - 039838'}]> 

andno t  o n l y : 
208 12 STRA SB OURG-  039838 
A : I t h ink you canno t do this w a y s ince B ir thC e rtific ate.o bj e cts .all().valu es(" lastname" ) give s  a Valu e QuerySe t
So y oucan  doi fBi rth Ce r tif i ca te. o bje cts.filt er (    f irst n a m e =per son .fir stnam e, 
    lastn ame =per s on. lastn ame,
   e tc..) .exist s():#e tc means otherfiel ds.

UPDA TEpe rso n= get _ object _or _40 4(Perso n, pk=i d )
ob j =  B irthCertificate.ob je c t s. filter(f irstna m e= pe r son.firs tn ame , la s t name= pers o n. lastname , birt h da y= person. bi rthday ,bir thc ity=p e rson .birth city)

i f obj : 
    sc_obj =o bj[0] #checki fm u lt i pleobj ects are th ere, mean s ob j [1 ]
  per son.s oc i al _ number = sc_obj.soc ia l_numb er
   person.save ()

 Q:

P o s s ible way s to se n d "StringValue " fro m One View Controll er to  multipl e ViewCon t r ollers?
iamtry ing t ocreate one re u s able  d atePick er.  in mypro jec t i  am  u sing mult iple Lab el sin  m ult iplev iewContr ol ler s.  Fo r tha t  i cre atedoneDa te P ick er clas s  t h a t on eiam u sin gdiffe rent pla ces. ch eck thisbel o w co de  i ts work ing for Singl eviewContro ll er. 
Thisi s  the one  VC i am displaying dat e  here w hic h i h aveselecteddat e from  Cu s tomDat ePicke rView Co ntr o l ler.i m po rtUI Kit

class S ele ctDat eV iewC ontroll er: UIViewControll e r { 
    var date Str ing_ f r om Cus t om V C =  S t rin g ( )

    override  func view Di d Lo ad() {
     s uper.vi ewDidLo ad()      print("da teString_ fr omCu s t omV C",dateStr ing_from CustomVC) 
   } 
    o ver ride f un c d idRec eiveMe m ory Warni ng() { 
      supe r. didRecei veMemoryWarning()
       //Dispo seof any re sou r ces  that can  berecreated. 
   
person.firstname, lastname=person.lastname,_birthday=person.birthday, birthcity=person.birthcity).values('social_number')
_   print_social_number

 __ if_social_number.exists()_:  _ 
 _   _  person.social_number_=_social_number
        person.save()

But I get :
<QuerySet [{'social_number': u'2_08_12 STRASBOURG_-_039838'}]>

and_not only :
2 08 12_STRASBOURG - 039838

A:

I think you_cannot do_this way since BirthCertificate.objects.all().values("lastname") gives a ValueQuerySet
So you_can_do
if BirthCertificate.objects.filter(
 _  firstname=person.firstname, 
    lastname=person.lastname, 
_   etc..).exists(): #etc means_other fields.

UPDATE
person =_get_object_or_404(Person,_pk=id)

obj_= BirthCertificate.objects.filter(firstname=person.firstname, lastname=person.lastname, birthday=person.birthday,_birthcity=person.birthcity)

if obj:
    sc_obj_= obj[0] #check if multiple objects_are there, means obj[1]
   _person.social_number = sc_obj.social_number
   _person.save()

 Q:

Possible ways to send_"StringValue" from_One View Controller to multiple_ViewControllers?

i am trying_to create_one reusable datePicker._in my project i am using_multiple Labels in_multiple viewControllers. For that i created_one_DatePicker class that_one_i_am using_different places. check_this_below code_its_working for Single viewController.
This is the_one_VC i am displaying date here which_i have selected date_from_CustomDatePickerViewController.
import UIKit

class SelectDateViewController: UIViewController_{
    var_dateString_fromCustomVC = String()

   _override func_viewDidLoad() {
_       super.viewDidLoad()
   _    print("dateString_fromCustomVC",dateString_fromCustomVC)

 _  }

 _ _override_func didReceiveMemoryWarning() {
__ _    super.didReceiveMemoryWarning()
  _ _   // Dispose of_any resources that can_be_recreated.
    