Skip to content

Commit b51db1c

Browse files
added django 5&6 to tests
1 parent 333f855 commit b51db1c

36 files changed

Lines changed: 578 additions & 165 deletions

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ my_env
3939
venv
4040
.idea
4141
*.iml
42+
43+
#venv
44+
bin
45+
include
46+
lib
47+
pyvenv.cfg

tests/fixtures/django1/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/fixtures/django1/manage.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

tests/fixtures/django1/notes/urls.py

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/fixtures/django1/todo/settings.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

tests/fixtures/django5/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sqlite3

tests/fixtures/django5/manage.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/usr/bin/env python
2+
"""Django's command-line utility for administrative tasks."""
3+
import os
4+
import sys
5+
6+
7+
def main():
8+
"""Run administrative tasks."""
9+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todo.settings')
10+
try:
11+
from django.core.management import execute_from_command_line
12+
except ImportError as exc:
13+
raise ImportError(
14+
"Couldn't import Django. Are you sure it's installed and "
15+
"available on your PYTHONPATH environment variable? Did you "
16+
"forget to activate a virtual environment?"
17+
) from exc
18+
execute_from_command_line(sys.argv)
19+
20+
21+
if __name__ == '__main__':
22+
main()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class NotesConfig(AppConfig):
5+
name = 'notes'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from django.db import models
2+
3+
4+
class Note(models.Model):
5+
note_text = models.CharField(max_length=200)
6+
create_date = models.DateTimeField('date created')
7+
8+
def __str__(self):
9+
return self.note_text

0 commit comments

Comments
 (0)