question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Are all djstripe model id's indexed

See original GitHub issue

I am storing stripe id’s (“acct_…”) in my models. Just confirming that using Account.objects.get(id=id) or any of the other djstripe model id’s (which contain the stripe object id’s) are indexed by default. I am just a bit confused because i see

djstripe_id = models.BigAutoField(
    verbose_name="ID", serialize=False, primary_key=True
)
id = StripeIdField(unique=True)

so it doesn’t look like the id has a db_index. Only the djstripe_id. I’m not sure what the difference is between them. Would i be able to get a bit of clarification? Thank you.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jleclanchecommented, Apr 9, 2022

@eliezerp3 I’m sorry, I can’t make guarantees right now. The war in Ukraine has affected me a lot and my time to work on dj-stripe has gotten near-nil. Arnav is still doing great work but I don’t have time to review and merge any of it yet.

0reactions
eliezerp3commented, Apr 10, 2022

@jleclanche Wow. Sorry to hear man. Take all the time you need and really appreciate it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dj-stripe Documentation - Read the Docs
Each model is tied closely to its corre- sponding object in the stripe dashboard. Fields that are not implemented for each model have...
Read more >
Discussion: Use stripe IDs as primary keys · Issue #512 - GitHub
I've been trying to think through the implications of using stripe IDs as primary keys for all models that could bear it.
Read more >
dj-stripe Documentation
Subscription management. • Designed for easy implementation of post-registration subscription forms. • Single-unit purchases.
Read more >
dj-stripe 2.0.2 - PyPI
dj-stripe implements all of the Stripe models, for Django. ... At some point 2018 Stripe silently changed the ID used for test events...
Read more >
Check if a user has a subscription with dj-stripe in Django ...
The new user model can then be accessed by, say, the views in views.py : from my_app.models import UserProfile def index(request): user = ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found