File: django-admin

package info (click to toggle)
python-django 3%3A3.2.19-1%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 55,932 kB
  • sloc: python: 264,258; javascript: 18,362; xml: 193; makefile: 178; sh: 43
file content (38 lines) | stat: -rwxr-xr-x 637 bytes parent folder | download | duplicates (6)
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
#!/bin/sh

set -e

ensure_files_exist() {
    for f in "$@"; do
	if [ ! -e $f ]; then
	    echo "ERROR: $f does not exist" >&2
	    exit 1
	else
	    echo "OK: $f is there"
	fi
    done
}

run() {
    echo "Running “$@”"
    $@
}

# Test startproject
cd $AUTOPKGTEST_TMP
run django-admin startproject testproject

ensure_files_exist testproject/manage.py testproject/testproject/settings.py

grep -qs python3 testproject/manage.py

# Test startapp
cd testproject
run django-admin startapp testapp

ensure_files_exist testapp/models.py testapp/tests.py testapp/views.py

# Test manage.py
#./manage.py check

python3 ./manage.py check