
70 Cal.App.2d 619 (1945)
HAZEL J. MAJORS, Respondent,
v.
WILLIAM L. MAJORS, Appellant.
Civ. No. 14925. 
California Court of Appeals. Second Dist., Div. Three.  
Aug. 30, 1945.
 Irwin M. Fulop, Mark M. Cohen and George I. Devor for Appellant.
 O. B. DeCamp and Hector P. Baida for Respondent.
 SHINN, J.
 This is an appeal by defendant from a decree of divorce in a default action. It is taken only from the provisions which refused approval of a property settlement agreement and awarded plaintiff one dollar per month for support. The marriage was without issue. Defendant's contention is that these provisions were in excess of the relief sought by the amended complaint and that they were based upon implied findings which were without support in the evidence. The action was commenced September 23, 1944; on October 6, 1944, the parties entered into a written property settlement agreement; on October 10, 1944, plaintiff filed an amended complaint; defendant accepted service but made no appearance in the action and his default was duly entered. The original complaint alleged that there was community property of unstated value, consisting of a residence, furniture and furnishings therein, an automobile and a "community interest in the Group Diagnostic Offices." The cause of action was for cruelty and the prayer was for a divorce, for an award of all the community property to plaintiff except the interest in the Group Diagnostic Offices, and for temporary and permanent alimony, attorney's fees and costs. In the amended complaint the foregoing allegations were omitted and it was alleged that the parties had entered into an agreement disposing *623 of their property interests and that the agreement was satisfactory to plaintiff, and the prayer was for a divorce and "that the community property settlement agreement entered into between the parties be approved and that the court make its order in accordance therewith, and for such other and further relief as the court may deem just." Upon the trial it was proved that the parties had been married for a little over eight years; that defendant had been guilty of cruelty; that a property settlement agreement had been entered into under which plaintiff had conveyed her interest in the home, the furnishings and the automobile to defendant, in consideration of $500 in cash and $3,000, payable at the rate of $30 per month, evidenced by defendant's promissory note and a trust deed on the property, subject to existing encumbrances. She relinquished all other claims to property and to support. Plaintiff testified that she was working at the time of trial as a graduate nurse; that she had been so employed during all of her married life, and that she was satisfied with the terms of the property settlement agreement. She also testified that she had some small bank accounts of her own. There was no evidence as to the value of the residence, the furniture or the automobile, and no evidence as to the amount of defendant's earnings nor as to the age or condition of health of either of the parties. No suggestion was made to the court that the agreement was in any respect unreasonable or unjust to either party nor that plaintiff's consent thereto had not been given voluntarily and advisedly. At the conclusion of the trial the cause was taken under submission. The decree contained no reference to the agreement other than the provision "The property settlement agreement is not approved."
 [1] The relief awarded plaintiff was in excess of that which she sought by the amended complaint; her demand for a money judgment was based upon the contract, while the judgment for support was predicated upon a statutory right which she did not assert. She did not pray for support, as such, nor allege facts which would have entitled her to it. Defendant having defaulted, the court could not properly award plaintiff a judgment for support. The late cases of Eddy v. Eddy (1944), 64 Cal.App.2d 672 [149 P.2d 187], Peck v. Peck (1942), 52 Cal.App.2d 792 [127 P.2d 94], and Darsie v. Darsie (1942), 49 Cal.App.2d 491 [122 P.2d 64], hold that section 580 of the Code of Civil Procedure, which *624 limits the relief which may be granted in default cases to that sought by the complaint, has application to default divorce cases. Plaintiff insists that these cases should be overruled, contending that we should follow the example of the trial judge in the case at bar, who, as justice pro tempore of another division of this court, wrote the first opinion in the Darsie case, reported in 118 P.2d 898, which was reversed on rehearing (49 Cal.App.2d 491, supra), and who also wrote the dissenting opinion on rehearing. Although we are impressed by the fact that the learned and sincere trial judge has the courage of his convictions, we are unable to agree with his conclusions.
 [2a] The agreement contained the following provision: "It is hereby agreed that this agreement may be submitted to the court for approval in the aforesaid divorce action and shall be incorporated in any interlocutory decree of divorce rendered by such court in such proceedings, and such decree shall provide for the division of the property of the parties and payments to wife as herein provided." Defendant was justified in believing that plaintiff would not be granted relief which was altogether different from or in excess of that which she sought by her amended complaint. [3] Even if there had been no property settlement agreement and the complaint had made a demand for a specific division of the community property, without a separate prayer for support, a decree in accordance with the demands, defendant having defaulted, would have had the force of a binding contract. (Franklin v. Franklin (1945), 67 Cal.App.2d 717, 720, 721 [155 P.2d 637]; Maxwell v. Maxwell (1944), 66 Cal.App.2d 549, 552 [152 P.2d 530]; Brown v. Brown (1915), 170 Cal. 1, 5 [147 P. 1168].) [2b] It is to be presumed that he defaulted in anticipation of the granting of a decree to plaintiff and approval of the agreement by the court and that if he and his wife had not reached an agreement he would have resisted her plea for a divorce and perhaps filed a cross-complaint for divorce. The judgment establishes plaintiff's right to receive support from defendant independent of the contract and leaves her in a position to apply at any time for an increase of the amount awarded for her support. Although by her amended complaint she limited her demands to those which were recognized by the agreement, it is her position now that she could not by an agreement with defendant waive *625 her right to a judgment for support and that she is entitled to support in whatever amount the court may see fit to award her, and this in addition to what she is entitled to receive under the contract. While the amount of the present award is insignificant, the right which the judgment establishes in disregard of the agreement and the prayer of the amended complaint is in excess of that which plaintiff demanded, and in this respect the judgment is erroneous.
 [4] This, however, is not the only reason why the provisions of the judgment appealed from cannot be sustained. There were issues in the case which it was necessary for the court to decide and which have not been decided. The agreement purported to adjust not only the community property rights of the parties, but it also fixed and settled plaintiff's right to receive support. By section 146 of the Civil Code it is made the duty of the court upon dissolution of the marriage to assign the community property to the respective parties in such proportions as the court, from all of the facts of the case and the condition of the parties may deem just, if the decree is rendered upon the ground of adultery, incurable insanity, or extreme cruelty, and equally between the parties if the decree is rendered upon any other ground. If there is no prayer for an assignment of the community property in the divorce action the court is not required to do anything about it. But if there is a prayer for the assignment or division of it, it is the duty of the court to decide how it should be divided and to render judgment accordingly. The action is not fully tried until this has been done. [5] Furthermore, when plaintiff filed her action for divorce, her right to receive a judgment for support was necessarily involved. If the complaint of a wife does not pray for support or if none is awarded her by the judgment, she cannot obtain a judgment for support later. The question of her right to support by virtue of the statute must be determined in the divorce action. [6] If the agreement which plaintiff placed in evidence was valid, she was entitled to the unpaid balance of $3,500 which she was to receive for her interest in the property and in lieu of support. She could not be given a judgment for support unless the validity of the agreement had been placed in issue and it had been held invalid. The fact that the validity of the agreement was not questioned did not require the court to approve it. If the evidence had *626 disclosed facts which caused the court to question either its validity or fairness, the parties should have been given an opportunity to raise the issue by proper pleadings and it should have been tried and determined. [7] Plaintiff had sought approval of the agreement and had testified that she was satisfied with it. It stood in the way of any division of the community property and of any judgment for plaintiff's support contrary to or inconsistent with its provisions, and the court could not properly ignore its existence. If there was no good reason for questioning the validity or fairness of the agreement and for placing that matter in issue, then there was no good reason for refusing to approve it. In order to dispose of the matters of community property and support, the agreement had to be regarded as valid, in which case the judgment should have followed it, or it had to be found invalid and therefore ineffective to influence or control the judgment.
 [8] Plaintiff insists that it was within the discretion of the court to approve the agreement or to refuse to approve it and to give a general judgment for support, and that no abuse of discretion has been shown. There are several answers to this contention. As already stated, the mere refusal to approve the agreement left the court in a position where the issues as to the community property and plaintiff's right to support could not be determined. The discretion of the court had to be exercised with due consideration for the pleadings and the undisputed facts in evidence; otherwise it would not have been the exercise of judicial discretion. (Gossman v. Gossman, (1942), 52 Cal.App.2d 184 [126 P.2d 178].) [9] The facts before the court were those admitted by the pleadings and established by the evidence and, in addition, material facts, if any such existed, of which the court had judicial knowledge. As already stated, there was no evidence as to the value of the community property nor as to the amount of defendant's earnings or his ability to earn and to support plaintiff. The best evidence that the agreement was not unfair to plaintiff and that she had not been overreached in the settlement was her own testimony that she was satisfied. Defendant must have been satisfied, since he defaulted to the amended complaint, which prayed for approval of the agreement. The parties were competent, they had no children, and they had the benefit of counsel when they made the agreement. They had a right to separate upon their own terms and to divide their property as they wished. *627 If they failed to make a good agreement, that was something for them to worry about and make an issue of. They wished the agreement to be approved by the court so as to foreclose future argument and litigation. While the court was not bound by their request that the agreement be approved, it was bound to render judgment in accordance with the pleadings and the evidence. [10] It is not within the discretion of the court to refuse to give judgment declaring a right which is properly pleaded and well established by the evidence. Where good grounds exist for the granting of legal or equitable relief, judgment is given to the party entitled thereto as a matter of right and not of grace. [11] And in equity, in order to avoid unnecessary litigation, the court will, if possible, decide all controversies arising out of the matter in dispute, which is the foundation of the equitable action. [12] Here the parties have been left in somewhat of a predicament. Their purpose to insure to themselves an enduring peace appears to have been frustrated. Plaintiff does not complain of this. Now that she has obtained her divorce without a contest, she is willing to keep what she gets under the agreement and to obtain more if she can. But she is entertaining false hopes. The agreement and the judgment as it stands are inconsistent and she cannot claim under both. There is, however, no need for further litigation or controversy. The judgment should be modified by striking therefrom the provision awarding plaintiff one dollar per month for her support and by substituting for the provision disapproving the agreement one which gives it the court's approval.
 The provisions of the judgment appealed from are reversed for further proceedings in accordance with the views herein expressed.
 Desmond, P. J., and Wood (Parker), J., concurred.
