I'm currently working on a singe page app in django that makes use of Polymer Elements. My problem is when I'm changing template views.
When I click on a page link to direct me to a new view I want to use the app-route, app-location and the iron-pages elements that Polymer has. This lets me simply change my current views without actually having to reload the whole page again and make requests. Apparently, in Django, whenever I click on a link it instead goes to the urls.py and tries to direct me to that link. Is it possible to create single page apps in django with polymer?
Related
I am trying to develop a website where I can see the homepage as it is from Django admin panel. The reason I want that is I want to edit the name of the static content like 'Home' to 'All' along with the change of slide show picture. In summary, I want to change the website layout from Django admin panel that is not accessible to users. Is that possible? I just want an idea of how to implement the process.
Static texts you can change in admin panel with different modules:
for example django-rosetta or my own library Django-tof. https://github.com/wP-soft-GmbH/django-tof
But in your case, i think, you want to made something more.
For this case you can use django-flat-pages, already included in Django, if you have a static web-page.
you can edit every element on the page and after save, you can see it on the front.
if you really want to change the django templates, which you use in your views, you can create a simple template editor in the admin panel based on a widget like django-Ckeditor.
I have an existing Django app. What is the best way to add new pages to it through the admin page, without actually coding every time. I want to add static pages, with URLs through the admin page.
Add new page with new URLs
Add through admin page, not through coding every time. One time code to handle this.
Is there a way out?
I'm not really sure what to share (i.e. which part of my application code) as I'm still a beginner with React so please bear with me.
I have a React application running on top of a Django application. Basically, there are Django Admin Panel URLS, REST API URLS in Django, and one path to catch all paths that don't belong to the first two groups.
I have a page (or a React Container) that calls Django's REST API to query all entries in the users DB Table. This part is okay but what I've noticed is, everytime I manually delete a row in the Django Admin Panel, the whole page refreshes. What are possible reasons for this?
By the way, I'm using Redux as well to manage the whole application state.
I've done some example apps in Ember, and now I'm ready for using it in existing application. Its traditional web application (request-response, full reload and some ajax loaded content, no rest/api things)
So lets assume I've few page (urls) like
1 abc.com/home.php
2. abc.com/support.php ,
3. abc.com/support.php?call=meeting
and so on..
so is it possible to use just one url with ember app and rest leave as such untill its ready?
PS: I did try for support.php as this.route("support",{path:"/support.php"}) and have SupportController and support.hbs template but its not working. I'm not sure how to put it in jsfiddle.
Thanks
Include your ember app only on the page that needs it, so only on abc.com/support.php
As far as ember can see, when you go to abc.com/support.php you are on the index page (of the ember app), and you will need to use the index.hbs tempate.
If I already have a blog app done with Django and I want to use it with my new Django CMS site, is it okay to simply drop it into my new Django CMS project as a decoupled app and match anything /blog/ to the blog app as apposed to a Django CMS plugin? I guess what I need to know is when is it best to write my Django app as a plugin vs an entire app?
Thx
JeffC
Yes, but you don't just drop it into the urls.py, instead you can write an AppHook to tie your blog's URL scheme to a particular page in your CMS.
Plugins on the other hand are useful if you want to inserts particular aspects of you app into other page's placeholders - for example to show your latest 3 posts on the frontpage.
You might also want to include your blog's paths in a breadcrumb or menu on your site - in that case you need to write a custom Menu too.
Finally, it might also be useful to make use of django cms's placeholders in you blog model. His would allow you to post a variety of content via plugins.