Creacion de grupos de usuarios y miembros: UserGroups: Extend Auth_Group or Table Inheritance?

Anaconda  
Ver perfil   Traducir al Español
 Más opciones 21 ago, 07:20
I am looking to allow users to create their own groups and have
members. Which is more effecient:

Table Inheritance:
db.define_table(‘user_groups’, db.auth_group,
Field(‘name’) ………..ect…….))

or
Extend auth_group:

db.define_table(
   auth.settings.table_user_group,
  Field(‘role’, length=512, default=”,
label=auth.messages.label_role),
  Field(‘description’, ‘text’,
label=auth.messages.label_description),
  Field(‘name’, length=128, default=”, unique=True))

custom_auth_group = db[auth.settings.table_user_group]

# auth.define_tables()

Thanks in advance for any help!!


     
Massimo Di Pierro  
Ver perfil   Traducir al Español
 Más opciones 21 ago, 10:27
The question is: do you use a auth_groups to manage internal working
of the app or not? For example to you have user roles like “manager”
or “admin” etc. If so you may want to expose a different mechanism to
users. If you can use auth_groups (because you are not using it
already or you you plan to add checks to avoid conflicts, by all
means, you should use that, as it will save work later.

Massimo

 

0

0
 

SQLiteSpy


http://www.yunqa.de/delphi/doku.php/products/sqlitespy/index

SQLiteSpy is a fast and compact GUI database manager for SQLite. It reads SQLite3 files and executes SQL against them. Its graphical user interface makes it very easy to explore, analyze, and manipulate SQLite3 databases.

  • SQLiteSpyDatabase at a Glance – The schema treeview displays all items contained in a database, including tables, columns, indexes and triggers. Press F5 to update the schema tree, double-click a table or view to display its data, use the context menu for frequently used commands.
  • Grid Cell Editing – Table cells are editable in the grid: Display a table via the schema treeview, select a cell and press F2 to invoke the editor. Then modify and confirm to write your changes back to the table.
  • Data Type Display – The native SQL data types are displayed with different background colors to help detect type errors. Type errors can cause performance degradation or wrong SELECT result sets if NULL values are confused with empty strings.
  • Full Unicode – SQLiteSpy fully supports SQLite’s Unicode capabilities. Data display and entry is completely realized as Unicode, including SQL commands.
  • Multiple SQL Edits – Modern tabs are used to edit and display multiple SQL queries for easy comparison of query statements and results. SQL queries are executed by typing or loading them into the SQL edit. Then press F9 to run the query, or CTRL+F9 to run the current line or selection only.
  • Time Measurement – SQL execution time is automatically measured and displayed to help optimize queries.
  • Regular Expressions – The SQL keyword REGEXP is supported and adds the complete regular expression syntax ofPerl 5.10 to SQLiteSpy. The implementation was realized using the DIRegEx library.
  • Mathematical SQL Functions – The following mathematical SQL functions are available in addition to the SQLite default: ACOS(), ASIN(), ATAN(), ATAN(), ATAN2(), CEIL(), CEILING(), COS(), COT(), DEGREES(), EXP(), FLOOR(), LN(), LOG(), LOG(), LOG2(), LOG10(), MOD(), PI(), POW(), RADIANS(), SIGN(), SIN(), SQRT(), TAN(), TRUNCATE().
  • Data Compression – The SQL functions COMPRESS() applies zlib’s deflate to any text or BLOB value. The raw deflate data stream is returned. UNCOMPRESS() inflates this stream back to the original. Integers, Doubles, and Nulls are returned unchanged.
  • Compact Result Storage – The internal data storage mechanism uses SQLite’s native data types for optimal compatibility. As a result, SQLiteSpy uses far less memory than other SQLite managers and handles large tables much more efficiently.
  • Built-in SQLite Engine – SQLiteSpy comes as a single file executable with the SQLite database engine already build into the application. There is no need to distribute any DLLs, which makes SQLiteSpy easy to deploy with customers.
  • Encryption Support – SQLiteSpy can read and modify encrypted database files generated by DISQLite3DISQLite3implements its own native AES encryption which is not compatible with the commercial SQLite Encryption Extension (SSE) or any such implementation offered by other 3rd parties.
  • Loadable Extensions – SQLiteSpy loads runtime extension modules compiled with with “fastcall” (C++ Builder) or “register” (Delphi) calling conventions. Extensions can be loaded for the current database via SELECT load_extension('FileName.dll'); or automatically for all databases by entering extension file names to the Options dialog.
  • Easy Install & Uninstall – To run SQLiteSpy, just extract the SQLiteSpy.exe file to any directory and execute the file. No installation is needed – when first started, the program creates a single file SQLiteSpy.db3 (a SQLite3 database) to store options and settings. It does not write any other files or to the registry. Uninstalling is as simple as deleting two files only: The application’s executable and its options database file.
  • Freeware – SQLiteSpy is Freeware for personal and educational use. If you are using SQLiteSpy commercially, your donation is welcome to promote the ongoing development of this software. Thank you!

If you like to contribute to SQLiteSpy: Please post comments, suggestions, feature requests and bug reports to the mailing list. Thanks to all who have already shared their encouragement and ideas!

User Feedback

  • SOFTPEDIA "100% CLEAN" AWARDI am using your tool SQLiteSpy very extensively (I found it is convenient to work with SQLiteSpy on spreadsheet data – since I know SQL rather well I prefer SQLiteSpy rather that MS Excel in all cases of manipulating such data ) and want to just say that it is a really nice tool! Denis
  • Thanks for your excellent program. Looks like it is the best looking/most convenientGUI for SQLite3 from what I have seen. Serge
  • When I tried SQLiteSpy with my 10 million rows table I was totaly shocked: After 2 seconds I have showed all 10 million records in your grid. Developer, Slovakia
  • SQLiteSpy is a truly awesome little tool that helps me greatly. Alex, Great Britain
  • A cute and efficient software to manage SQLite databases, at least (I mean at least a good one)! Laurent, France
  • Really nice and beautifully small. Jakub, Czech Republic

0

0
 

Seleccion de SQLite Managers

http://blog.sobbayi.com/2011/02/round-up-of-the-best-sqlite-database-managers/

SQLite is a cross platform software library written in C that implements a database Engine. Even though SQLite does not need any configuration or server, it needs to be tightly integrated with the client that is using it. There are also times when the use of a SQLite database manager to increase productivity. Here is a collection of the best SQLite database management tools.

SQLite Manager

sqlite manager

SQLite Manager is a great SQLite management tool that is cross platform and works from within Firefox web browser as a Firefox plugin. It also works within Komodo and Songbird. SQLite Manager features dialogs for operations such as creating tables and indexes and views. You can also alter tables, create and open databases. There is also a query editor and the ability to export to CSV, SQL and XML files. With SQLite Manager you can also browse and search table data as well as manipulate the data you are browsing. You can download SQLite Manager here.

SQLite Maestro

sqlite maestro

SQLite Maestro is a SQLite Manager for Windows that comes with a price of $79 for no commercial use and $139 for a commercial license. SQLite Maestro has an incredible user interface. This SQLite database management tool comes with a blob viewer, query builder database designers, SQL query editor, a data manager for all the creating, editing and sorting operations. You can also access remote SQLite databases with SQLite Maestro. With this tool you can also import and export you data in and out of your SQLite database. To get SQLite Maestro you can visit their product website here.

SQLite Expert

sqlite expert

SQLite Expert is a SQLite database administration tool which comes with a visual query builder, a SQL editor with syntax highlighting and code completion. SQLite Expert also comes with a visual table designer and a view designer. Import and export of your SQLite database is also supported on SQLite Expert. You can import from CSV files, SQL scripts or even other SQLite databases. Exporting can be done to CSV, SQL scripts and Excel and PDF. SQLite Expert also has blob and image editors. Encrypted databases are also supported on SQLite Expert. The full professional edition is available for $59. You can download SQLite Expert from here.

SQLiteSpy

sqlite spy

SQLiteSpy GUI database management tool for SQLite. It features Editing tables from a Grid cell, viewing of the SQLite database schema and objects such as tables or views. There is a built in SQLite engine with DISQLite3 encryption support. SQLiteSpy requires no installation, offers insights into queries with time logging. With SQLiteSpy you can work with regular expressions as well. SQLiteSpy can be downloaded here.

SQLiteStudio

sqlite studio

SQLiteStudio is a SQLite database management tool that works cross platform. SQLiteStudio is a tool that requires no installation. You can use SQLiteStudio to export SQLite databases to SQL files, CSV and HTML formats. You can use this tool to perform operations on tables, views indexes and triggers on a SQLite database. This tool is also skinnable and provides UTF support. You can download SQLiteStudio from here.

RazorSQL

razorsql

RazorSQL is a cross platform database management tool that can manage several databases such as MySQL, MariaDB and of course SQLite. This SQLite database manager is capable of browsing database objects such as schemas, tables, indexes, procedures and views among others. There is also a SQL query editor, support for import and export to XML, HTML and Excel. Also available with RazorSQL is a query builder a table manipulator to add, edit and delete tables. To get RazorSQL you can got to their website.

SQLite Administrator

sqlite administrator

SQLite Administrator is a great SQLite database management tool for creating editing and administering SQLite databases. With SQLite Administrator you can perform operations on tables, indexes, views and triggers. There is also SQL code completion and syntax highlighting. SQLite Administrator allows you to import from CSV files and export to Excel, CSV, HTML and XML file formats. You can download SQLite Administrator here.

Related posts:

  1. SQLite vs MySQL: How To Decide Which To Use The question of when SQLite should be used and when MySQl should be used has come up again and again. To know when and where it is appropriate to use either SQLite or MySQL databases management systems, it is first…
  2. Eight Database Mistakes App Developers Make Ever seen a DBA having to deal with an application developers naive mistakes? Or could it simply be a case of developers just not knowing what should be done on a database and why it should be done. This issues…
  3. SQLite vs fopen(), How to Choose Lets examine the notion that SQLite can be a viable replacement for fopen(). To get your understanding, SQLite is an implementation of a database engine that is self contained, serverless, transactional and needs no configuration. On the Other hand fopen()…
  4. How To Backup a MySQL Database With SQLyog Backing up MySQL databases may not be as easy as it seems to the not so tech savvy users using the native MySQL client. An alternative is SQLyog. See how easy it can get….
  5. What is MySQL Workbench? A simple answer to that question is, MySQL Workbench visual database design tool developed by MySQL which is a cross-platform. MySQL Workbench is the successor to DBDesigner4 and is available for Windows (XP, VISTA & 7), Linux and Mac OSX….
  6. How To Insert Data Into MySQL Tables Using SQLyog Here comes the third article in the SQLyog for MySQL series of articles. Today we will deal with the various ways you can insert data into a MySQL database or MariaDB database using SQLyog, which is a powerful MySQL manager…
  7. How To Create MySQL Tables The Easy Way With SQLyog SQLyog is definitely a great and must have tool for any serious MySQL developer and database administrator. I would recommend going for either the SQLyog Enterprise Edition or the SQLyog Ultimate Edition so as to get the full benefits of…
  8. Making MySQL Easy with SQLyog Enterprise Edition SQLyog Enterprise Edition can make your life much easier especially if you do loads of work on MySQL database. Here I reveal some of my favorite features about this MySQL GUI….
  9. A little About MariaDB, a MySQL spin-off Seeing its slightly over a month since MariaDB 1.5 Beta was released for Linux and a couple of days now since the Windows Win32 Version came into being I felt it prudent to mention a little a bit about it…
  10. How to Build and Install MariaDB on Windows From Source Knowing that MariaDB in the simplest terms, is an alternative to MySQL database server; the world’s most popular open source relational database management system. MariaDb has its source code made publicly available from Launchpad, MariaDB remains an open and free…

0

0
 

HOWTO: crear formularios FORM identicos a determinado HTML

position – Multiple fields in web2py FORM – Stack Overflow

 

I want to make a simple FORM (not SQLFORM) in web2py with two fields namely ‘name’ and ‘password’.
I have used the following code

form=FORM('Cloned VM Name:',INPUT(_name='name',requires=IS_NOT_EMPTY()),
          'VNC Password:',INPUT(_name='password',_type='password',requires=IS_NOT_EMPTY()),
           INPUT(_type='submit', _value='Clone it!'))

I could generate the form but the fields are not appearing what we expect
it like
enter image description here

Is there a way i can position the fields.

link|improve this question


 
   
feedback

1 Answer

up vote
1
down vote
accepted

The FORM and INPUT helpers are just replacements for the HTML <form> and <input> tags, so your code will produce this HTML:

<form action="" enctype="multipart/form-data" method="post">
Cloned VM Name:<input name="name" type="text" />
VNC Password:<input name="password" type="password" />
<input type="submit" value="Clone it!" />
</form>

Depending on how you want the form formatted, you could add additional web2py HTML helpers and/or use CSS. For example, if you want each input on a separate line, just put each one into a DIV:

form=FORM(DIV('Cloned VM Name:',INPUT(_name='name',requires=IS_NOT_EMPTY())),
     DIV('VNC Password:',
         INPUT(_name='password',_type='password',requires=IS_NOT_EMPTY())),
     DIV(INPUT(_type='submit',_value='Clone it!')))

Alternatively, if you want to take advantage of some of web2py’s SQLFORM functionality (such as the formstyle argument to control the formatting) but do not want to base the form on a database table, you can use SQLFORM.factory.

link|improve this answer
0

0