djangosnippets.org: Latest snippets posted by stuartaccenthttps://djangosnippets.org/users/stuartaccent/2017-12-30T17:33:58.759736-06:00stuartaccentReset Postgres Sequences On Every Migrate
2017-12-30T17:33:58.759736-06:00stuartaccenthttps://djangosnippets.org/snippets/10632/<p>If you create alot of data via fixtures or by inserting the pk you will more than likely see alot of issues with the sequences being out in postgres when creating new records. </p>
<p>Similar to: Foo with the pk(x) already exists</p>
<p>This you have to fix by updating the postgres …</p>
Freely redistributableGeneric CBV Permissions Helper
2017-11-03T19:44:56.332737-05:00stuartaccenthttps://djangosnippets.org/snippets/10629/<p>A permission helper that can be included in any generic CBV, it uses the model attribute of the class to load all the permissions and tests a user can perform that action before dispatching the view.</p>
Freely redistributableWagtail Markdown Streamfield
2017-04-07T17:50:18.043433-05:00stuartaccenthttps://djangosnippets.org/snippets/10610/<p>A markdown streamfield for wagtail that includes a live preview.</p>
Freely redistributable