Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to delete project in django

Initially, I had a single project in Django now I want to delete the last project and start a fresh new project with the same name as the last one. How should I do so? Can deleting the project folders be sufficient.

like image 618
nimeshkiranverma Avatar asked Jul 09 '12 08:07

nimeshkiranverma


People also ask

How do I remove an app from Django project?

To remove the app from your project, all you need to do is remove it from INSTALLED_APPS in your project's settings.py . Django will no longer load the app. If you no longer want the app's files hanging around, delete the app directory from your project directory or other location on your PYTHONPATH where it resides.

How do I delete all files in Django?

I would use 'DELETE FROM %s' % (table_name, ) for that bit, leaving the table empty but intact.

How do I clear an app in Python?

You need to remove or check the following: Remove the app from INSTALLED_APPS . Remove any database tables for the models in that app (see app_name_model_name in your database). Check for any imports in other apps (it could be that they're importing code from that app).


Video Answer


2 Answers

Deleting the project folder is sufficient and make changes in your apache server too[if you have one].

like image 81
Vivek S Avatar answered Sep 21 '22 01:09

Vivek S


To delete the project you can delete the project folder. But this method is good only if you use SQLite as a database.

If you use any other database like Postgresql with Django, you need to delete the database manually.

If you are on VPS. Simply go to the folder where your project folder resides and put command rm -r projectfoldername

This should delete the folder and it's contents.

like image 36
Kunal Kumar Avatar answered Sep 17 '22 01:09

Kunal Kumar