repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/downloads/migrations/0004_release_add_tagged.py
dolweb/downloads/migrations/0004_release_add_tagged.py
# Generated by Django 2.2.28 on 2023-10-01 21:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('downloads', '0003_dlv_move_from_release'), ] operations = [ migrations.AddField( model_name='releaseversion', name=...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/downloads/migrations/0001_initial.py
dolweb/downloads/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:42 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Artifact', fields=[ ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/downloads/migrations/0005_release_create_from_betas.py
dolweb/downloads/migrations/0005_release_create_from_betas.py
from django.db import migrations def create_releases_for_betas(apps, schema_editor): UpdateTrack = apps.get_model('update', 'UpdateTrack') ReleaseVersion = apps.get_model('downloads', 'ReleaseVersion') Artifact = apps.get_model('downloads', 'Artifact') for track in UpdateTrack.objects.filter(name='bet...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/downloads/migrations/__init__.py
dolweb/downloads/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/downloads/migrations/0003_dlv_move_from_release.py
dolweb/downloads/migrations/0003_dlv_move_from_release.py
from django.db import migrations, models def transfer_release_to_dlv(apps, schema_editor): ReleaseVersion = apps.get_model('downloads', 'ReleaseVersion') for release in ReleaseVersion.objects.all(): release.shortrev = release.version release.save() class Migration(migrations.Migration): d...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/views.py
dolweb/docs/views.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from annoying.decorators import render_to from django.http import HttpResponse from django.shortcuts import get_object_or_404 from django.views.decorators.cache import cache_page from dolweb.docs.models import FAQCategory, FAQ, G...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/admin.py
dolweb/docs/admin.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.contrib import admin from dolweb.docs.models import FAQCategory, FAQ, Guide class FAQCategoryAdmin(admin.ModelAdmin): list_display = ('title', 'display_order') ordering = ('display_order',) prepopulated_f...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/models.py
dolweb/docs/models.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.db import models from django.urls import reverse class FAQCategory(models.Model): """FAQ category and its display order""" title = models.CharField(max_length=64) slug = models.SlugField() display_or...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/__init__.py
dolweb/docs/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/urls.py
dolweb/docs/urls.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf.urls import url from dolweb.docs.views import faq, faq_dyni18n_po, guides_index, guide, privacy urlpatterns = [ url(r'faq/$', faq, name='docs_faq'), url(r'faq/template.po$', faq_dyni18n_po, name='docs_fa...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/templatetags/__init__.py
dolweb/docs/templatetags/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/templatetags/docs.py
dolweb/docs/templatetags/docs.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT import markdown from django import template from django.utils import safestring from dolweb.utils.dyni18n import translate, has_translation register = template.Library() @register.filter def faq_translate(text): return tra...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/management/__init__.py
dolweb/docs/management/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/management/commands/dyni18n_faq.py
dolweb/docs/management/commands/dyni18n_faq.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.core.management.base import BaseCommand import os import os.path import requests def get_resource_url(): return 'https://www.transifex.com/api/2/project/%s/resource/%s/' % ( ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/management/commands/__init__.py
dolweb/docs/management/commands/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/migrations/0001_initial.py
dolweb/docs/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='FAQ', fields=[ ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/docs/migrations/__init__.py
dolweb/docs/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/views.py
dolweb/update/views.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.http import HttpResponseBadRequest, HttpResponseNotFound, JsonResponse from django.views.decorators.cache import cache_control from dolweb.downloads.models import DevVersion, ReleaseVe...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/admin.py
dolweb/update/admin.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.contrib import admin from dolweb.update.models import UpdateTrack class UpdateTrackAdmin(admin.ModelAdmin): list_display = ('name', 'version') ordering = ('-version__date', 'name') admin.site.register(Update...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/models.py
dolweb/update/models.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.db import models from dolweb.downloads.models import DownloadableVersion class UpdateTrack(models.Model): name = models.CharField(max_length=64, db_index=True) version = models.ForeignKey( Downloadabl...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/__init__.py
dolweb/update/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/urls.py
dolweb/update/urls.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf.urls import url from dolweb.update import views urlpatterns = [ # /update/latest/beta/ url(r'^latest/(?P<track>\w+)/?$', views.latest, name='update_latest'), # /update/check/v1/dev/00000000000000000...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/migrations/0002_track_dev_to_dlv.py
dolweb/update/migrations/0002_track_dev_to_dlv.py
# Generated by Django 2.2.28 on 2023-09-29 15:11 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('update', '0001_initial'), ] operations = [ migrations.AlterField( model_name='updatetrack', ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/migrations/0001_initial.py
dolweb/update/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('downloads', '0001_initial'), ] operations = [ migrations.CreateModel( name=...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/update/migrations/__init__.py
dolweb/update/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/views.py
dolweb/media/views.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from annoying.decorators import render_to from django.views.decorators.cache import cache_page from dolweb.media.models import Screenshot @cache_page(60 * 5) @render_to('media-all.html') def all(request): images = Screenshot...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/admin.py
dolweb/media/admin.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.contrib import admin from dolweb.media.models import Screenshot class ScreenshotAdmin(admin.ModelAdmin): list_display = ('game_name', 'image', 'displayed', 'promoted') list_filter = ('displayed', 'promoted') ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/models.py
dolweb/media/models.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.db import models from sorl import thumbnail class Screenshot(models.Model): """A screenshot displayed in the media gallery, which can optionally be promoted to the homepage""" game_name = models.CharFiel...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/__init__.py
dolweb/media/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/tests.py
dolweb/media/tests.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT """ This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class Simp...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/urls.py
dolweb/media/urls.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf.urls import url from dolweb.media import views urlpatterns = [ url(r'^$', views.all, name='media_all'), ]
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/migrations/0001_initial.py
dolweb/media/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:44 from django.db import migrations, models import sorl.thumbnail.fields class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Screenshot', fields=[ ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/media/migrations/__init__.py
dolweb/media/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/views.py
dolweb/homepage/views.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from annoying.decorators import render_to from django.conf import settings from dolweb.downloads.models import DevVersion, ReleaseVersion from dolweb.homepage.models import NewsArticle from dolweb.media.models import Screenshot f...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/admin.py
dolweb/homepage/admin.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.contrib import admin from dolweb.homepage.models import NewsArticle class NewsArticleAdmin(admin.ModelAdmin): list_display = ('title', 'author', 'posted_on', 'published') list_filter = ('published',) orde...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/models.py
dolweb/homepage/models.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.db import models from django.urls import reverse class NewsArticle(models.Model): """A news article which can be linked to a forum post for comments""" title = models.CharFie...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/__init__.py
dolweb/homepage/__init__.py
default_app_config = 'dolweb.homepage.apps.HomepageConfig'
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/apps.py
dolweb/homepage/apps.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.apps import AppConfig class HomepageConfig(AppConfig): name = 'dolweb.homepage' verbose_name = 'Dolphin Website Homepage'
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/templatetags/language.py
dolweb/homepage/templatetags/language.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django import template from django.conf import settings from dolweb.utils.monkey import TO_FULL register = template.Library() EXCEPTIONS = { 'pt': ['br'], 'zh': ['cn'], } @register.filter def short(lang_code): ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/templatetags/__init__.py
dolweb/homepage/templatetags/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/migrations/0001_initial.py
dolweb/homepage/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:42 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='NewsArticle', fields=[ ('id', models.AutoFi...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/homepage/migrations/__init__.py
dolweb/homepage/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/views.py
dolweb/blog/views.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from annoying.decorators import render_to from django.conf import settings from django.core.paginator import Paginator, EmptyPage from django.db import models from django.dispatch import receiver from django.http import Http404, ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/admin.py
dolweb/blog/admin.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.contrib import admin from django.forms import Widget from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from zinnia.models.ent...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/middleware.py
dolweb/blog/middleware.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/models.py
dolweb/blog/models.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.db import models from django.utils.html import linebreaks from django.utils.translation import ugettext as _ from zinnia.markups import textile from zinnia.markups import markdown fro...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/__init__.py
dolweb/blog/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/feeds.py
dolweb/blog/feeds.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.http import Http404 from django.shortcuts import get_object_or_404 from django.urls import reverse from django.utils.translation import ugettext as _ from dolweb.blog.models import Blo...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/urls.py
dolweb/blog/urls.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.conf import settings from django.conf.urls import url, include from dolweb.blog.feeds import SeriesFeed from dolweb.blog.views import series_index, etherpad_event urlpatterns = [ url(r'^', include('zinnia.urls', ...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/templatetags/blog_tags.py
dolweb/blog/templatetags/blog_tags.py
# Copyright (c) 2018 Dolphin Emulator Website Contributors # SPDX-License-Identifier: MIT from django.template import Library register = Library() from bs4 import BeautifulSoup from django.conf import settings from django.template import defaultfilters from dolweb.blog.models import BlogSeries @register.inclusion_ta...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/templatetags/__init__.py
dolweb/blog/templatetags/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/migrations/0001_initial.py
dolweb/blog/migrations/0001_initial.py
# Generated by Django 2.0.7 on 2018-07-21 12:43 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('zinnia', '0004_on_delete_arg'), ] operations = [ migrations.CreateModel( na...
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/blog/migrations/__init__.py
dolweb/blog/migrations/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
dolphin-emu/www
https://github.com/dolphin-emu/www/blob/c8b0f64e3ecb4607b86c1712e6828809f3e5a02b/dolweb/localefixes/__init__.py
dolweb/localefixes/__init__.py
python
MIT
c8b0f64e3ecb4607b86c1712e6828809f3e5a02b
2026-01-05T07:09:32.243100Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/setup.py
setup.py
#!/usr/bin/env python import codecs import os import re import sys from os import path from setuptools import find_packages, setup # When creating the sdist, make sure the django.mo file also exists: if "sdist" in sys.argv or "develop" in sys.argv: os.chdir("fluent_contents") try: from django.core imp...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/runtests.py
runtests.py
#!/usr/bin/env python -Wd import sys import warnings from os import path import django from django.conf import global_settings as default_settings from django.conf import settings from django.core.management import execute_from_command_line # python -Wd, or run via coverage: warnings.simplefilter("always", Deprecatio...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/makemessages.py
makemessages.py
#!/usr/bin/env python import os from os import path import django from django.conf import settings from django.core.management import call_command def main(): if not settings.configured: module_root = path.dirname(path.realpath(__file__)) settings.configure(DEBUG=False, INSTALLED_APPS=("fluent_c...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/panels.py
fluent_contents/panels.py
""" Panels for django-debug-toolbar """ from datetime import timedelta from debug_toolbar.panels import Panel from debug_toolbar.utils import ThreadCollector from django.contrib.contenttypes.models import ContentType from django.utils.translation import gettext_lazy as _ from fluent_contents.extensions import PluginN...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/middleware.py
fluent_contents/middleware.py
from django.http import HttpResponseRedirect from django.utils.deprecation import MiddlewareMixin from fluent_contents.extensions import HttpRedirectRequest class HttpRedirectRequestMiddleware(MiddlewareMixin): """ .. versionadded:: 1.0 Middleware that handles requests redirects, requested by plugins usi...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/appsettings.py
fluent_contents/appsettings.py
""" Overview of all settings which can be customized. """ from django.conf import settings from django.core.exceptions import ImproperlyConfigured from fluent_utils.load import import_class from parler import appsettings as parler_appsettings # By default, output is cached. # Even for development, so the caching behav...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/analyzer.py
fluent_contents/analyzer.py
""" Analyze the templates for placeholders of this module. """ from template_analyzer.djangoanalyzer import get_node_instances from fluent_contents.models import PlaceholderData from fluent_contents.templatetags.fluent_contents_tags import PagePlaceholderNode __all__ = ("get_template_placeholder_data",) def get_tem...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/__init__.py
fluent_contents/__init__.py
# following PEP 440 __version__ = "3.1"
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/cache.py
fluent_contents/cache.py
""" Functions for caching. """ from django.contrib.contenttypes.models import ContentType def get_rendering_cache_key(placeholder_name, contentitem): """ Return a cache key for the content item output. .. seealso:: The :func:`ContentItem.clear_cache() <fluent_contents.models.ContentItem.clear_ca...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/templatetags/fluent_contents_tags.py
fluent_contents/templatetags/fluent_contents_tags.py
""" The ``fluent_contents_tags`` module provides two template tags for rendering placeholders: It can be loaded using: .. code-block:: html+django {% load fluent_contents_tags %} A placeholder which is stored in a :class:`~fluent_contents.models.PlaceholderField` can be rendered with the following syntax: .. co...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/templatetags/placeholder_tags.py
fluent_contents/templatetags/placeholder_tags.py
import warnings from django.template import Library from .fluent_contents_tags import ( PagePlaceholderNode, RenderPlaceholderNode, page_placeholder as new_page_placeholder, render_placeholder as new_render_placeholder, ) register = Library() def warn(): warnings.warn( "fluent_contents...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/templatetags/__init__.py
fluent_contents/templatetags/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/templatetags/placeholder_admin_tags.py
fluent_contents/templatetags/placeholder_admin_tags.py
from django.template import Library, Node from django.template.base import TemplateSyntaxError from tag_parser import parse_as_var, parse_token_kwargs, template_tag from fluent_contents.admin.contentitems import BaseContentItemInline register = Library() @register.filter def only_content_item_inlines(inlines): ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/__init__.py
fluent_contents/management/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/commands/find_contentitem_urls.py
fluent_contents/management/commands/find_contentitem_urls.py
import operator import sys from functools import reduce from django.core.management.base import BaseCommand from django.db import ProgrammingError, models from django.db.models import Q from django.utils import translation from django.utils.encoding import force_str from html5lib import HTMLParser, treebuilders from ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/commands/prefix_content_item_types.py
fluent_contents/management/commands/prefix_content_item_types.py
from django.core.management.base import BaseCommand from django.utils.translation import ngettext from fluent_contents.extensions import plugin_pool from fluent_contents.management import update_model_prefix class Command(BaseCommand): """ Add a prefix to the name of content items. This makes content ite...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/commands/start_content_plugin.py
fluent_contents/management/commands/start_content_plugin.py
import os import re from importlib import import_module from django.core.management import CommandError from django.core.management.templates import TemplateCommand import fluent_contents RE_PLUGIN = re.compile("Plugin$") class Command(TemplateCommand): """ Add a prefix to the name of content items. Th...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/commands/remove_stale_contentitems.py
fluent_contents/management/commands/remove_stale_contentitems.py
from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from django.db.models import Model from fluent_contents.extensions import PluginNotFound from fluent_contents.models import ContentItem class Command(BaseCommand): help = "Remove ContentItems which are ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/management/commands/__init__.py
fluent_contents/management/commands/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/search.py
fluent_contents/rendering/search.py
from django.utils.safestring import mark_safe from fluent_contents.models import ContentItemOutput from fluent_contents.utils.search import get_cleaned_string from .core import PlaceholderRenderingPipe, ResultTracker, SkipItem from .utils import get_dummy_request class SearchResultTracker(ResultTracker): def st...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/core.py
fluent_contents/rendering/core.py
import logging from django.conf import settings from django.core.cache import cache from django.db.models.query import EmptyQuerySet from django.forms import Media from django.template.loader import render_to_string from django.utils.html import escape from django.utils.safestring import mark_safe from parler.utils.co...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/main.py
fluent_contents/rendering/main.py
""" The main API for rendering content. This is exposed via __init__.py """ from django.core.cache import cache from django.utils.safestring import mark_safe from fluent_contents.cache import get_placeholder_cache_key_for_parent from fluent_contents.models import ContentItemOutput, get_parent_language_code from . imp...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/utils.py
fluent_contents/rendering/utils.py
""" Internal - util functions for this 'rendering' package. """ import logging import os import django from django.conf import settings from django.contrib.sites.models import Site from django.core.cache import cache from django.template.backends.django import Template as TemplateAdapter from django.template.loader im...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/markers.py
fluent_contents/rendering/markers.py
""" Draft - Internal functions for an "frontend edit mode". """ from django.utils.html import conditional_escape from django.utils.safestring import mark_safe def set_edit_mode(request, state): """ Enable the edit mode; placeholders and plugins will be wrapped in a ``<div>`` that exposes metadata for frontend...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/__init__.py
fluent_contents/rendering/__init__.py
""" This module provides functions to render placeholder content manually. The functions are available outside the regular templatetags, so it can be called outside the templates as well. Contents is cached in memcache whenever possible, only the remaining items are queried. The templatetags also use these functions ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/rendering/media.py
fluent_contents/rendering/media.py
from django.forms import Media from fluent_contents.models import ImmutableMedia from .utils import add_media def register_frontend_media(request, media): """ Add a :class:`~django.forms.Media` class to the current request. This will be rendered by the ``render_plugin_media`` template tag. """ i...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/extensions/pluginbase.py
fluent_contents/extensions/pluginbase.py
""" Internal module for the plugin system, the API is exposed via __init__.py """ import django.contrib.auth.context_processors import django.contrib.messages.context_processors from django.conf import settings from django.contrib import admin from django.contrib.contenttypes.models import ContentType from django.contr...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/extensions/model_fields.py
fluent_contents/extensions/model_fields.py
""" This is an internal module for the plugin system, the API is exposed via __init__.py This package contains model fields which are usable for extensions. It has a soft coupling to the real apps that are being used, which makes it easy to switch the complete plugin file/url/html fields This avoids fixing the generic...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/extensions/__init__.py
fluent_contents/extensions/__init__.py
""" Special classes to extend the module; e.g. plugins. The extension mechanism is provided for projects that benefit from a tighter integration then the Django URLconf can provide. The API uses a registration system. While plugins can be easily detected via ``__subclasses__()``, the register approach is less magic a...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/extensions/pluginpool.py
fluent_contents/extensions/pluginpool.py
""" Internal module for the plugin system, the API is exposed via __init__.py """ from threading import Lock from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ImproperlyConfigured from fluent_utils.load import import_apps_submodule from fluent_contents import appsettings fr...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/test_rendering.py
fluent_contents/tests/test_rendering.py
from django.core.cache import cache from django.http import HttpResponseRedirect from django.template import Template from django.test import RequestFactory from django.urls import reverse from fluent_contents import rendering from fluent_contents.extensions import PluginContext from fluent_contents.models import DEFA...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/test_admin.py
fluent_contents/tests/test_admin.py
from pprint import pformat from django.contrib.admin import AdminSite from django.contrib.admin.templatetags.admin_urls import admin_urlname from django.contrib.auth.models import User from django.contrib.messages.middleware import MessageMiddleware from django.test import RequestFactory, override_settings from django...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/test_templatetags.py
fluent_contents/tests/test_templatetags.py
from pprint import pprint from django.contrib.auth.models import AnonymousUser from django.core.cache import cache from django.template import Context, Template, TemplateSyntaxError, VariableDoesNotExist from django.test import RequestFactory from template_analyzer import get_node_instances from fluent_contents impor...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/test_models.py
fluent_contents/tests/test_models.py
from django.contrib.contenttypes.models import ContentType from fluent_contents.models import ContentItem from fluent_contents.tests.utils import AppTestCase class ModelTests(AppTestCase): """ Testing the data model. """ def test_stale_model_str(self): """ No matter what, the Content...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/utils.py
fluent_contents/tests/utils.py
""" Utils for internal tests, and utils for testing third party plugins. """ import os from importlib import import_module from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.models import Site from django.core.management import call_command from django.test impor...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/__init__.py
fluent_contents/tests/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/factories.py
fluent_contents/tests/factories.py
from fluent_contents.models import Placeholder from fluent_contents.tests.testapp.models import PlaceholderFieldTestPage def create_page(title="foo"): """ Create an page where contents can be placed at """ return PlaceholderFieldTestPage.objects.create(title=title) def create_placeholder(page=None, ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/test_search.py
fluent_contents/tests/test_search.py
from fluent_contents.models import Placeholder from fluent_contents.plugins.picture.models import PictureItem from fluent_contents.plugins.text.models import TextItem from fluent_contents.tests.testapp.models import RawHtmlTestItem, TestPage from fluent_contents.tests.utils import AppTestCase class SearchTest(AppTest...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/views.py
fluent_contents/tests/testapp/views.py
from django.views.generic import DetailView from fluent_contents.tests.testapp.models import PlaceholderFieldTestPage class TestPageView(DetailView): model = PlaceholderFieldTestPage template_name = "testapp/testpage.html" # The context_object_name is set to the default variable that {% page_placeholder ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/admin.py
fluent_contents/tests/testapp/admin.py
from django.contrib import admin from fluent_contents.admin import PlaceholderFieldAdmin from .models import PlaceholderFieldTestPage @admin.register(PlaceholderFieldTestPage) class PlaceholderFieldTestPageAdmin(PlaceholderFieldAdmin): """ Admin interface for the PlaceholderFieldTestPage model. """ ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/models.py
fluent_contents/tests/testapp/models.py
from django.db import models from fluent_contents.models import ( ContentItem, ContentItemRelation, PlaceholderField, PlaceholderRelation, ) class OverrideBase: # Needs to be in a different module for our tests. def get_render_template(self): pass class TestPage(models.Model): ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/__init__.py
fluent_contents/tests/testapp/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/content_plugins.py
fluent_contents/tests/testapp/content_plugins.py
from django.http import HttpResponseRedirect from django.utils.safestring import mark_safe from fluent_contents.extensions import ContentPlugin, plugin_pool from fluent_contents.tests.testapp.models import ( MediaTestItem, RawHtmlTestItem, RedirectTestItem, TimeoutTestItem, ) @plugin_pool.register cl...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/urls.py
fluent_contents/tests/testapp/urls.py
from django.contrib import admin from django.urls import path from . import views admin.autodiscover() urlpatterns = [ path("admin/", admin.site.urls), path("testpage/<int:pk>/", views.TestPageView.as_view(), name="testpage") # url(r'^comments/', include('django.contrib.comments.urls')), # url(r'^for...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/migrations/0001_initial.py
fluent_contents/tests/testapp/migrations/0001_initial.py
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("fluent_contents", "0001_initial")] operations = [ migrations.CreateModel( name="PlaceholderFieldTestPage", fields=[ ( "id", ...
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false
django-fluent/django-fluent-contents
https://github.com/django-fluent/django-fluent-contents/blob/7ff95b879b2662a52f456eaabff7d5ed623b1741/fluent_contents/tests/testapp/migrations/__init__.py
fluent_contents/tests/testapp/migrations/__init__.py
python
Apache-2.0
7ff95b879b2662a52f456eaabff7d5ed623b1741
2026-01-05T07:09:32.719958Z
false