Like the others have said, this would be much easier to do on the database side than the Django side.
For Postgres, it’d be like so: ALTER SEQUENCE sequence_name RESTART WITH 12345;
Look at your own DB engine’s docs for how you’d do it there.
More Related Contents:
- Django MEDIA_URL and MEDIA_ROOT
- Multiple ModelAdmins/views for same model in Django admin
- Render HTML to PDF in Django site
- Django: add image in an ImageField from image url
- how to iterate through dictionary in a dictionary in django template?
- Django Model Field Default Based Off Another Field in Same Model
- Django multi tenancy
- Django – How to make a variable available to all templates?
- GeoDjango on Windows: “Could not find the GDAL library” / “OSError: [WinError 126] The specified module could not be found”
- manage.py runserver
- Forbidden (403) CSRF verification failed. Request aborted. Even using the {% csrf_token %}
- filter foreignkey field in django admin
- Unexpected NoReverseMatch error when using include() in urls patterns
- A QuerySet by aggregate field value
- How to override the default value of a Model Field from an Abstract Base Class
- Django override save for model only in some cases?
- ImproperlyConfiguredError about app_name when using namespace in include()
- can’t pip install mysql-python
- What’s the purpose of Django setting ‘SECRET_KEY’?
- Django-DB-Migrations: cannot ALTER TABLE because it has pending trigger events
- Good ways to sort a queryset? – Django
- Why django urls end with a slash?
- Django Tastypie Advanced Filtering: How to do complex lookups with Q objects
- Permission to view, but not to change! – Django
- How can I specify a database for Django Tests to use instead of having it build it every time?
- How to create a django ViewFlow process programmatically
- Django: app level variables
- How do I access dictionary keys that contain hyphens from within a Django template?
- CSRF validation does not work on Django using HTTPS
- How to use custom AdminSite class?