mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Update copyright notices for 2021
This commit is contained in:
@@ -16,46 +16,46 @@ review process for any patches submitted for inclusion in pgAdmin.
|
||||
bulk updates every year). The start date should always be 2013, and the end year
|
||||
the current year, e.g.
|
||||
|
||||
Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
||||
|
||||
Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
||||
|
||||
* Ensure there's a blank line immediately following any copyright headers.
|
||||
|
||||
* Include PyDoc comments for functions, classes and modules. Node modules should
|
||||
* Include PyDoc comments for functions, classes and modules. Node modules should
|
||||
be """Implements the XXXX node""".
|
||||
|
||||
* Ensure that any generated SQL does not have any leading or trailing blank lines
|
||||
and consistently uses 4 space indents for nice formatting.
|
||||
|
||||
* Don't special-case any Slony objects. pgAdmin 4 will have no direct knowledge
|
||||
* Don't special-case any Slony objects. pgAdmin 4 will have no direct knowledge
|
||||
of Slony, unlike pgAdmin 3.
|
||||
|
||||
* If you copy/paste modules, please ensure any comments are properly updated.
|
||||
* If you copy/paste modules, please ensure any comments are properly updated.
|
||||
|
||||
* Read all comments, and ensure they make sense and provide useful commentary on
|
||||
the code.
|
||||
|
||||
* Ensure that field labels both use PostgreSQL parlance, but also are descriptive.
|
||||
A good example is the "Init" field on an FTS Template - Init is the PG term, but
|
||||
* Ensure that field labels both use PostgreSQL parlance, but also are descriptive.
|
||||
A good example is the "Init" field on an FTS Template - Init is the PG term, but
|
||||
adding the word "Function" after it makes it much more descriptive.
|
||||
|
||||
* Re-use code whereever possible, but factor it out into a suitably central
|
||||
location - don't copy and paste it unless modifications are required!
|
||||
|
||||
* Format code nicely to make it readable. Break up logical chunks of code with
|
||||
blank lines, and comment well to describe what different sections of code are
|
||||
* Format code nicely to make it readable. Break up logical chunks of code with
|
||||
blank lines, and comment well to describe what different sections of code are
|
||||
for or pertain to.
|
||||
|
||||
* Ensure that form validation works correctly and is consistent with other
|
||||
* Ensure that form validation works correctly and is consistent with other
|
||||
dialogues in the way errors are displayed.
|
||||
|
||||
* On dialogues with Schema or Owner fields, pre-set the default values to the
|
||||
current schema/user as appropriate. In general, if there are common or sensible
|
||||
default values available, put them in the fields for the user.
|
||||
* On dialogues with Schema or Owner fields, pre-set the default values to the
|
||||
current schema/user as appropriate. In general, if there are common or sensible
|
||||
default values available, put them in the fields for the user.
|
||||
|
||||
* 1 patch == 1 feature. If you need to fix/update existing infrastructure in
|
||||
* 1 patch == 1 feature. If you need to fix/update existing infrastructure in
|
||||
your patch, it's usually easier if it's in a separate patch. Patches containing
|
||||
multiple new features or unrelated changes are likely to be rejected.
|
||||
|
||||
* Ensure the patch is fully functional, and works! If a patch is being sent as
|
||||
a work in progress, not intended for commit, clearly state that it's a WIP,
|
||||
and note what does or does not yet work.
|
||||
* Ensure the patch is fully functional, and works! If a patch is being sent as
|
||||
a work in progress, not intended for commit, clearly state that it's a WIP,
|
||||
and note what does or does not yet work.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
`Coding Standards`:index:
|
||||
*************************
|
||||
|
||||
pgAdmin uses multiple technologies and multiple languages, each of which have
|
||||
pgAdmin uses multiple technologies and multiple languages, each of which have
|
||||
their own coding standards.
|
||||
|
||||
General
|
||||
@@ -16,24 +16,24 @@ lines wrapped where appropriate to ensure they can be read on smaller displays
|
||||
as it's quite wasteful on modern displays). Typically lines should not be longer
|
||||
than 120 characters.
|
||||
|
||||
Comments should be included in all code where required to explain its
|
||||
Comments should be included in all code where required to explain its
|
||||
purpose or how it works if not obvious from a quick review of the code itself.
|
||||
|
||||
CSS 3
|
||||
*****
|
||||
|
||||
CSS3 is used for styling and layout throughout the application. Extensive use is
|
||||
made of the Bootstrap Framework to aid in that process, however additional
|
||||
made of the Bootstrap Framework to aid in that process, however additional
|
||||
styles must still be created from time to time.
|
||||
|
||||
Most custom styling comes from individual modules which may advertise static
|
||||
stylesheets to be included in the module that is loading them via hooks.
|
||||
|
||||
Styling overrides (for example, to alter the Bootstrap look and feel) will
|
||||
Styling overrides (for example, to alter the Bootstrap look and feel) will
|
||||
typically be found in the **overrides.css** file in the main static file
|
||||
directory for the application.
|
||||
|
||||
Styling should never be applied inline in HTML, always through an external
|
||||
Styling should never be applied inline in HTML, always through an external
|
||||
stylesheet, which should contain comments as appropriate to explain the usage
|
||||
or purpose for the style.
|
||||
|
||||
@@ -48,16 +48,16 @@ Styles should be specified clearly, one per line. For example:
|
||||
|
||||
/* Ensure the codemirror editor displays full height gutters when resized */
|
||||
.CodeMirror, .CodeMirror-gutters {
|
||||
height: 100% !important;
|
||||
}
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
All stylesheets must be CSS3 compliant.
|
||||
|
||||
HTML 5
|
||||
******
|
||||
|
||||
HTML 5 is used for page structure throughout the application, in most cases
|
||||
being rendered from templates by the Jinja2 template engine in Flask.
|
||||
HTML 5 is used for page structure throughout the application, in most cases
|
||||
being rendered from templates by the Jinja2 template engine in Flask.
|
||||
|
||||
All HTML must be HTML 5 compliant.
|
||||
|
||||
@@ -160,17 +160,17 @@ which may be omitted if on a single statement is present:
|
||||
Python
|
||||
******
|
||||
|
||||
Python is used for the backend web server. All code must be compatible with
|
||||
Python is used for the backend web server. All code must be compatible with
|
||||
Python 2.7 and should include PyDoc comments whilst following the official
|
||||
Python coding standards defined in
|
||||
`PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_. An example function along
|
||||
Python coding standards defined in
|
||||
`PEP 8 <https://www.python.org/dev/peps/pep-0008/>`_. An example function along
|
||||
with the required file header is shown below::
|
||||
|
||||
##########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
||||
# Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
##########################################################################
|
||||
@@ -185,12 +185,12 @@ with the required file header is shown below::
|
||||
def get_nodes():
|
||||
"""Return a JSON document listing the server groups for the user"""
|
||||
groups = ServerGroup.query.filter_by(user_id=current_user.id)
|
||||
|
||||
|
||||
value = ''
|
||||
for group in groups:
|
||||
value += '{"id":%d,"label":"%s","icon":"icon-server-group","inode":true},' \
|
||||
% (group.id, group.name)
|
||||
|
||||
|
||||
value = value[:-1]
|
||||
|
||||
return value
|
||||
|
||||
return value
|
||||
|
||||
@@ -13,7 +13,7 @@ documentation is attributed to the
|
||||
|
||||
.. topic:: pgAdmin 4
|
||||
|
||||
Copyright (C) 2013 - 2020, The pgAdmin Development Team
|
||||
Copyright (C) 2013 - 2021, The pgAdmin Development Team
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose, without fee, and without a written agreement is
|
||||
@@ -29,4 +29,4 @@ documentation is attributed to the
|
||||
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND
|
||||
THE PGADMIN DEVELOPMENT TEAM HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
||||
|
||||
Reference in New Issue
Block a user