# Help! Can't rename my Django project
I'm following a Django e-commerce tutorial and hit a snag. After installing packages and tweaking requirements.txt, I tried to rename the project. But I got this error:
> manage.py rename: error: the following arguments are required: new
I'm using a custom management command for renaming. Here's the code:
```python
import os
from django.core.management.base import BaseCommand
class RenameProjectCommand(BaseCommand):
help = 'Changes Django project name'
def add_arguments(self, parser):
parser.add_argument('old_name', type=str, nargs='+',
help='Current project folder name')
parser.add_argument('new_name', type=str, nargs='+',
help='Desired project name')
def handle(self, *args, **kwargs):
old_name = kwargs['old_name'][0]
new_name = kwargs['new_name'][0]
# Renaming logic here
files_to_update = [f'{old_name}/settings/base.py',
f'{old_name}/wsgi.py', 'manage.py']
for file_path in files_to_update:
with open(file_path, 'r') as f:
content = f.read()
content = content.replace(old_name, new_name)
with open(file_path, 'w') as f:
f.write(content)
os.rename(old_name, new_name)
self.stdout.write(self.style.SUCCESS(
f'Project renamed to {new_name}'))
What am I doing wrong? How can I fix this error?