Scaffolding mechanism for generating views from doctypes

Hi,

The initial impression that I got from looking at the docs and going through the application in general is that the [DocType].py file, and the [DocType].js file are roughly analogous to the model and view of a standard MVC application. Though this analogy may not reflect the actual structure of the application, I was wondering if there was some scaffolding mechanism in place to generate basic views from a provided model, enabling CRUD operations to start with.

If this is not the case, could you please explain very briefly the steps involved in creating all the components for a  new DocType from scratch, which would let me view and persist instances of it into the database?

Thanks,
Aditya



You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/ltBb4gSN80gJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Aditya,

Actually the .js and .py files contain event handler that would form the Controller in an MVC analogy. The .txt fields contains the model from which automatic Form, List and Report views are generated.

To start a new DocType, just set developer_mode = 1 in the conf.py file and create a new DocType from the UI. It will create the appropriate .txt and also create the scaffolding for the .py file. The .js file is optional.

best,
Rushabh


On Tue, Feb 5, 2013 at 3:12 PM, Aditya Mukhopadhyay <Ad...@gocoop.com> wrote:
Hi,
The initial impression that I got from looking at the docs and going through the application in general is that the [DocType].py file, and the [DocType].js file are roughly analogous to the model and view of a standard MVC application. Though this analogy may not reflect the actual structure of the application, I was wondering if there was some scaffolding mechanism in place to generate basic views from a provided model, enabling CRUD operations to start with.

If this is not the case, could you please explain very briefly the steps involved in creating all the components for a new DocType from scratch, which would let me view and persist instances of it into the database?

Thanks,
Aditya



You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/ltBb4gSN80gJ.

For more options, visit https://groups.google.com/groups/opt_out.














You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.