Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

Default to current/all sites in admin

This code sets the default sites for a sites ManyToMany property of a model to Site.objects.all(). This could easily be changed to Site.objects.get_current() to use the current site as default.

Surely, we should be able to use default=[Site.objects.get_current() in the model but apparently ...

Don't be the product, buy the product!