Skip to content

Commit

Permalink
minimal set up
Browse files Browse the repository at this point in the history
  • Loading branch information
ronenlu committed Jan 25, 2024
0 parents commit 9371441
Show file tree
Hide file tree
Showing 13 changed files with 286 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.bin/
.include/
.lib/
.idea/
14 changes: 14 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
# django 5.0.2 is the latest version or more
django = ">=5.0.0"
atlas-provider-django = ">=0.1.6"

[dev-packages]

[requires]
python_version = "3.12"
199 changes: 199 additions & 0 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added test/__init__.py
Empty file.
22 changes: 22 additions & 0 deletions test/manage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys


def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'mysite.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)


if __name__ == '__main__':
main()
Empty file added test/mysite/__init__.py
Empty file.
Binary file added test/mysite/__pycache__/models.cpython-312.pyc
Binary file not shown.
12 changes: 12 additions & 0 deletions test/mysite/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.db import models


class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField("date published")


class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)
17 changes: 17 additions & 0 deletions test/mysite/settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""
Django settings for mysite project.
Generated by 'django-admin startproject' using Django 5.0.1.
For more information on this file, see
https://docs.djangoproject.com/en/5.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/5.0/ref/settings/
"""


INSTALLED_APPS = [
"polls",
"atlas_provider_django",
]
Empty file added test/polls/__init__.py
Empty file.
6 changes: 6 additions & 0 deletions test/polls/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig


class PollsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'polls'
Empty file.
12 changes: 12 additions & 0 deletions test/polls/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from django.db import models


class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField("date published")


class Choice(models.Model):
question = models.ForeignKey(Question, on_delete=models.CASCADE)
choice_text = models.CharField(max_length=200)
votes = models.IntegerField(default=0)

0 comments on commit 9371441

Please sign in to comment.