Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6986069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:45:43+00:00 2026-05-27T18:45:43+00:00

In Django how do you remove models that you have synced into the database?

  • 0

In Django how do you remove models that you have synced into the database?

For example in Django tutorial page had this following code

from django.db import models

class Poll(models.Model):
    question = models.CharField(max_length=200)
    pub_date = models.DateTimeField('date published')

class Choice(models.Model):
    poll = models.ForeignKey(Poll)
    choice = models.CharField(max_length=200)
    votes = models.IntegerField()

Then I used python manage.py sql polls and python manage.py sql choice to create the tables into the database. But what if I did something wrong and don’t want that model any more. What’s the syntax to remove it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:45:44+00:00Added an answer on May 27, 2026 at 6:45 pm

    There is no syntax. Django doesn’t removes tables or columns. You have to manually change your database or use a migration tool like South.

    If you justing playing around with tutorial the easier way is to delete your sqlite database file and run a sync again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Django and Flex code: Django class Author(models.Model): name = models.CharField(max_length=30)
Following the Heroku tutorial but I have already created a rather complex Django app
I have the following django model: RESOURCE_DIR = os.path.join(settings.MEDIA_ROOT, 'resources') class Resource(models.Model): title =
(Django 1.x, Python 2.6.x) I have models to the tune of: class Animal(models.Model): pass
Django code samples involving post data often shows code similar to this: if request.method
I have found this code http://djangosnippets.org/snippets/2283/ but I think it doesn't work with manytomanyfields
I imported my (PHP) old site's database tables into Django. By default it created
I have the following model set up: class UserProfile(models.Model): Additional attributes for users. url
I have the following models: class UserProfile(models.Model): user = models.OneToOneField(User) score = models.PositiveIntegerField() class
I have the following models: class Author(models.Model): author_name = models.CharField() class Book(models.Model): book_name =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.