Add ability to have a per-model prefix
See original GitHub issueIt would be nice to be able to specify a per-model prefix, eg:
class User(models.Model)
id = AutoHashId(primary_key=True, prefix='us_')
# ids like us_3n3b3hjbjh4
class Project(models.Mode)
id = AutoHashId(primary_key=True, prefix='pr_')
# ids like pr_j5f7l3hg5k5l
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:7 (6 by maintainers)
Top Results From Across the Web
benslavin/django-db-prefix - GitHub
GitHub - benslavin/django-db-prefix: Ability to specify prefixes for database table names in Django on a global, per-app, or per-model basis.
Read more >Prefixes - Grammar - Cambridge Dictionary
Writing prefixes: hyphens (super-hero or supermodel). There are no absolute rules for when to use a hyphen or when to write a prefixed...
Read more >Word Root: super- (Prefix) - Membean
The prefix super- and its variant sur- mean “over.” We all know that the DC Comics hero Superman is the hero who stands...
Read more >Using Multi-Instance Capability on the Firepower 4100/9300
Add a MAC Pool Prefix and View MAC Addresses for Container Instance Interfaces. The FXOS chassis automatically generates MAC addresses for ...
Read more >How to add prefix to all instances - Custom IC SKILL
Hi All, I need a SKILL code for adding prefix or suffix to a top-cell and to all its instances. For eg: I...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not a bad idea, and you’re not the only one to think of it. I just found @pegler has created a fork with that functionality. I’ll review his work.
OK, I have just removed the callable support for now so that it doesn’t hold up a new release. I did think it was a little superfluous since it’s called in pretty much the same context as just setting the string, but I figured there was a use-case I wasn’t aware of or thinking of. I’ll take another PR once it’s more defined.