Skip to content
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

Bug in the docs #69

Open
M1ha-Shvn opened this issue Dec 4, 2017 · 3 comments
Open

Bug in the docs #69

M1ha-Shvn opened this issue Dec 4, 2017 · 3 comments

Comments

@M1ha-Shvn
Copy link

https://github.com/JBKahn/django-sharding/blob/master/README.md
contains error in "Create Your First Sharded Model" section.
@model_config(sharded=True) has no parameter sharded in latest version of library.

@M1ha-Shvn
Copy link
Author

And another one:
http://josephkahn.io/django-sharding/docs/installation/Settings.html
Additional Settings
ReadOnlyFromPrimaryDatabases is really called PrimaryOnlyRoutingStrategy

@M1ha-Shvn
Copy link
Author

@M1ha-Shvn
Copy link
Author

M1ha-Shvn commented Dec 12, 2017

http://josephkahn.io/django-sharding/docs/usage/DataMigrations.html

def do_the_stuff(apps, schema_editor):
  User = apps.get_model("auth", "User")
  current_database = schema_editor.connection.alias

  if is_model_class_on_database(model=User, database=database):
      User.objects.using(database).update(password="*******")

Variable is called current_database at first, but used as database

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant