madga 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. madga-0.3.0/CHANGELOG.md +187 -0
  2. madga-0.3.0/LICENSE +201 -0
  3. madga-0.3.0/MANIFEST.in +21 -0
  4. madga-0.3.0/PKG-INFO +478 -0
  5. madga-0.3.0/README.md +249 -0
  6. madga-0.3.0/madga/__init__.py +5 -0
  7. madga-0.3.0/madga/admin.py +74 -0
  8. madga-0.3.0/madga/api/__init__.py +0 -0
  9. madga-0.3.0/madga/api/auth.py +57 -0
  10. madga-0.3.0/madga/api/endpoints/__init__.py +0 -0
  11. madga-0.3.0/madga/api/router.py +211 -0
  12. madga-0.3.0/madga/api/schemas.py +102 -0
  13. madga-0.3.0/madga/api/serializers.py +92 -0
  14. madga-0.3.0/madga/api/urls.py +11 -0
  15. madga-0.3.0/madga/apps.py +12 -0
  16. madga-0.3.0/madga/blocks/__init__.py +55 -0
  17. madga-0.3.0/madga/blocks/builtin.py +91 -0
  18. madga-0.3.0/madga/blocks/fields.py +272 -0
  19. madga-0.3.0/madga/blocks/registry.py +81 -0
  20. madga-0.3.0/madga/blog/__init__.py +0 -0
  21. madga-0.3.0/madga/blog/urls.py +12 -0
  22. madga-0.3.0/madga/blog/urls_root.py +19 -0
  23. madga-0.3.0/madga/blog/views.py +241 -0
  24. madga-0.3.0/madga/conf.py +22 -0
  25. madga-0.3.0/madga/context_processors.py +86 -0
  26. madga-0.3.0/madga/management/__init__.py +0 -0
  27. madga-0.3.0/madga/management/commands/__init__.py +0 -0
  28. madga-0.3.0/madga/management/commands/madga.py +293 -0
  29. madga-0.3.0/madga/migrations/0001_initial.py +188 -0
  30. madga-0.3.0/madga/migrations/0002_homepageblock_navitem.py +49 -0
  31. madga-0.3.0/madga/migrations/0003_site_facebook_pixel_id_site_google_analytics_id.py +23 -0
  32. madga-0.3.0/madga/migrations/0004_page_featured_image_page_og_image.py +24 -0
  33. madga-0.3.0/madga/migrations/0005_remove_navitem_madga_navit_site_id_2715f3_idx_and_more.py +31 -0
  34. madga-0.3.0/madga/migrations/0006_userapikey.py +35 -0
  35. madga-0.3.0/madga/migrations/__init__.py +0 -0
  36. madga-0.3.0/madga/models/__init__.py +24 -0
  37. madga-0.3.0/madga/models/api_keys.py +67 -0
  38. madga-0.3.0/madga/models/base.py +50 -0
  39. madga-0.3.0/madga/models/content.py +141 -0
  40. madga-0.3.0/madga/models/homepage.py +44 -0
  41. madga-0.3.0/madga/models/media.py +47 -0
  42. madga-0.3.0/madga/models/navigation.py +50 -0
  43. madga-0.3.0/madga/models/site.py +75 -0
  44. madga-0.3.0/madga/models/taxonomy.py +36 -0
  45. madga-0.3.0/madga/models/users.py +78 -0
  46. madga-0.3.0/madga/renderer.py +84 -0
  47. madga-0.3.0/madga/signals.py +86 -0
  48. madga-0.3.0/madga/static/madga/blog/tailwind.css +2 -0
  49. madga-0.3.0/madga/static/madga/blog/tailwind.input.css +103 -0
  50. madga-0.3.0/madga/static/madga/studio/studio.js +324 -0
  51. madga-0.3.0/madga/static/madga/studio/studio.tailwind.css +2 -0
  52. madga-0.3.0/madga/static/madga/studio/studio.tailwind.input.css +507 -0
  53. madga-0.3.0/madga/studio/__init__.py +0 -0
  54. madga-0.3.0/madga/studio/forms.py +111 -0
  55. madga-0.3.0/madga/studio/invitations.py +52 -0
  56. madga-0.3.0/madga/studio/middleware.py +54 -0
  57. madga-0.3.0/madga/studio/mixins.py +66 -0
  58. madga-0.3.0/madga/studio/urls.py +93 -0
  59. madga-0.3.0/madga/studio/views/__init__.py +0 -0
  60. madga-0.3.0/madga/studio/views/api_keys.py +67 -0
  61. madga-0.3.0/madga/studio/views/auth.py +38 -0
  62. madga-0.3.0/madga/studio/views/dashboard.py +119 -0
  63. madga-0.3.0/madga/studio/views/homepage.py +165 -0
  64. madga-0.3.0/madga/studio/views/media.py +123 -0
  65. madga-0.3.0/madga/studio/views/navigation.py +127 -0
  66. madga-0.3.0/madga/studio/views/pages.py +80 -0
  67. madga-0.3.0/madga/studio/views/posts.py +232 -0
  68. madga-0.3.0/madga/studio/views/preview.py +116 -0
  69. madga-0.3.0/madga/studio/views/settings.py +197 -0
  70. madga-0.3.0/madga/studio/views/taxonomy.py +74 -0
  71. madga-0.3.0/madga/studio/views/themes.py +51 -0
  72. madga-0.3.0/madga/studio/views/users.py +154 -0
  73. madga-0.3.0/madga/templates/account/login.html +64 -0
  74. madga-0.3.0/madga/templates/account/signup.html +72 -0
  75. madga-0.3.0/madga/templates/madga/blog/base.html +118 -0
  76. madga-0.3.0/madga/templates/madga/blog/blocks/_block.html +1 -0
  77. madga-0.3.0/madga/templates/madga/blog/blocks/cta.html +6 -0
  78. madga-0.3.0/madga/templates/madga/blog/blocks/featured_post.html +8 -0
  79. madga-0.3.0/madga/templates/madga/blog/blocks/hero.html +14 -0
  80. madga-0.3.0/madga/templates/madga/blog/blocks/newsletter.html +8 -0
  81. madga-0.3.0/madga/templates/madga/blog/blocks/recent_posts.html +14 -0
  82. madga-0.3.0/madga/templates/madga/blog/blocks/text.html +4 -0
  83. madga-0.3.0/madga/templates/madga/blog/detail-docs.html +62 -0
  84. madga-0.3.0/madga/templates/madga/blog/detail-longform.html +53 -0
  85. madga-0.3.0/madga/templates/madga/blog/detail.html +47 -0
  86. madga-0.3.0/madga/templates/madga/blog/first_run.html +48 -0
  87. madga-0.3.0/madga/templates/madga/blog/home-editorial.html +62 -0
  88. madga-0.3.0/madga/templates/madga/blog/home-minimal.html +28 -0
  89. madga-0.3.0/madga/templates/madga/blog/home.html +40 -0
  90. madga-0.3.0/madga/templates/madga/blog/list-compact.html +36 -0
  91. madga-0.3.0/madga/templates/madga/blog/list-grid.html +47 -0
  92. madga-0.3.0/madga/templates/madga/blog/list.html +40 -0
  93. madga-0.3.0/madga/templates/madga/blog/page-docs.html +22 -0
  94. madga-0.3.0/madga/templates/madga/blog/page-sidebar.html +24 -0
  95. madga-0.3.0/madga/templates/madga/blog/page.html +13 -0
  96. madga-0.3.0/madga/templates/madga/emails/invitation.html +24 -0
  97. madga-0.3.0/madga/templates/madga/emails/invitation.txt +10 -0
  98. madga-0.3.0/madga/templates/madga/includes/site_tokens.html +8 -0
  99. madga-0.3.0/madga/templates/madga/includes/tracking.html +28 -0
  100. madga-0.3.0/madga/templates/madga/site_base.html +2 -0
  101. madga-0.3.0/madga/templates/madga/studio/accept_invite.html +31 -0
  102. madga-0.3.0/madga/templates/madga/studio/api_keys.html +83 -0
  103. madga-0.3.0/madga/templates/madga/studio/base.html +73 -0
  104. madga-0.3.0/madga/templates/madga/studio/blocks/_list_field.html +43 -0
  105. madga-0.3.0/madga/templates/madga/studio/components/badge.html +3 -0
  106. madga-0.3.0/madga/templates/madga/studio/components/editor_toolbar.html +48 -0
  107. madga-0.3.0/madga/templates/madga/studio/components/editor_toolbar_init.html +85 -0
  108. madga-0.3.0/madga/templates/madga/studio/components/empty_state.html +7 -0
  109. madga-0.3.0/madga/templates/madga/studio/components/featured_image_field.html +34 -0
  110. madga-0.3.0/madga/templates/madga/studio/components/media_picker.html +38 -0
  111. madga-0.3.0/madga/templates/madga/studio/components/media_picker_grid.html +29 -0
  112. madga-0.3.0/madga/templates/madga/studio/components/page_header.html +9 -0
  113. madga-0.3.0/madga/templates/madga/studio/components/pagination.html +21 -0
  114. madga-0.3.0/madga/templates/madga/studio/components/post_list_rows.html +46 -0
  115. madga-0.3.0/madga/templates/madga/studio/components/sidebar.html +87 -0
  116. madga-0.3.0/madga/templates/madga/studio/components/stat_card.html +16 -0
  117. madga-0.3.0/madga/templates/madga/studio/components/topbar.html +111 -0
  118. madga-0.3.0/madga/templates/madga/studio/dashboard.html +156 -0
  119. madga-0.3.0/madga/templates/madga/studio/homepage.html +103 -0
  120. madga-0.3.0/madga/templates/madga/studio/layouts.html +47 -0
  121. madga-0.3.0/madga/templates/madga/studio/login.html +51 -0
  122. madga-0.3.0/madga/templates/madga/studio/media.html +52 -0
  123. madga-0.3.0/madga/templates/madga/studio/navigation.html +133 -0
  124. madga-0.3.0/madga/templates/madga/studio/page_edit.html +137 -0
  125. madga-0.3.0/madga/templates/madga/studio/page_list.html +56 -0
  126. madga-0.3.0/madga/templates/madga/studio/post_edit.html +325 -0
  127. madga-0.3.0/madga/templates/madga/studio/post_list.html +66 -0
  128. madga-0.3.0/madga/templates/madga/studio/preview.html +52 -0
  129. madga-0.3.0/madga/templates/madga/studio/settings.html +75 -0
  130. madga-0.3.0/madga/templates/madga/studio/taxonomy.html +55 -0
  131. madga-0.3.0/madga/templates/madga/studio/theme.html +193 -0
  132. madga-0.3.0/madga/templates/madga/studio/theme_gallery.html +65 -0
  133. madga-0.3.0/madga/templates/madga/studio/users.html +64 -0
  134. madga-0.3.0/madga/templatetags/__init__.py +0 -0
  135. madga-0.3.0/madga/templatetags/madga_blocks.py +57 -0
  136. madga-0.3.0/madga/templatetags/madga_studio_tags.py +195 -0
  137. madga-0.3.0/madga/templatetags/madga_tags.py +120 -0
  138. madga-0.3.0/madga/themes/__init__.py +28 -0
  139. madga-0.3.0/madga/themes/builtin.py +49 -0
  140. madga-0.3.0/madga/themes/registry.py +79 -0
  141. madga-0.3.0/madga/urls.py +56 -0
  142. madga-0.3.0/madga.egg-info/PKG-INFO +478 -0
  143. madga-0.3.0/madga.egg-info/SOURCES.txt +146 -0
  144. madga-0.3.0/madga.egg-info/dependency_links.txt +1 -0
  145. madga-0.3.0/madga.egg-info/requires.txt +9 -0
  146. madga-0.3.0/madga.egg-info/top_level.txt +1 -0
  147. madga-0.3.0/pyproject.toml +71 -0
  148. madga-0.3.0/setup.cfg +4 -0
@@ -0,0 +1,187 @@
1
+ # CHANGELOG
2
+
3
+ All notable changes to MADGA. Format roughly follows [Keep a Changelog](https://keepachangelog.com/).
4
+
5
+ ## [0.3.0] — 2026-05-16
6
+
7
+ Focus: **foundation for non-blog projects.** MADGA stops being just a blog CMS and becomes a usable base layer for marketplaces, job boards, and other multi-role products.
8
+
9
+ ### Added
10
+ - **`madga/site_base.html`** — thin template that host projects extend
11
+ for any non-blog page (signup, profile, marketplace listings…). Pulls
12
+ the public header/footer chrome, exposes the same `title`,
13
+ `meta_description`, `og`, `head_extra`, `content`, `footer`,
14
+ `body_extra` blocks as the blog templates.
15
+ - **Per-user API keys.** `UserApiKey` model with `madga_`-prefixed keys,
16
+ masked display, rotation, last-used tracking. New `/studio/api-keys/`
17
+ page (create / rotate / revoke / delete). `APIKeyAuth` now tries the
18
+ user keys first, falls back to the Site key. `request.user` is set
19
+ when a user key matches.
20
+ - **`user_post_signup` custom signal** + bridge from allauth's
21
+ `user_signed_up`. Host projects subscribe to create their profile rows
22
+ (e.g. `TalentProfile`, `CompanyProfile`). Multi-type onboarding
23
+ supported: write `request.session["madga_signup_kind"] = "talent"`
24
+ before signup and the signal receives `kind="talent"`.
25
+ - **`madga backfill-profiles --kind=X`** subcommand: re-fires
26
+ `user_post_signup` for every existing User so new profile-extension
27
+ receivers can populate rows retroactively.
28
+ - **Public allauth signup wired** with MADGA chrome. Templates
29
+ `account/signup.html` and `account/login.html` extend `site_base.html`
30
+ with i18n strings and styled form widgets.
31
+ - **`madga_site` context variable** alongside `site` — survives
32
+ third-party views (allauth, custom views) that overwrite `site` in
33
+ their `get_context_data`. MADGA template tags resolve through this
34
+ to avoid mistaking `django.contrib.sites.Site` for MADGA's Site.
35
+ - **Postgres 16 verified.** New `testproject/settings_pg.py` swap-in
36
+ settings; full test suite runs green on both sqlite and Postgres.
37
+ README documents the verify procedure.
38
+ - **CI + Publish workflows.** `.github/workflows/ci.yml` runs the suite
39
+ against sqlite + Postgres on every push/PR.
40
+ `.github/workflows/publish.yml` publishes to PyPI on `v*` tags via
41
+ Trusted Publishing (OIDC, no stored secrets).
42
+ - 4 new tests for the public signup signal flow.
43
+
44
+ ### Fixed
45
+ - Public account templates no longer crash with `VariableDoesNotExist`
46
+ when allauth injects its own `django.contrib.sites.Site` into context
47
+ — `{% firstof %}` in the public base template and template tags fetch
48
+ from `madga_site`.
49
+
50
+ ### Migration notes
51
+ - Move `'madga'` BEFORE `'allauth'` in `INSTALLED_APPS` so MADGA's
52
+ `account/signup.html` and `account/login.html` win template
53
+ resolution.
54
+ - New migration `0006_userapikey`. Run `python manage.py migrate`.
55
+
56
+ ## [0.2.0] — 2026-05-10
57
+
58
+ Focus: usable as a library in OTHER projects (not just miscore).
59
+
60
+ ### Added
61
+ - **Real packaging.** `pyproject.toml` gains `[build-system]`,
62
+ `[tool.setuptools.packages.find]`, `[tool.setuptools.package-data]` so
63
+ templates, static, migrations, emails ship via pip. `MANIFEST.in` mirrors
64
+ the resource list as a safety net. Verified end-to-end: `pip install
65
+ madga` in a fresh venv + `migrate` + `runserver` → studio loads at 200.
66
+ - **Single `madga` CLI** consolidating the previous management commands.
67
+ Subcommands: `create-site`, `seed-demo`, `build-css`, `blocks`, `version`.
68
+ The old standalone `madga_create_site`, `madga_seed`, `madga_tailwind`
69
+ files were removed.
70
+ - **First-run welcome page** at `/` when no Site exists. Shows the
71
+ bootstrap commands (createsuperuser + `madga create-site`) instead of
72
+ crashing with a NoneType error on a clean install.
73
+ - **Layouts page** functional. Selector per content-type (Homepage / Blog
74
+ index / Post detail / Static pages) with options persisted in
75
+ `Site.settings`. Public template chain prefers `<kind>-<layout>.html`
76
+ when set.
77
+ - **Drag-and-drop reorder** for homepage blocks. Sortable.js loaded once
78
+ in `studio/base.html`; any `[data-madga-sortable]` container with a
79
+ `data-reorder-url` becomes draggable. Server-side: a single
80
+ `action=reorder` branch persists `sort_order=index+1` in a transaction.
81
+ - **Role enforcement per action.** `MadgaStudioMixin.can_edit_post()` and
82
+ `can_delete_post()`. Author can edit/delete own posts; Editor + Owner
83
+ can edit/delete anyone. Publish silently downgrades to draft when the
84
+ user lacks `publish_post`. Bulk actions filter by permission and warn
85
+ if items were skipped.
86
+ - 6 new role-matrix tests; integration suite at 22 tests, all passing.
87
+
88
+ ### Fixed
89
+ - `post_edit.html` SERP preview accessed `post.meta_title` /
90
+ `post.title` / `post.excerpt` unguarded, crashing
91
+ `/studio/posts/new/` with `VariableDoesNotExist`. Wrapped in
92
+ `{% if post %}`.
93
+
94
+ ## [0.1.1] — 2026-05-09
95
+
96
+ ### Added
97
+ - `Page.featured_image` and `Page.og_image` (FK to MediaFile). New fields
98
+ exposed in `PageForm` and the page editor's right rail.
99
+ - `madga.urls.madga_public_urls()` helper consolidates the standard public
100
+ URL patterns (`/`, `/blog/`, `/blog/<slug>/`, `/p/<slug>/`, `/robots.txt`,
101
+ `/sitemap.xml`, `/rss.xml`). Pass `include_homepage=False` if your project
102
+ owns `/`.
103
+ - `AcceptInviteView` at `/studio/accept-invite/<token>/`. GET shows
104
+ accept-or-cancel; POST creates `SiteUser` membership + the user account
105
+ if needed. 14-day TTL; expired invitations flip to `status=expired` with
106
+ a friendly UI.
107
+ - `madga.studio.invitations.send_invitation_email()` helper using
108
+ `EmailMultiAlternatives`. Templates in `madga/emails/invitation.{txt,html}`.
109
+ - `EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'` in the
110
+ dev `testproject` settings (and the gitignored miscoreblog).
111
+ - Integration test suite under `tests/` covering post lifecycle, page
112
+ rendering, block registry, headless API, and invitations. 16 tests pass
113
+ in ~2s. `pip install -e .[test]` then `pytest tests/`.
114
+ - `README.md` with install, wire-up, custom block recipes, theming.
115
+
116
+ ### Changed
117
+ - `register_block_type()` now validates `key`, `label`, `template`, and
118
+ `fields` at registration time. Loud `ValueError` instead of silent
119
+ half-broken types in the studio. Re-registering a key logs a warning.
120
+
121
+ ### Notes
122
+ - `link` is NOT an Editor.js core inline tool; previous versions' editor
123
+ wired `'link'` in `inlineToolbar` which crashed init silently. The
124
+ templates now use `editorjs-hyperlink@1.0.6` registered as
125
+ `hyperlink: { class: Hyperlink }`.
126
+
127
+ ## [0.1.0] — 2026-05-09
128
+
129
+ ### Added — block registry & extensibility
130
+ - `madga.blocks` module: `BlockType`, `Field` hierarchy
131
+ (`Text`, `Url`, `Int`, `Choice`, `Image`, `List`), `register_block_type`.
132
+ - `madga.templatetags.madga_blocks.render_block` dispatches a HomepageBlock
133
+ to its registered template; `media_url` / `media_alt` filters resolve
134
+ MediaFile UUIDs in templates.
135
+ - 6 default block types in `madga.blocks.builtin`: hero, recent_posts,
136
+ featured_post, newsletter, text, cta — each with their public template.
137
+
138
+ ### Added — Etapa 4 polish
139
+ - Pagination on the Posts list (20/page).
140
+ - Toast/snackbar global subscribed to Django messages, auto-dismiss 4s.
141
+ - `data-madga-confirm="message"` modal replacing native `confirm()`.
142
+ - Dashboard: time-aware greeting (Buenos días/tardes/noches), real
143
+ sparklines from daily counts (last 14 days), deltas with %,
144
+ per-post deterministic gradient thumbnails, real activity feed.
145
+ - Settings split into 4 tabs (General / Marca / SEO / Integraciones).
146
+
147
+ ### Added — Etapa 3 public frontend
148
+ - `HomepageView` iterates `HomepageBlock` rows; falls back to a generic
149
+ recent-posts list when no blocks configured.
150
+ - `RobotsTxtView`, `SitemapView`, `RssFeedView` (no third-party deps).
151
+ - Theme template chain: `madga/themes/{site.theme}/{view}.html` →
152
+ `madga/blog/{view}.html`.
153
+ - `Site.google_analytics_id` and `Site.facebook_pixel_id` fields.
154
+ `{% madga_tracking site %}` inclusion tag injects GA4 + Meta Pixel
155
+ script blocks conditionally.
156
+
157
+ ### Added — Etapa 2
158
+ - Homepage builder UI: per-block-type forms with curated fields. Up/down
159
+ arrows for reordering, eye toggle for visibility, delete with confirm.
160
+
161
+ ### Added — Etapa 1
162
+ - Featured image card in the editor rail (post + page editor).
163
+ - Reusable media picker modal at `/studio/media/picker/` with HTMX search
164
+ and type filter.
165
+ - Google-style SERP preview card under SEO. Live character counters on
166
+ Excerpt, Meta title, Meta description.
167
+ - Editor.js inline tools: explicit `inlineToolbar` array with marker,
168
+ inline-code, underline, hyperlink registered.
169
+
170
+ ### Fixed
171
+ - "Publicar" button was always saving as draft due to dual `name="status"`
172
+ inputs colliding (rail select + action buttons).
173
+ - "Live" link from the editor 404'd on drafts; now hidden until published.
174
+ - Studio responsive: viewport meta fixed, sidebar drawer below 900px,
175
+ editor stacks to one column, tables collapse to cards below 600px.
176
+ - Dashboard, Settings, post_edit, page_edit had several multi-line
177
+ `{# ... #}` Django comments leaking as raw text (Django comments are
178
+ single-line only).
179
+
180
+ ### Removed
181
+ - Unused `nitro/` library deleted from the repo. madga has zero `from nitro`
182
+ imports; if needed later it'll be a real dependency.
183
+
184
+ ## [0.0.1] — 2026-05-09
185
+
186
+ Initial commit. Studio MVP, Editor.js, Django Ninja API, public blog
187
+ templates, prototype-to-Tailwind+components port.
madga-0.3.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ include README.md
2
+ include CHANGELOG.md
3
+ include LICENSE
4
+ include pyproject.toml
5
+
6
+ # Belt-and-suspenders for setuptools include_package_data: explicitly
7
+ # globbing every sub-resource so pip install actually ships them.
8
+ recursive-include madga *.py
9
+ recursive-include madga/templates *.html *.txt
10
+ recursive-include madga/static *
11
+ recursive-include madga/migrations *.py
12
+
13
+ # Don't ship dev-only stuff.
14
+ prune tests
15
+ prune testproject
16
+ prune miscoreblog
17
+ prune prototype
18
+ prune .git
19
+ prune .venv
20
+ global-exclude *.pyc __pycache__
21
+ global-exclude .DS_Store