Skip to content
This repository was archived by the owner on May 12, 2023. It is now read-only.

Conversation

@victoraysev
Copy link

view and manager pages are missing. will updated later. filters,serializers are done.

Copy link
Owner

@upy upy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

field name'leri get_all_base_abstract_model_attrs bu sekilde yapmamizin motivasyonu ne idi?

from django.shortcuts import render

# Create your views here.
# from rest_framework import viewsets
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bu dosyanin tamamini neden yorum yaptik?

class BillingAddressSerializer(serializers.ModelSerializer):
class Meta:
model = BillingAddress
fields = get_all_billing_address_attrs() + get_all_base_abstract_model_attrs() + "id"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

burada hata alir miyiz?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Teşekkür ederim hocam düzelttim.

@victoraysev
Copy link
Author

field name'leri get_all_base_abstract_model_attrs bu sekilde yapmamizin motivasyonu ne idi?

reusable olması ve yeni bir field eklendiğinde bütün field'leri çeken yerleri güncellemek zorunda kalmamak.

@upy
Copy link
Owner

upy commented Dec 12, 2021

field name'leri get_all_base_abstract_model_attrs bu sekilde yapmamizin motivasyonu ne idi?

reusable olması ve yeni bir field eklendiğinde bütün field'leri çeken yerleri güncellemek zorunda kalmamak.

anliyorum, yapilabilir ama sahsen okunabilirligi azalttigi hissiyatim var veya hic boyle bir kullanim tercihi gormedigimden bana oyle geliyor olabilir.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants