django operational error

In the case of an Operational Error in django you HAVE TO do the following :-
0) Reload the site
Still not solved
1) Delete the migrations folder and pycache folder
Still not solved
2) Reload the site
2) python manage.py makemigrations, then python manage.py migrate.
3) Reload the site
Still not solved
4) python manage.py makemigrations appNameHere, then python manage.py migrate appNameHere
Still not solved
5) Then reload the site
Still not solved
6) Now, remove the row which was giving you the error, class y(Models.model):
a = models.CharField(default='Let us say default')
b = ....
Yes, remove the one giving you the error, for example, it is saying

OperationalError at /admin/blog/blogpost/ no such column: table_table.a
then remove the thing coming after the dot
a in this case
remove it so that only 
b = ....
is left in the model
It is happening  because that column was left null. You have to delete the column it self (NOT THE MODEL INSTANCE)
Then once you are able to get in you have to add the field again.
Then you can fill the nulled part up with something 

Still not solved

5) Reload the site
	
					The final tip

					Reload the site

The problem should be solved!!

Subscribe to GuruTheCoder

Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
django operational error 1824 how to solve operational error in django python django operational error what is operational error in django operational error in django Django OperationalError at /admin/gamer_zone/game/ no such table: gamer_zone_game OperationalError no such table: users_profile django OperationalError at /admin/posapp/products/ no such table: posapp_products django.db.utils.OperationalError: no such table: members_member django error no such table no such table: django OperationalError at /admin/skin_lesion/image/ no such table django.db.utils.OperationalError: no such table: browser_website OperationalError at /admin/api_basic/artical/ no such table: api_basic_artical OperationalError at no such table django OperationalError no such table operational error no such table django django.db.utils.OperationalError: no such table: Django 3.0 return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: no such table: book_book django operation error operationalerror OperationalError at / no such table: django.db.utils.OperationalError: no such table: podcaster_plan django.db.utils.OperationalError: no such table: StoreDetails django.db.utils.OperationalError: no such table: join_applicant Exception Type: OperationalError at /admin/shop/contact_message/ Exception Value: no such table: shop_contact_message django.db.utils.OperationalError: no such table django.db.utils.OperationalError: no such table: post post OperationalError at / no such table: network_user_likes django.db.utils.OperationalError: no such table: articles_article django operational error
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source