Skip to content

Commit

Permalink
Merge pull request #127 from justicehub-in/jhdev-alpha2
Browse files Browse the repository at this point in the history
New JH release for alpha 1.1.0
  • Loading branch information
shashank-sharma authored Apr 12, 2021
2 parents e344cc5 + 71d1547 commit 78ce7c3
Show file tree
Hide file tree
Showing 159 changed files with 8,689 additions and 584 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ nosetests.xml
coverage.xml

# Sphinx documentation
docs/_build/
docs/_build/

# Editors
.idea
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.rst
include LICENSE
include requirements.txt
recursive-include ckanext/justicehub_theme *.html *.json *.js *.less *.css *.mo
recursive-include ckanext/justicehub_theme *.html *.json *.js *.less *.css *.mo *.png *.svg
135 changes: 135 additions & 0 deletions ckan_license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
[
{
"domain_content": false,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "PDDL-1.0",
"legacy_ids": [
"ODC-PDDL-1.0"
],
"maintainer": "",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Open Data Commons Public Domain Dedication and License (PDDL)",
"url": "https://opendatacommons.org/licenses/pddl/"
},
{
"domain_content": false,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "ODbL-1.0",
"maintainer": "",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Open Data Commons Open Database License (ODBL)",
"url": "https://opendatacommons.org/licenses/odbl/"
},
{
"domain_content": false,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "ODC-BY-1.0",
"maintainer": "Open Data Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Open Data Commons Attribution License (ODC-By)",
"url": "https://opendatacommons.org/licenses/by/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": true,
"family": "",
"id": "CC0-1.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
"url": "https://creativecommons.org/publicdomain/zero/1.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution 4.0 International (CC BY 4.0)",
"url": "https://creativecommons.org/licenses/by/4.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-SA-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)",
"url": "https://creativecommons.org/licenses/by-sa/4.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "Creative Commons",
"id": "CC-BY-NC-4.0",
"maintainer": "Creative Commons",
"od_conformance": "rejected",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)",
"url": "https://creativecommons.org/licenses/by-nc/4.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-NC-SA-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)",
"url": "https://creativecommons.org/licenses/by-nc-sa/4.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-ND-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)",
"url": "https://creativecommons.org/licenses/by-nd/4.0/"
},
{
"domain_content": true,
"domain_data": true,
"domain_software": false,
"family": "",
"id": "CC-BY-NC-ND-4.0",
"maintainer": "Creative Commons",
"od_conformance": "approved",
"osd_conformance": "not reviewed",
"status": "active",
"title": "Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)",
"url": "https://creativecommons.org/licenses/by-nc-nd/4.0/"
}
]
172 changes: 172 additions & 0 deletions ckan_sources.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
[
{
"name": "National Crime Records Bureau ",
"code": "NCRB ",
"link": "https://ncrb.gov.in/en/crime-india"
},
{
"name": "District courts (eCourts India Services) ",
"code": "DC ",
"link": "https://districts.ecourts.gov.in/"
},
{
"name": "High Courts ",
"code": "HC ",
"link": "https://ecourts.gov.in/ecourts_home/static/highcourts.php"
},
{
"name": "Supreme Court ",
"code": "SC ",
"link": "https://supremecourtofindia.nic.in/"
},
{
"name": "First Information Report ",
"code": "FIR ",
"link": ""
},
{
"name": "Data on Police Organizations, Bureau of Police Research and Development (BPR&D) ",
"code": "BPRD ",
"link": "https://bprd.nic.in/content/62_1_DataonPoliceOrganizations.aspx"
},
{
"name": "Combined Finance and Revenue Accounts of the Union and State Governments in India, Comptroller and Auditor General of India ",
"code": "CAG, India ",
"link": "https://cag.gov.in/audit-reports"
},
{
"name": "Open Budgets India ",
"code": "OBI ",
"link": "openbudgetsindia.org/"
},
{
"name": "Primary Census Abstract, Census 2011 ",
"code": "Census, 2011 ",
"link": "https://censusindia.gov.in/2011-common/censusdata2011.html"
},
{
"name": "Prison Statistics India ",
"code": "PSI ",
"link": "https://ncrb.gov.in/en/prison-statistics-india"
},
{
"name": "Court News, Supreme Court of India ",
"code": "Court News, SC ",
"link": "https://supremecourtofindia.nic.in/"
},
{
"name": "Right to Information ",
"code": "RTI ",
"link": ""
},
{
"name": "Department of Justice (courthalls) ",
"code": "CourtHalls, DoJ ",
"link": "https://doj.gov.in/"
},
{
"name": "National Judicial Data Grid ",
"code": "NJDG ",
"link": "https://njdg.ecourts.gov.in/"
},
{
"name": "National Legal Services Authority ",
"code": "NALSA ",
"link": "https://nalsa.gov.in/statistics"
},
{
"name": "SCC Online ",
"code": "SCC ",
"link": "https://www.scconline.com/"
},
{
"name": "IndianKanoon ",
"code": "IndianKanoon ",
"link": "https://indiankanoon.org/"
},
{
"name": "Gazette of India ",
"code": "Gazette ",
"link": "http://egazette.nic.in/(S(l1hxo4md0ybkknii4dlynavg))/default.aspx?AcceptsCookies=yes"
},
{
"name": "Newspaper Reports ",
"code": "Media ",
"link": ""
},
{
"name": "International Organisations ",
"code": "IO ",
"link": ""
},
{
"name": "National Family Health Survey ",
"code": "NFHS ",
"link": "http://rchiips.org/nfhs/"
},
{
"name": "Ministry of Tribal Affairs ",
"code": "",
"link": "https://tribal.nic.in/"
},
{
"name": "Common Service Centres ",
"code": "CSC ",
"link": "https://www.csc.gov.in/"
},
{
"name": "National Informatics Centre ",
"code": "NIC ",
"link": "https://www.nic.in/"
},
{
"name": "Ministry of Housing and Urban Affairs ",
"code": "MoHU ",
"link": "https://www.mohua.gov.in/"
},
{
"name": "National Sample Survey Office ",
"code": "NSSO ",
"link": "http://www.mospi.gov.in/nsso"
},
{
"name": "Association for Democratic Reforms ",
"code": "ADR ",
"link": "http://myneta.info"
},
{
"name": "Twitter ",
"code": "Twitter ",
"link": "https://twitter.com/"
},
{
"name": "Household Survey ",
"code": "Survey ",
"link": ""
},
{
"name": "Organisations Reports ",
"code": "OR ",
"link": ""
},
{
"name": "National Human Rights Commission ",
"code": "NHRC ",
"link": "https://nhrc.nic.in/"
},
{
"name": "National Institutes of Health ",
"code": "NIH ",
"link": "https://www.ncbi.nlm.nih.gov/"
},
{
"name": "UN Office on Drugs & Crime Ministry of Women and Child Development (India) ",
"code": "UNDOC ",
"link": "https://www.unodc.org/pdf/india/publications/India%20Country%20Report.pdf"
},
{
"name": "Researve Bank of India ",
"code": "RBI ",
"link": "https://www.rbi.org.in/"
}
]
8 changes: 8 additions & 0 deletions ckanext/justicehub_theme/controllers/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import ckan.logic as logic
import ckan.model as model
from ckan.common import c, request
import ckan.lib.helpers as h

clean_dict = logic.clean_dict
parse_params = logic.parse_params
Expand Down Expand Up @@ -103,3 +104,10 @@ def subscribe(self):
tag_response = requests.request("POST", tag_url, headers=headers, data = json.dumps(payload))

return response.text.encode('utf8')

def upload(self):
if c.user:
return plugins.toolkit.render('dataupload/index.html')
else:
#TO DO: change hardcoded value "/upload" to directly pick from requester url
h.redirect_to('/login?came_from=/upload')
Loading

0 comments on commit 78ce7c3

Please sign in to comment.