-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: include test app for django package (#760)
* feat: include test app for django package * feat: include test app for django package * fix: add Sphinx autodoc
- Loading branch information
1 parent
b0f9ab5
commit 8c1eafe
Showing
9 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
6 changes: 6 additions & 0 deletions
6
project/tests/{% if is_django_package %}testapp{% endif %}/apps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class TestAppConfig(AppConfig): | ||
name = "tests.testapp" | ||
verbose_name = "Test App" |
24 changes: 24 additions & 0 deletions
24
project/tests/{% if is_django_package %}testapp{% endif %}/models.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from django.db import models | ||
|
||
|
||
class Blog(models.Model): | ||
name = models.CharField(max_length=50) | ||
|
||
|
||
class Author(models.Model): | ||
full_name = models.CharField(max_length=50) | ||
|
||
|
||
class Post(models.Model): | ||
blog = models.ForeignKey( | ||
Blog, | ||
on_delete=models.CASCADE, | ||
related_name="posts", | ||
) | ||
author = models.ForeignKey( | ||
Author, | ||
on_delete=models.CASCADE, | ||
related_name="posts", | ||
) | ||
title = models.CharField(max_length=50) | ||
content = models.TextField() |
6 changes: 6 additions & 0 deletions
6
project/tests/{% if is_django_package %}urls.py{% endif %}.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.contrib import admin | ||
from django.urls import path | ||
|
||
urlpatterns = [ | ||
path("admin/", admin.site.urls), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters