Question

My django project has a local app named 'accounts' that manages User accounts. It has live and populated db tables that start with accounts_. It also has a urls.py entry:

(r'^accounts/', include('accounts.urls')),

Now, I want to use django-allauth to support OpenId. However, I noticed that there is an app name clash since allauth also uses accounts to create db tables starting with accounts_ and asks urls.py to contain:

(r'^accounts/', include('allauth.urls')),

What is the best way to solve this app name conflict?

Was it helpful?

Solution

Add db_table to Meta:

class Accounts(models.Model):
    # ...
    class Meta:
        db_table = 'my_accounts'

Regarding the URL's. Can't you use both? I.e:

(r'^accounts/', include('accounts.urls')),
(r'^accounts/', include('allauth.urls')),
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top