Skip to content

Commit 75af256

Browse files
Add static project model corpus profiles
Refs #401
1 parent 19ca995 commit 75af256

36 files changed

Lines changed: 996 additions & 1 deletion

File tree

crates/djls-corpus/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Corpus of real-world Django projects for grounding tests in reality.
44

55
This crate syncs pinned versions of Django, popular third-party libraries, and open-source Django projects as git archives, then provides helpers to enumerate and locate files within them.
66

7+
Static project model tests also use explicit profiles in `static-project-model-profiles.toml`. Profiles identify settings contexts, source roots, expected local/external apps, template directories, and template tag modules for representative corpus projects. The GH-401 multi-site monorepo shape lives under `fixtures/static-project-model/` because the public corpus does not currently contain that exact real-world layout.
8+
79
## Commands
810

911
```bash

crates/djls-corpus/fixtures/static-project-model/gh401-multisite/apps/clientname/__init__.py

Whitespace-only changes.

crates/djls-corpus/fixtures/static-project-model/gh401-multisite/apps/clientname/app1/__init__.py

Whitespace-only changes.
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 App1Config(AppConfig):
5+
name = "clientname.app1"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{% load app1_tags %}
2+
{% app1_name %}

crates/djls-corpus/fixtures/static-project-model/gh401-multisite/apps/clientname/app1/templatetags/__init__.py

Whitespace-only changes.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from django import template
2+
3+
register = template.Library()
4+
5+
6+
@register.simple_tag
7+
def app1_name():
8+
return "app1"

crates/djls-corpus/fixtures/static-project-model/gh401-multisite/apps/clientname/app2/__init__.py

Whitespace-only changes.
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 App2Config(AppConfig):
5+
name = "clientname.app2"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{% load app2_tags %}
2+
{% app2_name %}

0 commit comments

Comments
 (0)