I may not be understanding something obvious, but I'm struggling to add a (top-level) menu item to my Wagtail based menu that hooks to a page rendered by an included app that doesn't know about Wagtail. Ideally, it is just a normal Django TemplateView with standard urlconf, though I may need to add some custom code.
If I use the custom URL in the menu editor, I get a not found from Wagtails core.serve. I've looked at snippets, wagtail hooks, RoutablePageMixin, and the custom URL in the menu editor and none seem like it accomplishes what I'm trying to do.
It may well be that I'm simply misunderstanding the docs, but is there a simple example of someone doing this? The closest I've found so far is https://www.caktusgroup.com/blog/2016/02/15/wagtail-2-steps-adding-pages-outside-cms/. I've also searched https://docs.wagtail.io/en/v2.4/advanced_topics/third_party_tutorials.html to now avail. Any guidance appreciated.
Thx,
--Don
Hope this is useful, but it seems that my problem was not the mixing of Wagtail and non-Wagtail items - it was in my URLConf - Wagtail.core.serve occurred before the Django url I was trying to reach and was trying to respond. Once I reordered the URLConf appropriately, I am getting the view as I wanted.
Sigh...
Related
Im currently looking into the MURA cms. and while it looks quite nice. I cant seem to alter something that appears to be quite trivial on other platforms.
Im simply wanting to know the location of where the base login form template resides whether it be in a JS file or as a simple .cfm template.
Any ideas greatly apprecated
thanks in advance
You can overwrite/customise the display object that renders the login form.
Take a look at the following documentation on how to:
http://docs.getmura.com/v6/front-end/customizations-staying-on-the-upgrade-path/customizing-display-objects/
And this is the file you want to modify:
https://github.com/blueriver/MuraCMS/blob/develop/default/includes/display_objects/dsp_login.cfm
I'm having issues getting the modern theme to work with django-tinymce. Both the simple and the advanced themes render correctly, but when I switch to the modern theme nothing renders and I get a 404 error for /static/tiny_mce/themes/modern/editor_template.js in the console
I am attempting to do all of this in the django admin. The error is coming from /static/tiny_mce/tiny_mce.js which is interesting because I don't have anything installed in that directory. I'm using /static/js/tinymce as my TINYMCE_JS_ROOT in settings.py. When switching between simple and advanced theme, everything works correctly.
I've tried to copy a version of editor_template.js in the exact location it's looking, but I still get the 404. It's like it wipes out /static/tiny_mce if it exists and replaces it with something, but I can't figure out how/where it's getting that from.
I'm using an install of TinyMCE 4.1.3 from http://www.tinymce.com/download/download.php and django 1.6.5
I've been struggling with TinyMCE recently, as well. I'm using TinyMCE v4 and Django 1.6. I went down the django-tinymce/django-flatpages-tinymce route because I had these working on another project. Some how it wasn't working for this new project. I did some research and decided to just go straight TinyMCE, no Django applications (eg, no django-tinymce or django-flatpages-tinymce).
This method cuts down on all configuration in Django, and it can be completely handled within the tinymce.init call. I found this much easier than dealing with Django's settings files, overriding models, etc. Just simply find the template you want TinyMCE to spice up and add the init call there.
The example here for full featured example really helped me:
http://www.tinymce.com/tryit/full.php
This use the modern theme...
I simply added this to whichever change_form.html template for whatever model I was needing the rich editor. For instance for flatpages:
admin/flatpages/flatpage/change_form.html
Or custom model in app:
admin/custom_app/model_name/change_form.html
I know this is exactly an answer to your question, but I think it's worth thinking about and might help you ultimately get what you need.
Also, I should note, it looks like only modern theme is available for TinyMCE v4:
http://www.tinymce.com/wiki.php/Tutorial:Migration_guide_from_3.x
I am beginner to joomla, currently using version 2.5. I have came across a problem with pagination. In my site pagination on all the pages were working well, but suddenly, I don't see any pagination for any page. I don't realized, what setting from admin panel I have changed. I have checked the settings from the Article Manger->options->Shared Options, but all are ok.
Is there any other settings in admin panel to show pagination?
Any help appreciated.
Thanks.
You must seach this in Article Manger->options->"First Tab"
But it can be also placed in the main menu item: Menu->MainMenu->"First item" general settings...
I have realize the problem, when I put <jdoc:include type="module" name="cblogin" /> in my template file, then all the pagination links get disappeared. I have also checked with putting below code -
jimport('joomla.application.module.helper');
$mods = JModuleHelper::getModules('cblogin');
echo JModuleHelper::renderModule($mods[0]);
but, nothing has changed. Is there any other solution to load module into html code?
If you want to add modules to articles, one way is to add a custom position to the article then assign the module to that position. In the article editor add this code
[loadposition myNewPosition]
Then you can assign any module to myNewPosition on the position option. Make sure the module is assigned to all pages.
I want to implement a report section in Django admin. This would mean adding a custom section in the admin homepage where instead of a list of models I would see a list of reports. I want to use Django's admin tables with filters, sorting, everything if possible.
What would be the "best" way of achieving this? I realize this is a "big" question so I'm not asking for code snippets necessarily, a summary of needed actions would be just fine :)
P.S. Be report I mean a "made up" model by custom queries (queryset or how it's called).
P.S.2 Maybe this question should be something like: How to use Django admin tables functionality in own admin view?
P.S.3 Or maybe there is a way of providing to the existing admin interface my own data. This way I don't have to do anything else. I just want to say instead of a model take this data and display it in a nice table which I can sort, filter etc etc.
So you are attempting to add in new pages into the django admin.
This section explains to you exactly how you can do so - https://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-views-to-admin-sites
The basic idea is to add in new urls that you want in your urls.py as if you are adding urls for your "front end" pages. The key difference is that these new urls you are adding should start with ^admin/ and would look something like ^admin/my_special_link_in_admin and this url will point to your own custom view function at a location you so prefer.
E.g.
(r'^admin/my_special_link_in_admin/$', 'my_custom_admin_app.views.special_admin_page'),
So this is the way for complete customization. There's a very good tutorial which I refer to here - http://brandonkonkle.com/blog/2010/oct/4/django-admin-customization-examples/
In addition, if you don't want to do too much work, consider using Django Admin Plus - https://github.com/jsocol/django-adminplus
Or a django-admin-views - https://github.com/frankwiles/django-admin-views
I have just deployed a django site, and upon changing the value my DEBUG variable to 'False' causes my admin page links to change from active links to simple text.
An attempt to go directly to what I know should be the URL causes a 'TemplateDoesNotExist'.
I am sure it's not a permissions issue with Apache, I feel it is something to do with my admin configuration though I have no idea what.
I figured it out. Here is a reference for anyone else who might find themselves with this problem.
I was using what must be a deprecated method of defining my Admin models - I put them all in models.py, instead of creating a separate admin.py file for each application.
When learning django, there are plenty of tutorials floating around that recommend or give examples that use this method. Apparently this is no longer a good idea (at least not as of Django 1.4). It could probably be wrangled into working with some template hacking, but it is is probably cleaner and definitely simpler to just follow the latest conventions and create the admin.py file.
I thought I was saving time by just cramming it all into one file "for now" but without some of the magical debug-only template loading, this solution failed.
Hope this saves someone some frustration!
I know this question's been already solved.
But in my case, coming from django 1.7 to a server that runs django 1.6, I had to add
admin.auto_discover()
to my urls.py.
Well, I had added this line to the end of urls.py and django admin was all characters !
Moving it to top up the file, above definition of urlpatterns, fixed the issue.
Hope this helps :)