Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I rename a Django project in PyCharm?

Tags:

django

pycharm

What do I need to do in order to rename my Django project in PyCharm? I am new to Django and PyCharm and would like to use a different name for my project.

like image 269
northben Avatar asked May 28 '13 17:05

northben


People also ask

How do I change the name of a project in PyCharm?

Renaming ProjectsRight-click the root folder of your project and select Refactor | Rename from the context menu or press Shift+F6 . In the dialog that opens, choose the rename strategy. If the project name is the same as the name of its root folder, select Rename directory.

How do I edit a project in PyCharm?

Switching between projects To switch between open projects, you can use the following commands of the Window menu: Window | Next Project Window Ctrl+Alt+] Window | Previous Project Window Ctrl+Alt+[

How do I change the project directory in PyCharm?

Open the Project Structure settings. In the Projects pane of the Project Structure page, click the project you want to configure content roots for. In the dialog that opens, locate the desired directory and click OK.


1 Answers

The built-in solution for re-naming Django projects in PyCharm has worked for me in the past on small projects, although I haven't tried it on a large project yet. To use it, select the project folder from the file-tree (by default on the left hand side of the screen), then press shift-F6 to bring up the rename dialogue. You can enter in your new name here and preview the changes, which can help prevent surprises. If you're happy with the preview, click on the "Do Refactor" button at the bottom of the window.

This is also a useful way to rename Django apps.

You can access the same functionality through right-clicking on the folder/item and hovering over the Refactor sub-menu. Or pressing ctrl+shift+a and searching for rename.

like image 154
svass Avatar answered Sep 20 '22 13:09

svass