Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
227 changes: 227 additions & 0 deletions banned_apps.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
[
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "TikTok",
"app_type": "social",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53234116",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "PUBG Mobile",
"app_type": "gaming",
"ban_reason": "Security concerns and addiction-related issues",
"ban_date": "2020-09-02",
"source_url": "https://indianexpress.com/article/technology/gaming/pubg-mobile-ban-in-india-explained-6581277/",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "China",
"country_code": "CN",
"app_name": "Facebook",
"app_type": "social",
"ban_reason": "Government censorship and internet regulations",
"ban_date": "2009-07-01",
"source_url": "https://www.bbc.com/news/technology-40449959",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "China",
"country_code": "CN",
"app_name": "WhatsApp",
"app_type": "messaging",
"ban_reason": "Government censorship and national security concerns",
"ban_date": "2017-09-25",
"source_url": "https://www.nytimes.com/2017/09/25/business/china-whatsapp-blocked.html",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "Russia",
"country_code": "RU",
"app_name": "LinkedIn",
"app_type": "social",
"ban_reason": "Violation of data storage laws",
"ban_date": "2016-11-17",
"source_url": "https://www.bbc.com/news/world-europe-38005238",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "Iran",
"country_code": "IR",
"app_name": "Telegram",
"app_type": "messaging",
"ban_reason": "Government censorship and national security concerns",
"ban_date": "2018-04-30",
"source_url": "https://www.reuters.com/article/us-iran-telegram/iran-bans-telegram-app-to-protect-national-security-state-tv-idUSKBN1I11A5",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "United States",
"country_code": "US",
"app_name": "Huawei AppGallery",
"app_type": "other",
"ban_reason": "National security concerns",
"ban_date": "2019-05-15",
"source_url": "https://www.theverge.com/2019/5/20/18632722/huawei-google-android-ban-trump-executive-order",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "WeChat",
"app_type": "social",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53232486",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "UC Browser",
"app_type": "browser",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53232486",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "CamScanner",
"app_type": "productivity",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53232486",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "ShareIt",
"app_type": "file sharing",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53232486",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "Shein",
"app_type": "e-commerce",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://www.bbc.com/news/world-asia-india-53232486",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "Likee",
"app_type": "social",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://indianexpress.com/article/technology/tech-news-technology/year-of-the-banned-tiktok-to-pubg-mobile-all-the-apps-that-stopped-working-in-india-in-2020-7118174/",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "Battlegrounds Mobile India (BGMI)",
"app_type": "gaming",
"ban_reason": "Security concerns",
"ban_date": "2022-07-28",
"source_url": "https://www.bbc.com/news/world-asia-india-62344926",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
},
{
"model": "website.bannedapp",
"fields": {
"country_name": "India",
"country_code": "IN",
"app_name": "Weibo",
"app_type": "social",
"ban_reason": "Security concerns and data privacy issues",
"ban_date": "2020-06-29",
"source_url": "https://en.wikipedia.org/wiki/Censorship_of_TikTok",
"is_active": true,
"created_at": "2024-03-13T00:00:00Z",
"updated_at": "2024-03-13T00:00:00Z"
}
}
]
3 changes: 3 additions & 0 deletions blt/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
UserIssueViewSet,
UserProfileViewSet,
)
from website.views.banned_apps import BannedAppsView, search_banned_apps
from website.views.bitcoin import (
BaconSubmissionView,
bacon_requests_view,
Expand Down Expand Up @@ -352,6 +353,8 @@
handler500 = "website.views.core.handler500"

urlpatterns = [
path("banned-apps/", BannedAppsView.as_view(), name="banned_apps"),
path("api/banned-apps/search/", search_banned_apps, name="search_banned_apps"),
path("500/", TemplateView.as_view(template_name="500.html"), name="500"),
path("", home, name="home"),
path("invite-friend/", invite_friend, name="invite_friend"),
Expand Down
16 changes: 16 additions & 0 deletions website/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from website.models import (
IP,
Activity,
BannedApp,
Bid,
Blocked,
ChatBotLog,
Expand Down Expand Up @@ -760,3 +761,18 @@ def mark_as_launched(self, request, queryset):
admin.site.register(Queue, QueueAdmin)
admin.site.register(JoinRequest, JoinRequestAdmin)
admin.site.register(Notification)


@admin.register(BannedApp)
class BannedAppAdmin(admin.ModelAdmin):
list_display = ("app_name", "country_name", "country_code", "app_type", "ban_date", "is_active")
list_filter = ("app_type", "is_active", "ban_date")
search_fields = ("country_name", "country_code", "app_name", "ban_reason")
date_hierarchy = "ban_date"
ordering = ("country_name", "app_name")

fieldsets = (
("App Information", {"fields": ("app_name", "app_type")}),
("Country Information", {"fields": ("country_name", "country_code")}),
("Ban Details", {"fields": ("ban_reason", "ban_date", "source_url", "is_active")}),
)
50 changes: 50 additions & 0 deletions website/migrations/0232_bannedapp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Generated by Django 5.1.7 on 2025-03-13 09:33

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("website", "0231_organization_check_ins_enabled_notification"),
]

operations = [
migrations.CreateModel(
name="BannedApp",
fields=[
("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("country_name", models.CharField(max_length=100)),
("country_code", models.CharField(max_length=2)),
("app_name", models.CharField(max_length=100)),
(
"app_type",
models.CharField(
choices=[
("social", "Social Media"),
("messaging", "Messaging"),
("gaming", "Gaming"),
("streaming", "Streaming"),
("other", "Other"),
],
max_length=20,
),
),
("ban_reason", models.TextField()),
("ban_date", models.DateField(default=django.utils.timezone.now)),
("source_url", models.URLField(blank=True)),
("is_active", models.BooleanField(default=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
],
options={
"verbose_name": "Banned App",
"verbose_name_plural": "Banned Apps",
"ordering": ["country_name", "app_name"],
"indexes": [
models.Index(fields=["country_name"], name="website_ban_country_980b5d_idx"),
models.Index(fields=["country_code"], name="website_ban_country_119ba5_idx"),
],
},
),
]
33 changes: 33 additions & 0 deletions website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2301,6 +2301,39 @@ def __str__(self):
return f"{self.username}: {self.content[:50]}"


class BannedApp(models.Model):
APP_TYPES = (
("social", "Social Media"),
("messaging", "Messaging"),
("gaming", "Gaming"),
("streaming", "Streaming"),
("other", "Other"),
)

country_name = models.CharField(max_length=100)
country_code = models.CharField(max_length=2) # ISO 2-letter code
app_name = models.CharField(max_length=100)
app_type = models.CharField(max_length=20, choices=APP_TYPES)
ban_reason = models.TextField()
ban_date = models.DateField(default=timezone.now)
source_url = models.URLField(blank=True)
is_active = models.BooleanField(default=True)
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

class Meta:
verbose_name = "Banned App"
verbose_name_plural = "Banned Apps"
ordering = ["country_name", "app_name"]
indexes = [
models.Index(fields=["country_name"]),
models.Index(fields=["country_code"]),
]

def __str__(self):
return f"{self.app_name} (Banned in {self.country_name})"


class Notification(models.Model):
user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="notifications")
message = models.TextField()
Expand Down
Loading