Can't find .py files for new doctypes - doctype

Complete newbie here. Built a new site and a new app. Installed the new app. Want to add a custom script, but can't find the ".py" files for the doctypes I created.
The "Custom?" checkbox is left checked and greyed out.
I am logged in as an administrator and I set the site developer_mode config to 1.
(I know I can add custom scripts from the gui, but still, it's sometimes more convenient to work on my own IDE).
Basicaly I want to create a table as a child ("Reciepe") of a doctype ("Dishes"). The table should have a data field (quantity) and a select field (raw_material). I want to populate the raw_material with var_name field from another doctype ("Raw Materials", which also has their prices, thus allowing me to calculate the cost of each dish).

Inside the sites directory, there will be site_config.json file. Ensure developer_mode is present in that file.
$ cat sites/dev.localhost/site_config.json
Clear the cache b running
$ bench clear-cache
After that, go to Browser console and verify developer_mode, user.
If these 2 values are shown correctly in browser console, then Custom? will be unchecked and .py files will be generated.

I followed the tutorial and created the app "library_management". The py-files were created here:
/home/myuser/frappe-bench/apps/library_management/library_management/library_management/doctype

Related

how to create multiplatform file browser in ionic

I need help. I'm trying to create a multiplatform mobile application. One of the functionalities is a local file browser that will allow user to select a directory and create a list of file in this directory. I've already spent couple of hours on that issue and I can not find any solution for that.
I've checked http://ngcordova.com/docs/plugins/file/
But if I understand it correctly it is used when I already have a file, it not allows user to pick the directory.
I don't need anything fancy, it should as simple as possible
The Cordova FileSystem plugin (and ngCordova's wrapper) provide the ability the read directories from the file system. They do not provide any UI, so you would use the plugin to ask for a list of directories and then render it as you see fit. (A UL, a table, whatever.) To "browse" you could use a click handler on the list of directories such that when clicked, you then get the files/subdirectories of that folder. Again, the FS plugin adds support for doing that.

Magento how do I override/alter template/payment/form/purchaseorder.phtml file

I need to add some text to this file [template/payment/form/purchaseorder.phtml], for a particular store within clients' magento site. When I make a change to the purchaseorder.phtml file, it changes the text on all the stores. So I need to somehow customize this for one store in particular.
I have read comments on several sites, some mention changing the local.xml, change the config.xml, make changes in admin panel, but this such a small change, I don't want to disrupt anything by going overboard.
I need to extend the functionality on the backend so this change can be made for a particular store or stores. the sites has five stores built into the one install and for now I need to make the above change to just one store.
I think I need to somehow add a PO field Heading and an "Additional Text" option to the Purchase order section in image two. is this correct, if so how do I do this?
Could someone point me in the right direction to making this type of change please.
Note: I can't do the create directory structure, copy files, change needed files option
This is magento 1.7
Copy purchaseorder.phtml file from base/default directory then paste it in your current template. Now you can alter content of it purchaseorder.phtml in your current directory, it wont affect the base file.Like below,
Copy from
app/design/frontend/base/default/template/payment/form/purchaseorder.phtml
Paste to
app/design/frontend/base/current_theme/template/payment/form/purchaseorder.phtml
When you override a section, the folder structure should resemble the default template folder structure like current_theme/template/form/ payment/purchaseorder.phtml .
sorry for bad english.

How to create project templates in Xcode 4

Its really hard to find a tutorial to do this as most information relates to Xcode 3. Answer below may help some people.
I sourced most of my information for the answer below from the following sites:
http://meandmark.com/blog/2011/12/creating-custom-xcode-4-project-templates/
http://www.bobmccune.com/2012/03/04/creating-custom-xcode-4-file-templates/
I spent hours searching the web to find information about doing this. Its not actually that hard to set up project templates for Xcode4.5 but its hard to find information on the web that puts it all together! Hopefully the steps below will help you to create your own.
Setting Up
Lets start by getting a copy of an existing Xcode project template to use as a base. Open finder, go to Applications and right click on Xcode to show package contents. Navigate to Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/Application/
[EDIT]
In Xcode 5 the PATH is as follows: ~/Library/Developer/Xcode/Templates/Application/Project Templates. If Templates/Application/Project Templates not exists you should create it too. Credit to seufagner in the comments below for the update although I have not tried this myself.
[/EDIT]
Copy (do not cut/paste!) one of the listed templates.
Open another finder window and navigate to the following directory (to unhide your Library folder type this cmd in terminal: chflags nohidden ~/Library/ or select press the alt/option key when clicking on Finder/Go) /Library/Developer/Xcode/Templates (you may need to create this folder if not already present) /Project Templates/
Create a folder in here. Call it whatever you wish, a suggestion is your company name. This name appears in the left hand menu of the new project dialogue in Xcode. e.g. in the attached image I've called mine Appscore, there's another one there for cocoas2d.
Paste the project template in here and change its folder name to whatever you wish e.g. MySuperProjectTemplate.xctemplate. We are not done yet though as we need to change the template's identifier. Otherwise it will not appear in the Xcode new project dialogue window.
Open the TemplateInfo.plist file in TextEdit. Search for the Identifier key. You should see a string value something similar to "com.apple.dt.unit.XXXXXX". Replace this with whatever you wish as long as its unique. I again suggest adding your company name and a name that describes the template.
If you now open Xcode you should see the project template appearing under your company name in the new project dialogue.
Customising
At the moment you have a copy of an existing project template which is not very useful. I'm guessing you have a number of classes that get reused in nearly all your projects? How about we include them into this template?
Copy the files you wish, and paste them into your new project template i.e. navigate to /Library/Developer/Xcode/Templates/Project Templates//MySuperProjectTemplate.xctemplate/
Open the TemplateInfo.plist file in TextEdit again. First thing we have to do is tell the project template to include the new files so search for a key called "Nodes" that has an array of values. Add the two following lines:
<string>_VARIABLE_classPrefix:identifier_.h</string>
<string>_VARIABLE_classPrefix:identifier_.m</string>
For example if your controller was called BaseViewController the lines would look like:
<string>___VARIABLE_classPrefix:identifier___BaseViewController.h</string> <string>___VARIABLE_classPrefix:identifier___BaseViewController.m</string>
Next find the Definitions key and you should see a dictionary as its value. In here we have to add a reference to the included files. Create a new key and call it ___VARIABLE_classPrefix:identifier___BaseViewController.h (again taking the BaseViewController as an example).
The value of this key is again a dictionary. It contains a key called Path and a string value which is the name of the file e.g. BaseViewController.h
I've attached the following images to show what I mean as I think my description is falling short. You may notice that there is a key in there called "Group", this as you can guess allows you to create groups and input files directly :D
Hope this is actually useful to someone :) Any questions comment below and I'l do my best to answer. I did this a few weeks ago so my memory is a little hazy.
You can also learn a lot from inspecting the existing project templates, which you can find in:
/Xcode.app/Contents/Developer/Library/Xcode/Templates/Project Templates/
for Mac and
/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates/Project Templates/
for iOS.
There are few sample templates also on GitHub by Reid Main and another one by Acani. There are also AFNetworking templates, created by Mattt Thompson. See all the examples, including ones built by Apple and then you can start creating your own.
A good overview of all of the variables used in the plist file can be found here: https://gist.github.com/shazron/943736
#bennythemink
Your answer is really very much help full but I want to add some more things in your answer.
When we copy xcode predefine template than this key contains
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.storyboardApplication</string>
</array>
this value. When we use this key value in Custom template of xcode it will create AppDelegate class by default. Which we can not move to folder only we can shift it into group.
So i suggest to add this:
<key>Ancestors</key>
<array>
<string>com.apple.dt.unit.objectiveCApplication</string>
<string>com.apple.dt.unit.iPhoneBase</string>
<string>com.apple.dt.unit.prefixable</string>
</array>
value in Custom template so that we will have fully empty template in which we can do any custom stuff.

TYPO3 won't update front-end page after external TypoScript modification

I am trying to edit a .ts file through the Quixplorer.
I click on edit, add the link and hit save. But it does not get updated on the actual page.
When I click a preview of the file within the Quixplorer i can see my change but it just won't show on the homepage...
Any ideas?
While editing *.ts files it is always required to clear whole cache from the backend, to take changes into account.
Also make sure, that you're modifying correct file. The often mistake is editing files which aren't included to the DB TS template. You can verify that with the Template module (after cache clearing).

Trying to get along with Interwoven

I am to create a new design (CSS & HTML) for a web site which is created using Interwoven ContentCenter Professional.
Now, I can see the existing files in CMS (Interwoven) but, I can't make changes. My changes are displayed only when I'm in edit mode. Nothing in the live page. I tried to submit, create editions of files but still no good.
How should I create or edit pages in Interwoven CMS?
Thanks.
If you're talking about generic pages, then once you are finished you have to click on the Generate option, then choose a directory and click Finish. Last thing you should do is to choose yeswhen it asks you to Re-generate the page.
What you are trying to do is just creating a new file, not generating a file from TeamSite's Formpublisher. It is just like if you are in Windows Explorer and creating a new file. In order to generate a file from a form entry, you need to be in the templatedata directory, ex: /default/main/branch1/WORKAREA/wa1/templatedata/category/type(on unix) or Y:/default/main/branch1/WORKAREA/wa1/templatedata/category/type (on Windows). There should be a file call datacapture.cfg there. There is another directory called data under the above path which stores your data content record (dcr) that are created from the form. This is the file that you can use to generate which will use the (tpl) file under the presentation directory.