8000 RandomCharField overwriting initial value · Issue #1681 · django-extensions/django-extensions · GitHub
[go: up one dir, main page]

Skip to content
RandomCharField overwriting initial value #1681
Closed
@ladmerc

Description

@ladmerc

Sometimes it's necessary for the random value to be not so random. I'll expect that passing initial value to the model constructor would default to the value, but this isn't the case. E.g

User.objects.create(slug='this-is-not-random')

In the above example, I'll expect the value of the slug field (which is the RandomCharField) to be set to this-is-not-random, but it gets ignored and the random char generation proceeds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0