diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..58ef0ab --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,30 @@ +name: Django CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Run Tests + run: | + python manage.py test diff --git a/README.md b/README.md new file mode 100644 index 0000000..1a6eb49 --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# shoppifly + +``` bash +python manage.py runserver +``` + +
diff --git a/media/productimg/homepage.jpg b/media/productimg/homepage.jpg
new file mode 100644
index 0000000..ab7457c
Binary files /dev/null and b/media/productimg/homepage.jpg differ
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..3249fd5
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,5 @@
+asgiref
+Django
+Pillow
+sqlparse
+tzdata
diff --git a/shoppifly/settings.py b/shoppifly/settings.py
index bcca3a1..5b2388e 100644
--- a/shoppifly/settings.py
+++ b/shoppifly/settings.py
@@ -26,7 +26,7 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
-ALLOWED_HOSTS = []
+ALLOWED_HOSTS = ['.vercel.app']
# Application definition
@@ -162,4 +162,4 @@
messages.WARNING: 'danger',
messages.ERROR: 'danger',
50: 'critical',
-}
\ No newline at end of file
+}
diff --git a/shoppifly/vercel.json b/shoppifly/vercel.json
new file mode 100644
index 0000000..fc0ef67
--- /dev/null
+++ b/shoppifly/vercel.json
@@ -0,0 +1,13 @@
+{
+ "builds": [{
+ "src": "shoppifly/wsgi.py",
+ "use": "@vercel/python",
+ "config": { "maxLambdaSize": "15mb", "runtime": "python3.10" }
+ }],
+ "routes": [
+ {
+ "src": "/(.*)",
+ "dest": "shoppifly/wsgi.py"
+ }
+ ]
+}
diff --git a/shoppifly/wsgi.py b/shoppifly/wsgi.py
index bac846e..17b69a7 100644
--- a/shoppifly/wsgi.py
+++ b/shoppifly/wsgi.py
@@ -14,3 +14,5 @@
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'shoppifly.settings')
application = get_wsgi_application()
+
+app = application