Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

more documentation on how to use this library better? #7

Open
simkimsia opened this issue Jan 11, 2020 · 3 comments
Open

more documentation on how to use this library better? #7

simkimsia opened this issue Jan 11, 2020 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@simkimsia
Copy link

simkimsia commented Jan 11, 2020

I have this exact code snippet and the migration is successful.

from core.models import PersonStampedModel
from django_ltree.fields import PathField
from model_utils.models import SoftDeletableModel, TimeStampedModel
from organizations.managers import OrganizationOwnedSoftDeletableManager
from organizations.models import OrganizationOwnedModel
from partial_index import PQ, PartialIndex


class WorkBreakdownStructure(
    TimeStampedModel, SoftDeletableModel, PersonStampedModel, OrganizationOwnedModel
):
    wbs_number = PathField(primary_key=True, editable=True)

    objects = OrganizationOwnedSoftDeletableManager()

    unique_field_in_organization = "wbs_number"

    def __str__(self):
        return str(self.wbs_number)

    class Meta:
        indexes = [
            PartialIndex(
                fields=["wbs_number", "organization"], unique=True, where=PQ(is_removed=False)
            )
        ]

I wanted to quickly bulk create the following records:

ABC20.12345.50000 - ABC20.12345.51000

I was wondering if there's some documentation on how to do this.

versions

Django: v2.2.9
Python: v3.6
postgres: v10

@mariocesar mariocesar added the good first issue Good for newcomers label Jul 1, 2020
@mariocesar mariocesar self-assigned this Jul 1, 2020
@anomality
Copy link

anomality commented Feb 16, 2021

It would be great to see at least any kind of example usind it.

@mariocesar
Copy link
Owner

I certainly neglect the documentation, could you give me a list of missing points? what do you think needs to be addressed?

@anomality
Copy link

anomality commented Feb 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants