Ember Blueprint skip confirmation - ember.js

I use the ember blueprint.Install(options) method to create files based on blueprint, but this causes overwrite questions for existing and not identical files. I allways want to skip that kind of questions, is that possible?
Is it maybe possible to override a public method from blueprint.js somehow?

That is currently (ember-cli#2.15) not possible. Ember CLI will always ask the user if he really wants to overwrite files unless the new file is identical to the old file.

Related

Where i should put data managers

What is good practice for put data persisters in one place. For now i put model.save() in every controller when i save this object. But i think it is not good resolve, because it can make code duplicates.
I found in ember we have services https://guides.emberjs.com/v2.8.0/applications/services/, but according documentation it is place for not use data store.
My question is what is best practice for not duplicate data persist code?
Have you tried extending some base controller or maybe extending controllers with a mixin containing the actions and the logic? I think mixins would be the way to go for that.

How to customized the model of installed app in Django?

Right now I was using django_comments_xtd in my site, but I wanna make modifications to the models.py of the installed app django_comments_xtd, make it customized. I just don't know how. I knew I may use something like subclass, but there is a lot of connections in those classes in the models.py, I just wanna overwrite one of them, so how should I do this?
Unfortunately, using subclasses would be the best scenario in this case. Also you could get a local copy of that app and put it in your project files and edit the source directly. I've had to do this on occasion.
Hopefully that helps!

local fields list not overriding correctly in Django-piston

Has anyone experience issues with this but in Django-piston that doesn't allow you to override fields already set?
https://bitbucket.org/jespern/django-piston/issue/192/object-handler-fields-override-local-field
Can anyone help me with a work around? I saw there is an easy patch but I don't want to go in and change the code in piston. Is there a way around it?
I'm using django-piston for quite a long time. There are a couple of issues with when you specify model = Foo. I simply use it to organize web service's urls, OAuth and Django Authentication. I still dont have any issue with it (yet). If you dont have any special reason to use model = Foo and fields I think you can call the model within read and create.
Hope it help :)
If you dont want to apply the patch yourself, and you dont want to avoid using certain model references on handlers to work around the issue, then maybe just clone the fork of piston that contains the patch being pushed to the main repo:
https://bitbucket.org/rptirrell/django-piston/overview
Its up to date aside from that and its trivial to swap it out to the main repo whenever you want.

Using the Coldbox framework, is there a way to intercept a renderView call and execute a different template?

I am trying to learn Coldbox to perhaps replace the current framework I am using. One of the features that I currently use is the ability to override any of the template inclusions by convention.
Essentially, lets say I have a view, "views/home.cfm"
<h1>I am the default theme</h1>
and that is all well and good. But lets say that I have a different view, "themes/[theme-name]/views/home.cfm"
<h1>I am the user chosen theme</h1>
that I want to include conditionally (say there is a cookie to determine what theme is in use). Also, if the file does not exist, the default/fallback view should be rendered.
Is there any way of doing this overriding the system functions?
I looked at interceptors, and the preViewRender and postViewRender interceptors seem like the place to do something like this, but there doesn't seem to be any way of manipulating the actual workflow. If seems to be mainly pre/post processing of the content. For instance, there doesn't seem to be a way to "return false" to tell the renderView method to not actually render the view. Or any way to affect the location in which the view is to be found.
Any ideas?
Tyler,
The ColdBox Framework is quite flexible. It is possible to do what you desire but I don't think modifying renderView() is the best way to resolve this--although, you most definitely can.
I would encourage you to create a User Defined Function in the /includes/helpers/ApplicationHelper.cfm file that contains the logic you require. The functions that are added to this helper file are accessible from anywhere in the framework. This would allow you to create a function called "renderSkin()" that contains the logic you need. RenderSkin() would ultimitly call "renderView()" when you finally figured out which template you wanted to render for that user.
Respectfully,
Aaron Greenlee
I would suggest you go with the interceptor route, but change the layout instead of the view.
From the postEvent interceptor you can get the processedEvent key from the interceptData to change the layout.
Otherwise you could just make the check part of the layout page. The layout can the be a switch statement (or a more OO approach) $including the themed layout files as needed. This has the advantage of giving you a chance to emit custom interception points and having common functionality (css, js)

eZ Publish template creation

I'm trying to add a new template (.tpl) file to an existing design for a company. It is fairly basic:
* New page with iFrame that can be controlled from admin.
* Add new CSS to the new file that will either overwrite existing CSS or add to template.
I have tried to find reference to where I should place such a template and how to add it to an existing design, and the only reference I find is how to make a new design. In addition I cannot fully (or at all) understand the catalogue structure.
As I see it I should add a new extension. Anybody have some pointers that are step by step regarding this issue?
Not to mention - is this the right place to ask for this?
You will get a much better traction on the eZ Publish Community Portal, there : http://share.ez.no . Ask your question in the forums : http://share.ez.no/forums
See you there,
Cheers,
I guess you could create an object of the class "Link" in your admin. The link url would be the url of your iframe. Then, in your design folder, in override/templates folder, you could create an iframe.tpl file, and tell in override.ini.append.php you want to override the node/view/full.tpl template, normally used to view a node, with your iframe.tpl, only for that Link node you would have created.