Code Monkey home page Code Monkey logo

jam-py's Introduction

Package on PyPI Supported Python Versions Documentation Status Build Status (Travis CI)

Jam.py Application Builder (web framework)

From an idea of a web database application to a live website in no time, for free

Click on the image to see the online demo

Online demo

If you are not a professional programmer or an expert in databases, you can use Jam.py to store, share and analyze your data.

Please watch these videos to see how easy it is to create and setup Jam.py applications.

If you are a professional, you can use Jam.py to create various tools, dashboards, as well as large-scale business applications with complex internal logic. Please watch the Jam.py framework applications video to see some applications written in Jam.py.

More demos on PythonAnywhere:

Jam.py alternative site:

Main features

Jam.py is an object oriented, event driven framework with hierarchical structure, modular design and very tight DB/GUI coupling. The server side of Jam.py is written in Python, the client utilizes JavaScript, jQuery and Bootstrap.

  • Simple, clear and efficient IDE. The development takes place in the Application builder, an application written completely in Jam.py.
  • “All in the browser” framework. With Jam.py, all you need are two pages in the browser, one for the project, the other for the Application builder. Make changes in the Application builder, go to the project, refresh the page, and see the results.
  • Supports SQLite, PostgreSQL, MySQL, Firebird, MSSQL and Oracle databases. The concept of the framework allows you to migrate from one database to another without changing the project.
  • Authentication, authorization, session management, roles and permissions.
  • Automatic creation and modification of database tables and SQL queries generation.
  • Data-aware controls.
  • Open framework. You can use any Javascript/Python libraries.
  • Rich, informative reports. Band-oriented report generation based on LibreOffice templates.
  • Charts. You can use free jsCharts library or any javascript charting library to create charts to represent and analyze your application data.
  • Allows to save audit trail/change history made by users
  • Predefined css themes.
  • Develop and test locally update remotely. Jam.py has Export and Import utilities that allow developer to store all metadata (database structures, project parameters and code) in a file that can be loaded by another application to apply all the changes.

Documentation

All documentation is in the "docs" directory and online at http://jam-py.com/docs/.

Please visit http://jam-py.com/docs/intro/install.html for Python and framework installation or http://jam-py.com/docs/intro/new_project.html how to create a new project.

For general discussion, ideas or similar, please visit mailgroup https://groups.google.com/g/jam-py or FB page https://www.facebook.com/groups/jam.py/

Demo application: http://demo.jam-py.com/

License

Jam.py is licensed under the BSD License.

Author

Andrew Yushev

See also the list of contributors who participated in this project.

jam-py's People

Contributors

caccia86 avatar crnikaurin avatar cschreib avatar ghostik2005 avatar jam-py avatar juanjosepablos avatar maxmorais avatar pintman avatar platipusica avatar pubmania avatar rogerm4242 avatar wareld avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jam-py's Issues

Testing the email functionality with localhost and SQL logging, v.4.0.78 onwards

Ok,

it is possible to send email with no google account, ie to your localhost with installed jam-py and postfix (and postfix might have a relayhost configured, but that is out of scope here).

Only this is needed ie for send_mail in Demo:


def send_email(item, customers, subject, mess):
    cust = item.task.customers.copy()
    cust.set_where(id__in=customers)
    cust.open()
    to = []
    for c in cust:
        to.append(c.email.value)
   
    gmail_user = 'some_email:)'

    message = 'From: %s\nTo: %s\nSubject: %s\n\n%s' % (gmail_user, ", ".join(to), subject, mess)    
    server = smtplib.SMTP("localhost")
    server.sendmail(gmail_user, to, message)
    server.close()

Cheers

Dean

How to detach jam.js from layout?

Hi, I really like your work. The python backend is sweet and data interaction JS is well structured. I would like to use it for a project I'm working on; but reading jam.js file I noticed is tightly bound with tables, forms & fields.

What I would like to do, is use my own template (JS code + html) to make view/edit forms, remove bootstrap-modal, replace bootstrap with a new one and use "Details" data to make custom tables and lists rendered with my template.

How should I approach this with Jam.Py?

Oracle working ok with 1.3.54 (jam.py-4.0.48)

This is to confirm that jam.py-4.0.48 is working well with Oracle XE:

Import: reading data
Import: checking data integrity
Import: analyzing changes
CREATE TABLE "DEMO_CUSTOMERS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"FIRSTNAME" VARCHAR2(40),
"LASTNAME" VARCHAR2(20),
"COMPANY" VARCHAR2(80),
"ADDRESS" VARCHAR2(70),
"CITY" VARCHAR2(40),
"STATE" VARCHAR2(40),
"COUNTRY" VARCHAR2(40),
"POSTALCODE" VARCHAR2(40),
"PHONE" VARCHAR2(24),
"FAX" VARCHAR2(24),
"EMAIL" VARCHAR2(60),
"SUPPORT_REP_ID" NUMBER,
CONSTRAINT DEMO_CUSTOMERS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_CUSTOMERS_GEN"
CREATE TABLE "DEMO_INVOICES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"CUSTOMER" NUMBER,
"DATE" DATE,
"SUBTOTAL" DOUBLE PRECISION,
"TAXRATE" DOUBLE PRECISION,
"TAX" DOUBLE PRECISION,
"TOTAL" DOUBLE PRECISION,
CONSTRAINT DEMO_INVOICES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_INVOICES_GEN"
CREATE TABLE "DEMO_TRACKS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(200),
"ALBUM" NUMBER,
"MEDIA_TYPE" NUMBER,
"GENRE" NUMBER,
"COMPOSER" VARCHAR2(220),
"MILLISECONDS" NUMBER,
"BYTES" NUMBER,
"UNITPRICE" DOUBLE PRECISION,
"TRACKS_SOLD" NUMBER,
CONSTRAINT DEMO_TRACKS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_TRACKS_GEN"
CREATE TABLE "DEMO_ALBUMS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"TITLE" VARCHAR2(160),
"ARTIST" NUMBER,
CONSTRAINT DEMO_ALBUMS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_ALBUMS_GEN"
CREATE TABLE "DEMO_ARTISTS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_ARTISTS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_ARTISTS_GEN"
CREATE TABLE "DEMO_GENRES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_GENRES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_GENRES_GEN"
CREATE TABLE "DEMO_MEDIA_TYPES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_MEDIA_TYPES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_MEDIA_TYPES_GEN"
CREATE TABLE "DEMO_INVOICE_TABLE"
(
"ID" NUMBER,
"DELETED" NUMBER,
"MASTER_ID" NUMBER,
"MASTER_REC_ID" NUMBER,
"TRACK" NUMBER,
"QUANTITY" NUMBER,
"UNITPRICE" DOUBLE PRECISION,
"AMOUNT" DOUBLE PRECISION,
"TAX" DOUBLE PRECISION,
"TOTAL" DOUBLE PRECISION,
CONSTRAINT DEMO_INVOICE_TABLE_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_INVOICE_TABLE_GEN"
CREATE INDEX "DEMO_INVOICE_TABLE_IDX" ON "DEMO_INVOICE_TABLE" ("MASTER_ID", "MASTER_REC_ID")
CREATE INDEX "DEMO_INVOICES_IDX" ON "DEMO_INVOICES" ("DELETED", "DATE")
ALTER TABLE DEMO_INVOICES ADD CONSTRAINT FK_DEMO_INVOICES_CUSTOMER FOREIGN KEY (CUSTOMER) REFERENCES DEMO_CUSTOMERS(ID)
Import: waiting for connections to close
Import: applying changes to the database

CREATE TABLE "DEMO_CUSTOMERS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"FIRSTNAME" VARCHAR2(40),
"LASTNAME" VARCHAR2(20),
"COMPANY" VARCHAR2(80),
"ADDRESS" VARCHAR2(70),
"CITY" VARCHAR2(40),
"STATE" VARCHAR2(40),
"COUNTRY" VARCHAR2(40),
"POSTALCODE" VARCHAR2(40),
"PHONE" VARCHAR2(24),
"FAX" VARCHAR2(24),
"EMAIL" VARCHAR2(60),
"SUPPORT_REP_ID" NUMBER,
CONSTRAINT DEMO_CUSTOMERS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_CUSTOMERS_GEN"

CREATE TABLE "DEMO_INVOICES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"CUSTOMER" NUMBER,
"DATE" DATE,
"SUBTOTAL" DOUBLE PRECISION,
"TAXRATE" DOUBLE PRECISION,
"TAX" DOUBLE PRECISION,
"TOTAL" DOUBLE PRECISION,
CONSTRAINT DEMO_INVOICES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_INVOICES_GEN"

CREATE TABLE "DEMO_TRACKS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(200),
"ALBUM" NUMBER,
"MEDIA_TYPE" NUMBER,
"GENRE" NUMBER,
"COMPOSER" VARCHAR2(220),
"MILLISECONDS" NUMBER,
"BYTES" NUMBER,
"UNITPRICE" DOUBLE PRECISION,
"TRACKS_SOLD" NUMBER,
CONSTRAINT DEMO_TRACKS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_TRACKS_GEN"

CREATE TABLE "DEMO_ALBUMS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"TITLE" VARCHAR2(160),
"ARTIST" NUMBER,
CONSTRAINT DEMO_ALBUMS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_ALBUMS_GEN"

CREATE TABLE "DEMO_ARTISTS"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_ARTISTS_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_ARTISTS_GEN"

CREATE TABLE "DEMO_GENRES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_GENRES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_GENRES_GEN"

CREATE TABLE "DEMO_MEDIA_TYPES"
(
"ID" NUMBER,
"DELETED" NUMBER,
"NAME" VARCHAR2(120),
CONSTRAINT DEMO_MEDIA_TYPES_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_MEDIA_TYPES_GEN"

CREATE TABLE "DEMO_INVOICE_TABLE"
(
"ID" NUMBER,
"DELETED" NUMBER,
"MASTER_ID" NUMBER,
"MASTER_REC_ID" NUMBER,
"TRACK" NUMBER,
"QUANTITY" NUMBER,
"UNITPRICE" DOUBLE PRECISION,
"AMOUNT" DOUBLE PRECISION,
"TAX" DOUBLE PRECISION,
"TOTAL" DOUBLE PRECISION,
CONSTRAINT DEMO_INVOICE_TABLE_PR_INDEX PRIMARY KEY ("ID")
)

CREATE SEQUENCE "DEMO_INVOICE_TABLE_GEN"

CREATE INDEX "DEMO_INVOICE_TABLE_IDX" ON "DEMO_INVOICE_TABLE" ("MASTER_ID", "MASTER_REC_ID")

CREATE INDEX "DEMO_INVOICES_IDX" ON "DEMO_INVOICES" ("DELETED", "DATE")

ALTER TABLE DEMO_INVOICES ADD CONSTRAINT FK_DEMO_INVOICES_CUSTOMER FOREIGN KEY (CUSTOMER) REFERENCES DEMO_CUSTOMERS(ID)
Import: applying changes to admin.sqlite

Import: copying files
Import: deleteing tmp files

The above is a plain import. Still to confirm that Oracle is working with Apache & wsgi.
Cheers!

screenshot from 2017-01-13 21 35 17

Reports on ver 4.0.48

Hi Andrew

thanks for sorting the wsgi problems, looks great now.

I noticed the reports are not working well on this version. Have a look at jam..., created the Invoice today (2017/01/12) and can't set the filter to display it or Report to print it (Customer Purchases, set the Date to 2017/01/12, and customer to Dean).

Looks like the Report is printing into ODS only, pdf, xls or html not working. Not a big deal, just noticing.

Cheers

Dean

wsgi.py and Apache issues

Hi Andrew

I copied ../jam/project/wsgi.py into demo folder and set the Apache as per instructions.

First, I encountered the "OperationalError: attempt to write a readonly database", hence made the sqlite db r/w for apache process and demo folder r/w as well.

However, something is not quite right. You can try to access it from here:
http://jam....

Even if I login, it will log me out straight away. The debug is on, and the Apache error log is showing many of:
[Fri Dec 16 01:13:04.445406 2016] [:error] [pid 1636:tid 139632608016128] 1111111 17
[Fri Dec 16 01:13:22.021127 2016] [:error] [pid 1636:tid 139632599623424] 1111111 4
[Fri Dec 16 01:13:22.022195 2016] [:error] [pid 1636:tid 139632599623424] 1111111 7
.
Fri Dec 16 01:21:18.822937 2016] [:error] [pid 1745:tid 139632713185024] /home/ubuntu/jam.py-4.0.36/jam/third_party/werkzeug/filesystem.py:63: BrokenFilesystemWarning: Detected a misconfigured UNIX filesystem: Will use UTF-8 as filesystem encoding instead of 'ANSI_X3.4-1968'
[Fri Dec 16 01:21:18.822979 2016] [:error] [pid 1745:tid 139632713185024] BrokenFilesystemWarning)

If you like, paste your Public key here and I will give you the access to the server.

Thanks

Dean

Creating jam project in Windows

Hi,

I am using version 4.0.80 on Windows. I created and virtual environment and installed jam.py using pip. I can check this by running python inside the environment and running import jam. But when I try to run jam-project.py then I get the following error:

...Scripts\jam-project.py", line 7, in <module>
    import jam
ImportError: No module named 'jam'

Login to demo

Hi,

Downloaded jam.py, ran the demo, but
What is the login and password for the demo?

Thank you,

Oracle and MSSQL support?

Hi Andrew,
thank you for your effort in building jam-py. I think it is great and found no issues with installation on Linux Mint Cinnamon.
I did compile cx_Oracle for Python with Oracle XE and this is working well. However, I can't figure out how to use Oracle with jam-py.
And suggestion with this?
Thank you and greetings from Perth (AU).
Dean

Import types

When we do import table from exist database rows type doesn't correct.
So we must change it for each string by hand.
When table is small - this is not the problem, but when table - large....

Sharing my first project developed with jam-py:)

Hi Andrew and everyone

I just updated the site with my latest project data developed with jam-py. Still WIP but if anyone is interested, here it is:

... (pls see below).

Over 1 million random records in Suppliers and Parts table, will try to populate other tables in a similar fashion. Also, might move this site to somewhere else so keep an eye on here. The App is read only, but you can search, etc...

Cheers

WSGI config

I would like try with apache wsgi module but i didn't found any config sample. Can you describe in wiki

Edit Invoices Form number of culumns

Hi Andrew
I added two fields for Invoices, Audit (updating with user_info), and Timestamp (last update), as per your suggestion.

Now, when Editing the Invoices, this two fields are showing below Total. Is there any way to make this form showing in three columns, so the Audit and Last Update would on the right from Total?

What I am trying is to have a more complex Form.

Thank you!
screenshot from 2016-07-26 20 30 52

Opening files in text mode causes encoding error in non-Latin (and non-Russian) locales.

See adm_server.py, line 1125 and adm_server.py, lines 2099-2100

The first chunk should be replaced with

    with open(file_name, 'rb') as f:

and the second one with

        with open(file_path, 'rb') as f:
            result['doc'] = to_unicode(f.read(), 'utf-8')

To reproduce the first part:

  1. Needs Windows (my test was with Windows 10, but this probably is the same regardless of version) with any non-Latin (and probably not Russian) regional options. I used Greek.
  2. Start a new project (go to an empty folder and enter jam-project, then py server.py)
  3. Open http://localhost:8080/admin.html, select "English" and press Ok.
  4. The following exception appears.
Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 376, in on_api
    data = self.get_response(item, method, params)
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 405, in get_response
    return self.server_func(item, params[0], params[1])
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 418, in server_func
    result = func(obj, *params)
  File "C:\Program Files\Python36\lib\site-packages\jam\adm_server.py", line 1126, in server_set_project_langage
    data = to_unicode(f.read(), 'utf-8')
  File "C:\Program Files\Python36\lib\encodings\cp1253.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8c in position 10443: character maps to <undefined>

To reproduce the second part:

  1. After creating the application (entering name, database etc.) go to http://localhost:8080/admin.html
  2. Go to Project ➡ Task and select the first Task (with ID 1)
  3. Click on the "index.html" button
  4. The following exception appears:
Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 376, in on_api
    data = self.get_response(item, method, params)
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 405, in get_response
    return self.server_func(item, params[0], params[1])
  File "C:\Program Files\Python36\lib\site-packages\jam\wsgi.py", line 418, in server_func
    result = func(obj, *params)
  File "C:\Program Files\Python36\lib\site-packages\jam\adm_server.py", line 2100, in server_file_info
    result['doc'] = f.read()
  File "C:\Program Files\Python36\lib\encodings\cp1253.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8c in position 10443: character maps to <undefined>

v.4.0.72 Dashboard - not allowed to view

Hi Andrew,

trying to replicate the current 4.0.72 Demo Dashboard on my app and hit the "Dashboard: you are not allowed to view" as Admin.

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/jam.py-4.0.72-py2.7.egg/jam/wsgi.py", line 338, in on_api
data = self.get_response(item, method, params)
File "/usr/local/lib/python2.7/dist-packages/jam.py-4.0.72-py2.7.egg/jam/wsgi.py", line 361, in get_response
return item.select_records(params, safe=True)
File "/usr/local/lib/python2.7/dist-packages/jam.py-4.0.72-py2.7.egg/jam/server_classes.py", line 146, in select_records
raise Exception(self.task.lang['cant_view'] % self.item_caption)

Than I went and checked the Roles, and a lot of roles are duplicated, not sure why would that be. Dashboard is there as expected.

PS
This is somehow related to index.html dashboard-view section, after I added it the problem went away.

Cheers

Dean

New DB module?

Hello,

I am struggling to get the cx_Oracle working with jam-py.
Example:
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import cx_Oracle
con = cx_Oracle.connect('HR/[email protected]/xe')
print con.version
11.2.0.2.0

This is proving that cx is ok.

Than I try an new db module, ie:
.
.
import cx_Oracle

NEED_DATABASE_NAME = True
NEED_LOGIN = True
NEED_PASSWORD = True
NEED_ENCODING = False
NEED_HOST = False
NEED_PORT = False
CAN_CHANGE_TYPE = False
CAN_CHANGE_SIZE = False

def connect(database, user, password): -- this is a problem!
#def connect(database, user, password, host, port, encoding): -- this is a problem as well!

#connection = cx_Oracle.connect(database=database, user=user, password=password, host=host, port=port, encoding=encoding)
connection = cx_Oracle.connect(user,password,database)
cursor = connection.cursor ()

.
.
cursor.close ()
connection.close ()
return connection

Whatever I try with this two examples I can't get it to work. With only db,usr and pass, the jam-py will report:
"connect() takes exactly 3 arguments (6 given)"

If I try with database, user, password, host, port, encoding, jam-py will report:
"maximum recursion depth exceeded"

What do I need to do to pass this point?

Thanks!

Is it possible to plugin a different DB?

1/ How to use MySQL or Postgresql?
It looks like modules are dynamically created through admin?

2/ How to connect to external DB, that is not running on localhost?

name 'buffer' is not defined

I created a catalog, went to the user interfaces, added an entry. The entry appeared, but after reloading the page I'm getting name 'buffer' is not defined:

Traceback (most recent call last):
  File "/home/ubuntu/jampy/lib/python3.5/site-packages/jam/wsgi.py", line 376, in on_api
    data = self.get_response(item, method, params)
  File "/home/ubuntu/jampy/lib/python3.5/site-packages/jam/wsgi.py", line 401, in get_response
    return item.select_records(params, safe=True)
  File "/home/ubuntu/jampy/lib/python3.5/site-packages/jam/server_classes.py", line 163, in select_records
    rows = self.task.execute_select(sqls[0])
  File "/home/ubuntu/jampy/lib/python3.5/site-packages/jam/server_classes.py", line 890, in execute_select
    raise Exception(error)

v4.0.72 weird behaviour with FF on Admin/Groups

Hi there

congrats on ver 72, looks great!

I noticed some weird behaviour with Firefox (51.0.1 Linux, 52.0.2 Win) on Admin/Groups/Catalogs/Etc. When trying to move an item down/up, the scrolling movement is pretty hectic :)

Not a big deal tho.

Cheers

Sending email to localhost

Ok,

it is possible to send email with no google account, ie to your localhost with installed postfix (and posfix might have a relayhost configured, but that is out of scope here).

Only this is needed ie for send_mail in Demo:


def send_email(item, customers, subject, mess):
    cust = item.task.customers.copy()
    cust.set_where(id__in=customers)
    cust.open()
    to = []
    for c in cust:
        to.append(c.email.value)
     
    gmail_user = 'your_user_does_not_need_to_exist:)'

    message = 'From: %s\nTo: %s\nSubject: %s\n\n%s' % (gmail_user, ", ".join(to), subject, mess)    
    server = smtplib.SMTP("localhost")
    server.sendmail(gmail_user, to, message)
    server.close()

Cheers

Search through the table fields?

Hi Andrew,

as I understand the 'default' option will search only through that field in the database. But how to search through multiple fields in the table than? I tried marking more fields with the 'default' but no joy.

Thanks

Is Desktop no longer supported?

According to this issue: #5

You are now making jam.py a web-only CRUD-app builder?

Will we no longer be able to build desktop/GTK apps with it at all?

Row level locking

Hi Andrew,
in Demo appl is there a way to do a row level locking? Can you provide an example of how to do this?

Thank you!

Dean

cx_Oracle and python 3 (placeholder)

Hi all
this is a placeholder for cx_Oracle on Python 3 for upcoming jam-py release . Used Linux Mint 18.2:

sudo apt-get install python3-pip
sudo pip install --upgrade pip
sudo pip install cx_Oracle

It might be beneficial to install a virtual env not to disturb your Desktop or Server install with Python 3. See: https://stackoverflow.com/questions/10763440/how-to-install-python3-version-of-package-via-pip-on-ubuntu
or similar...

If not using local Oracle, the Oracle Client is needed, ie. see: https://gist.github.com/hangtwenty/5671566

After that, test the connection to XE (XE is the ORACLE_SID, HR is the schema) with:
$ORACLE_HOME/bin/sqlplus HR/HR@//host_or_IP:1521/XE

OR with the /etc/tnsnames.ora content:

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = host_or_IP)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

like this:

$ORACLE_HOME/bin/sqlplus HR/HR@XE
SQL*Plus: Release 11.2.0.4.0 Production on Mon Sep 4 13:09:14 2017
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production

Now we can set jam-py to XE as the database.

Cheers

D.

How to aproach this problem with mixed INT and TEXT

Hi Andrew,

for some unknown reason one old Ora app all has this table:

Name Null? Type


xxx NOT NULL VARCHAR2(5)
yyy NOT NULL VARCHAR2(3)
zzz NOT NULL VARCHAR2(5)
NAME NOT NULL VARCHAR2(30)

.
.
After Import jam showed this: Information about 3 index(es) have been added. Information about 0 index(es) could not be added.

Looks like xxx is the PK and yyy, zzz is FK for another tables (which has the similar VARCHAR2 fields and not INT), etc.
But because xxx is a VARCHAR2, the jam is using it as TEXT and I can't change it to INT coz that data is mixed, with a bit of text, numbers, zeros...

I can still use xxx as an FK in other tables and that works, showing a NAME nicely. But, the JS search does not work in a lookup (dynamic search when typing), and I suspect because of TEXT. "Search by" xxx, zzz, etc does work.
Also, the Chart.js doesn't work throwing: ORA-00904: "xxx_LOOKUP": invalid identifier" error. Does Chart work only well with INT?

How do we approach this? Data conversion?

Thanks

Python 3 Support

I am trying out the repo and found out that repo is not supported to run in Python 3.

What is the roadmap ahead keeping in mind that the support for Python 2 will end in 2020.

Automating of Catalogs from existing tables

Hi Andrew,

hope you're well.

Some time ago I think we mentioned something like utility to create Catalogs from existing tables in the database.
Would you have something like this already?
Thanks!

Table issue with removing/adding a field

Hi

I just noticed after removing Quantity (int) from Demo invoice_table and re-adding it, the Quantity is not showing any more.
Steps:
After removal, Demo will show : no such column: DEMO_INVOICE_TABLE.QUANTITY
After adding Quantity again, it is not showing on any forms.

Cheers

Virtual table example or...?

Hi Andrew,

I am a fan of real app examples so sorry if asking to many questions. The idea is to build a few apps and publish it so people can run it and study, built more and share :) Eventually.

So, one question comes to my mind: how to use a virtual table? Or, is a virtual table a proper way for doing this:

  • on demo, how to do it if we want to see Albums or Artists in Journals (or somewere else), sold to Customers? So direct opposite to Demo Invoices and since this information is already there in the underlying tables, in theory we should not need any new tables created. For example, let's show Albums sold (or Artists) with number of sold Tracks, Total, etc. with the child table Customers. I think this might be a Report, but report is not searchable...We do have a number of Tracks sold already, the question is to which Customer :)

Cheers

Dean

'ascii' codec can't encode with Oracle (UTF8 problem)

Hi

after successful import to Oracle I am using ISO88592 language and UTF8 and got similar error with both when creating new records:

'ascii' codec can't encode character u'\u0160' in position 0: ordinal not in range(128)

My Oracle language settings:
NLS_CHARACTERSET AL32UTF8
NLS_LANGUAGE AMERICAN

Linux server using:
env |grep LAN
LANG=en_AU.UTF-8
LANGUAGE=en_AU:en

The data is looking ok in the database when viewing with SqlDeveloper (imported csv's as task.copy_database doesn't work). But the appl is not displaying it right.

The Sqlplus is not showing right as well.

The solution is to set the Oracle NLS variable on Linux before running jam server:

export NLS_LANG=AMERICAN_AMERICA.UTF8

Sqlplus is showing now data correctly, for example:
select lastname from DEMO_CUSTOMERS;

LASTNAME

Gonçalves
Köhler
Tremblay
Hansen
Wichterlová
Holý

Everything else seems to be working really well Andrew!

Hope this helps!

D.
orig_1.3.45_4.0.24_2016-10-13_15-33-45.zip

How to initialise a default view?

Hi Andrew,

I can find a way to initialise a default page? For example, how was Demo->Invoices Master-Child view initialised as a default page?

Thanks

Moving existing app to jam-py?

Hi

let's say I have existing DB and would like to move it to jam-py. How would I do that?

Any utils to help in a process?

Thanks

D.

New group not working v4.0.78

Hi Andrew

looks like the new Group Item/Detail/report is not working.

Cheers
D.

PS
Sorry, testing v4.0.80 now, will report back.

Apache deployment 101.

Hi everyone,

in the next few days I'll try to explain how to deploy jam-py app at Linux Apache http server. This will be a simple, one app deployment, not covering multi hosted ISP environment. So basically deploying straight into the ie an cloud server with open 22, 80 and 443 port.

Prerequisite is a signed certificate for the DNS server name (YOUR_SERVER DNS entry from below). One can use a self signed, etc, not covering those. Also, Python installed and sudo access (or root for Linux). I have no idea at all about the MS Servers, sorry.

Regards

Dean

PS
Opened trail Google cloud account.

Let's put Oracle issues in here?

As promised, I've done some initial tests with Oracle tables import.
Imported the table and can see the content. The table has 42Mil rows, 17 columns:

rhnpackagefile

1:

Now trying to search. Looks like index.html must be updated as per catalogs-view/search example. Did that but no luck. The App just exits after pressing enter in a search filed with a brief "Server error message" (I think coz very fast and can't see it), and than showing initial App view. No errors in the log file.
The search filed is marked as default/required. Primary filed is package_id.

Cheers

Add dependencies pls

Hi Andrew,

pls add depdendencies so you can run them with pip -r

thanks,
Dmitry

Docker Container: Unable to visit server.py

I worked through the regular setup of going into a new folder (eg. folder1) and then typing:

jam-project.py

then I navigate to the folder: cd folder1 and type:

python server.py

Which results in:

/folder1# python server.py
http://0.0.0.0:8080/

Now this being a docker container, I should be able to navigate to:

localhost:8080

and I should get a result, but I get "Problem Unable to Connect"

I also tried:

localhost:8080/index.html but still get the same problem.

Is there any way to resolve this?

Dockerizing Jam.py (without success)

FROM ubuntu:14.04

# Prerequisites

RUN \
  sudo apt-get update && \
  sudo apt-get -y upgrade && \
  sudo apt-get install -y python2.7 python2.7-dev python-pip && \
  sudo apt-get clean

RUN \
  sudo apt-get install -y ubuntu-artwork dmz-cursor-theme ca-certificates xdot python-gtk2 python-gtk2-dev python-gtksourceview2

RUN \
  sudo pip install jam.py

The above is the dockerfile and can be saved as "Dockerfile".

When running it, trying to use the X-server, this is the docker-command:

sudo docker run -i -t -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY [IMAGE-NAME]

I've so far had no luck containerizing this. There are no errors, but after running "jam-project.py" in the container itself, no pop-up dialogue-box appears.

Is there something I am missing (possibly from the ubuntu-packages that need installing)?

How to integrate Help tab?

Hi Andrew,

sorry to bug you, but this might be obvious for you and maybe not so much for others :)
I am trying to understand how to make Help tab in some efficient way, lets say something like About on Demo.
For example, with a links from Table of Content, etc. Like from here:
SimpleAssets

I will try to move the above app to jam-py...

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.