forked from yousumohamed/Sendpilot-email-bulk-message
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.bat
More file actions
71 lines (63 loc) · 1.58 KB
/
setup.bat
File metadata and controls
71 lines (63 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@echo off
echo ========================================
echo Bulk Email Dashboard Setup Script
echo ========================================
echo.
echo Step 1: Creating virtual environment...
python -m venv venv
if %errorlevel% neq 0 (
echo ERROR: Failed to create virtual environment
pause
exit /b 1
)
echo Virtual environment created successfully!
echo.
echo Step 2: Activating virtual environment...
call venv\Scripts\activate.bat
echo.
echo Step 3: Upgrading pip...
python -m pip install --upgrade pip
echo.
echo Step 4: Installing dependencies...
pip install -r requirements.txt
if %errorlevel% neq 0 (
echo ERROR: Failed to install dependencies
pause
exit /b 1
)
echo Dependencies installed successfully!
echo.
echo Step 5: Creating .env file...
if not exist .env (
copy .env.example .env
echo .env file created! Please edit it with your SMTP credentials.
) else (
echo .env file already exists.
)
echo.
echo Step 6: Running migrations...
python manage.py makemigrations
python manage.py migrate
if %errorlevel% neq 0 (
echo ERROR: Failed to run migrations
pause
exit /b 1
)
echo Migrations completed successfully!
echo.
echo Step 7: Creating superuser...
echo Please create an admin account:
python manage.py createsuperuser
echo.
echo ========================================
echo Setup Complete!
echo ========================================
echo.
echo To start the development server, run:
echo venv\Scripts\activate
echo python manage.py runserver
echo.
echo Then visit: http://127.0.0.1:8000
echo Admin panel: http://127.0.0.1:8000/admin
echo.
pause