-
Notifications
You must be signed in to change notification settings - Fork 52
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
Access the Django Admin #63
Comments
I'm pretty sure there's a way but I don't have any recommendations. We've been using store marked as superuser to get to admin and then switched to auth0 using |
So while trying to do this for myself I discovered that you need to use custom user manager. class UserManager(BaseUserManager):
def create_user(self, myshopify_domain, password=None):
"""
Creates and saves a ShopUser with the given domain and password.
"""
if not myshopify_domain:
raise ValueError('ShopUsers must have a myshopify domain')
user = self.model(myshopify_domain=myshopify_domain)
user.set_password(password)
user.save(using=self._db)
return user
def create_superuser(self, myshopify_domain, password):
"""
Creates and saves a ShopUser with the given domains and password.
"""
return self.create_user(myshopify_domain, password)
class AuthAppShopUser(AbstractShopUser, PermissionsMixin):
objects = UserManager()
... |
@leo9226
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is it possible to access the Django Admin as a superuser (independent of any registered Shopify shop/account) and see all configured tables in the Django Admin section?
I am trying to set up the Django Admin as per documentation, but whenever I attempt to access the Admin section (localhost:8000/admin/), it asks me for a Shopify Shop name and password. Even if I type in the correct shop address and password, I cannot gain access.
Has anyone stumbled across this issue and knows what the issue here is or what I am not seeing?
Thanks a lot and stay healthy!
The text was updated successfully, but these errors were encountered: