Comments (5)
DMP doesn’t really support having your entire site in a subdirectory — devSite/ in your case. It’s going to see the first url part as the app (devSite) and the second part as the .py file to call (timesheets). In your URL, “index” is request.urlparams[0]
I have no problem adding this behavior to DMP, though. It just doesn’t do this now.
Conan C. Albrecht, Ph.D.
Information Systems Department
Brigham Young University
Email: [email protected]
Blog: http://goalbrecht.com/
On Apr 14, 2015, at 10:59, Kevin Gardner [email protected] wrote:
Could you post the code where you're trying to reach the URL? I've noticed that within my application, I always need to explicitly state the URL as '/app/view.viewfunction/urlparameters/.' You'll notice that, because you've used a string in the app portion of the URL that your project doesn't recognize ('devSite'), the DMP router has defaulted to the default app that you've listed in your settings.py file ('homepage').
Just as a side note, the default app and default page are set using the DMP_DEFAULT_PAGE, DMP_DEFAULT_APP options in your settings file. The DMP router will default to these if it doesn't recognize something in your URL.
—
Reply to this email directly or view it on GitHub.
from django-mako-plus.
I just think that having the site hosted in a subdirectory makes sense, so I consider this a valuable fix if you can indeed implement it.
Thanks!
from django-mako-plus.
from django-mako-plus.
I just uploaded a change that makes it possible to have a subdirectory. See the tutorial here:
https://github.com/doconix/django-mako-plus#installing-django-in-a-subdirectory
And be sure to update DMP:
pip install --upgrade django-mako-plus
Let me know if you have any bugs with it.
Once you upgrade, all you should have to do is add "DMP_URL_START_INDEX=0" to settings.py. Note that I switched the way the settings.py items are specified, so the tutorial will be a little different than what you already have. You can switch to the new format or use DMP_URL_START_INDEX with the old format.
Conan C. Albrecht, Ph.D.
Information Systems Department
Brigham Young University
Email: [email protected]
Blog: http://goalbrecht.com/
On Apr 15, 2015, at 10:54, Conan Albrecht [email protected] wrote:
Sure. Will do asap. Hopefully in the next couple days.
from django-mako-plus.
You're the man! :) Thanks!
from django-mako-plus.
Related Issues (20)
- Django 1.8.3 support HOT 1
- Django 1.9 Support HOT 2
- "dmp_startapp" changed to just "startapp" HOT 2
- dmp_startapp breaks with django v 1.10 HOT 2
- Make `dmp_render()` take `content_type` and `status` args like Django `render()` HOT 2
- Is there a way to use DMP without the dmp router? HOT 2
- User Set Database Variables HOT 1
- wrong reference is folder readme files
- adding/linking custom/3rdparty css/js files to template HOT 1
- Django 2.0 - ImportError: cannot import name 'RegexURLPattern' HOT 2
- Issues with dmp not finding *.jsm file HOT 3
- Django @csrf_exempt doesn't work HOT 2
- "apps aren't loaded yet" exception on clean install, using installation instruction from docs. HOT 4
- Broken link to default app and page HOT 1
- Templating System doesn't play nice with projects like social-auth-app-django HOT 2
- dmp_collectstatic creates empty static folder HOT 1
- login_required decorator no longer working
- Unable to use Django Syntax Blocks within a Mako template
- Django 4.x Support HOT 1
- Werkzeug debugger broken HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-mako-plus.