-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_dev.sh
More file actions
executable file
·50 lines (42 loc) · 1.51 KB
/
setup_dev.sh
File metadata and controls
executable file
·50 lines (42 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
# Create a Python virtual environment
echo "Creating virtual environment..."
python3 -m venv venv
# Activate virtual environment
source venv/bin/activate
# Upgrade pip
pip install --upgrade pip
# Install requirements
echo "Installing requirements..."
pip install -r requirements.txt
# Create config.ini from example if it doesn't exist
if [ ! -f devshowcase/config.ini ]; then
echo "Creating config.ini..."
cp devshowcase/config.ini.example devshowcase/config.ini
echo "Please update devshowcase/config.ini with your settings"
fi
# Create media directories
echo "Creating media directories..."
mkdir -p media/devshowcase/profile_pics
mkdir -p media/devshowcase/project_images
# Create a default profile picture if it doesn't exist
if [ ! -f media/devshowcase/profile_pics/default.jpg ]; then
echo "Creating default profile picture..."
# Create a simple default image using Python
python3 -c "
from PIL import Image, ImageDraw
img = Image.new('RGB', (200, 200), color='#e0e0e0')
draw = ImageDraw.Draw(img)
# Draw a simple user icon
draw.ellipse([50, 50, 150, 150], fill='#9e9e9e')
img.save('media/devshowcase/profile_pics/default.jpg')
print('Default profile picture created')
"
fi
echo "Setup complete! Next steps:"
echo "1. Update devshowcase/config.ini with your database settings"
echo "2. Run: source venv/bin/activate"
echo "3. Run: python manage.py makemigrations"
echo "4. Run: python manage.py migrate"
echo "5. Run: python manage.py createsuperuser"
echo "6. Run: python manage.py runserver"