Starting on Frappe

Hi ALL,

Thanks for this wonderful Python + JavaScript framework.

I came from .NET and Java with PostgreSQL background.

Recently, have some projects which I want to learn and apply Python + JavaScript skills.

I have gone through guides and I wish there is a book for the development using Frappe.

There are a few questions I want to know the possibility on Frappe usage. I will build an app using Frappe framework for a small project.

  1. I need a form with input components, user want to save for later reference it’s up to them. But there are some buttons on screen to insert new rows into another table in database. Might be 1 button insert few rows of data into few tables. Is it possible (or easy) to add a few buttons and write the codes inside click event?

  2. There are some form produce text file in raw or .csv format after 1 click on a button. The text file data mostly came from database table and some calculation. Is it possible or easy?

  3. Produced file will have record in a table, my user will get the list of produced files, select it and click a button to download the text file. Is it possible or easy?

My reason to ask above question is because I know how to do that using Python programming. Since I am going to start using Frappe, may be there are ways or built in to avoid hardcore programming or reinvent the wheels. Before this, I used Compiere, ADempiere and iDempiere for developments.

By the way, I tried on easy setup script 4 months ago and it stopped half way installation on database setup. I am using VirtualBox with CentOS basic server. Will try again on new setup script…

@AdamTang thanks for your kind words!

place to get started https://frappe.io/docs

All questions should be easily possible. I suggest you go through the Library Creation example first and things will become much clearer.

best,
Rushabh

Hi rmehta,

While the easy script are commencing, some issues pop up.

  1. cannot install wkhtmltopdf, skipping…
  2. setup_frappe.sh: line 302 hash: pip-2.7:not found

This time at least sql db setup is succeed, but above 2 issues are not.

Also, the login screen is kind of messy…

You can ignore the two messages.
Also, check nginx logs to see why the images, JS ans CSS are not loading.

Hi pdvyas,

Today the pip-2.7 not found issue no more. May be someone fixed the script.

Also, the setup script has a very small typo error. https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

install_wkhtmltopdf_centos () {

if [[ $OS == “centos” && $OS_VER == “7” && $T_ARCH=“i386” ]]; then

the wkhtmltox is nicely installed after i change the if statement into

if [[ $OS == “centos” && $OS_VER == “7” && $T_ARCH == “i386” ]]; then

below are the successful setup screen shot, hope this help.

Yes, I suppressed the error and your fix to the if condition looks good. Please send a pull request for the ==

After installation, I can’t connect using web browser from the client pc.

I have done steps below to be able to connect

  1. firewall-cmd --zone=public --add-port=80/tcp --permanent
  2. nano /etc/selinux/config
    a. change SELINUX=enforcing to SELINUX=disabled
  3. restart centos 7

I have 1 doubt, all until now, I am using root user. I notice that setup script create an user called frappe.

Do I have to create an user eg. myerpnext, login as myerpnext and do the installation?
If I have to create an user eg. myerpnext, do I need to set it as admin? or just plain normal user?

Hi Adam,

Thanks, I’ve to add these steps to the script!

Yes, it creates a user called frappe. If you run a bench command as root it changes to frappe automatically, but it you login as frappe to run the command, that’d be great!

Hi pdvyas,

I have changed the step one
from firewall-cmd --zone=public --add-port=http/tcp --permanent
to firewall-cmd --zone=public --add-port=80/tcp --permanent

for easy understanding.

Then when new user doing multitenant testing, all they need is an extra command eg. firewall-cmd --zone=public --add-port=82/tcp --permanent

My suggestion is those security concern command such as ports or SELINUX are not so good to be included inside setup script as users’ servers might have certain policy or whatsoever. :smile:

In addition, multitenant through ports are tested. Super nice. DSN multitenancy not yet tested until i have my own rented hosting server :sunny:

Thanks. The setup script is awesome. Now, I can start to explore ERPNext or Frappe.

Thanks!

The policy I’ve gathered is here https://github.com/frappe/bench/issues/79

I really don’t think that it should be bench’s job to set the firewall. Sysadmins who have restrictive firewall setup should open up ports themselves.

Hi pdvyas,

Agreed. Firewall and SELinux should be configured / opened by Server Administrator.

Frappe framework is awesome and I am lucky to have it while learning python.

1 Like