https://github.com/codesetuptest/django-django-11564
SWE-bench instance: django__django-11564
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.9%) to scientific vocabulary
Repository
SWE-bench instance: django__django-11564
Basic Info
- Host: GitHub
- Owner: CodeSetupTest
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 0 Bytes
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
SWE-bench Instance: django__django-11564
Repository: django/django Base Commit: 580e644f24f1c5ae5b94784fb73a9953a178fd26
Problem Statement
Add support for SCRIPTNAME in STATICURL and MEDIA_URL Description
(last modified by Rostyslav Bryzgunov)
By default, {% static '...' %} tag just appends STATICURL in the path. When running on sub-path, using SCRIPTNAME WSGI param, it results in incorrect static URL - it doesn't prepend SCRIPTNAME prefix. This problem can be solved with prepending SCRIPTNAME to STATICURL in settings.py but that doesn't work when SCRIPTNAME is a dynamic value. This can be easily added into default Django static tag and django.contrib.staticfiles tag as following: def render(self, context): url = self.url(context) # Updating url here with request.META['SCRIPTNAME'] if self.varname is None: return url context[self.varname] = url return '' On more research I found that FileSystemStorage and StaticFilesStorage ignores SCRIPTNAME as well. We might have to do a lot of changes but I think it's worth the efforts.
Repository Contents
This repository contains the actual source code from the original repository at commit 580e644f24f1c5ae5b94784fb73a9953a178fd26. The code is ready for development and testing.
Docker Environment
A Dockerfile is provided to set up the proper environment for this instance:
bash
docker build -t swebench-instance .
docker run -it swebench-instance /bin/bash
Owner
- Name: CodeSetupTest
- Login: CodeSetupTest
- Kind: organization
- Repositories: 1
- Profile: https://github.com/CodeSetupTest
GitHub Events
Total
- Create event: 2
Last Year
- Create event: 2
Dependencies
- sweb.env.py.x86_64.a18371b03f944585b4f08c latest build
- eslint ^4.18.2 development
- grunt ^1.0.1 development
- grunt-cli ^1.2.0 development
- grunt-contrib-qunit ^1.2.0 development
- asgiref *
- pytz *
- sqlparse *
- mysqlclient >=1.3.13 test
- cx_oracle >=6.0 test
- psycopg2 >=2.5.4 test
- Pillow * test
- PyYAML * test
- argon2-cffi >=16.1.0 test
- asgiref * test
- bcrypt * test
- docutils * test
- geoip2 * test
- jinja2 >=2.9.2 test
- numpy * test
- pylibmc * test
- python-memcached >=1.59 test
- pytz * test
- pywatchman * test
- selenium * test
- sqlparse * test
- tblib * test