Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Garret Wassermann 2017-02-15 20:09:10 -05:00
commit 9ed90b4896
6 changed files with 131 additions and 59 deletions

101
CONTRIBUTING Normal file
View File

@ -0,0 +1,101 @@
Contributing
============
django-helpdesk is an open-source project and as such contributions from the
community are welcomed and encouraged.
Licensing
---------
All contributions to django-helpdesk must be under the BSD license documented in
the LICENSE file in the top-level directory of this project. By submitting a
contribution to this project (in any way: via e-mail, via GitHub forks,
attachments, etc), you acknowledge that your contribution is open-source and
licensed under the BSD license.
If you or your organisation does not accept these license terms then we cannot
accept your contribution. Please reconsider!
Translations
------------
Although django-helpdesk has originally been written for the English language,
there are already multiple translations to Spanish, Polish, and German and more
translations are welcomed.
Translations are handled using the excellent Transifex service which is much
easier for most users than manually editing .po files. It also allows
collaborative translation. If you want to help translate django-helpdesk into
languages other than English, we encourage you to make use of our Transifex
project:
http://www.transifex.net/projects/p/django-helpdesk/resource/core/
Once you have translated content via Transifex, please raise an issue on the
project Github page to let us know it's ready to import.
Code changes
------------
Please fork the project on GitHub, make your changes, and log a pull request to
get the changes pulled back into the
master branch of the django-helpdesk repository.
Wherever possible please break git commits up into small chunks that are
specific to a single bit of functionality. For example, a commit should not
contain both new functionality *and* a bugfix; the new function and the bugfix
should be separate commits wherever possible.
Commit messages should also explain *what*, precisely, has been changed.
All commits should include appropriate new or updated tests; see the Tests
section below for more details.
If you have any questions, please start a discussion on the GitHub issue tracker
at
https://github.com/django-helpdesk/django-helpdesk/issues
Tests
-----
Currently, test coverage is very low. We're working on increasing this, and to
make life easier we are using `Travis CI` (http://travis-ci.org/) for continuous
integration. This means that the test suite is run every time a code change is
made, so we can try and make sure we avoid basic bugs and other regressions.
As a general policy, we will only accept new feature commits if they are
accompanied by appropriate unit/functional tests (that is, tests for the
functionality you just added). Bugfixes should also include new unit tests to
ensure the bug has been fixed.
More significant code refactoring must also include proper integration or
validation tests, to be committed BEFORE the refactoring patches. This is to
ensure that the refactored code produces the same results as the previous code
base.
Any further integration or validation tests (tests for the entire
django-helpdesk application) are not required but greatly appreciated until we
can improve our overall test coverage.
Please include tests in the ``tests/`` folder when committing code changes.
If you have any questions about creating or maintaining proper tests, please
start a discussion on the GitHub issue tracker at
https://github.com/django-helpdesk/django-helpdesk/issues
Database schema changes
-----------------------
As well as making your normal code changes to ``models.py``, please generate a
Django migration file and commit it with your code. You will want to use a
command similar to the following::
./manage.py migrate helpdesk --auto [migration_name]
Make sure that ``migration_name`` is a sensible single-string explanation of
what this migration does, such as *add_priority_options* or *add_basket_table*.
This will add a file to the ``migrations/`` folder, which must be committed to
git with your other code changes.

View File

@ -1,55 +0,0 @@
Contributing
============
django-helpdesk is an open-source project and as such contributions from the community are welcomed and encouraged.
Licensing
---------
All contributions to django-helpdesk must be under the BSD license documented in our :doc:`license` page. All code submitted (in any way: via e-mail, via GitHub forks, attachments, etc) are assumed to be open-source and licensed under the BSD license.
If you or your organisation does not accept these license terms then we cannot accept your contribution. Please reconsider!
Translations
------------
.. image:: http://www.transifex.net/projects/p/django-helpdesk/resource/core/chart/image_png
Although django-helpdesk has originally been written for the English language, there are already multiple translations to Spanish, Polish, and German and more translations are welcomed.
Translations are handled using the excellent Transifex service which is much easier for most users than manually editing .po files. It also allows collaborative translation. If you want to help translate django-helpdesk into languages other than English, we encourage you to make use of our Transifex project:
http://www.transifex.net/projects/p/django-helpdesk/resource/core/
Once you have translated content via Transifex, please raise an issue on the project Github page to let us know it's ready to import.
Code changes
------------
Please fork the project on GitHub, make your changes, and log a pull request to get the changes pulled back into my repository.
Wherever possible please break git commits up into small chunks that are specific to a single bit of functionality. For example, a commit should not contain both new functionality *and* a bugfix; the new function and the bugfix should be separate commits wherever possible.
Commit messages should also explain *what*, precisely, has been changed.
If you have any questions, please start a discussion on the GitHub issue tracker at https://github.com/django-helpdesk/django-helpdesk/issues
Tests
-----
Currently, test coverage is very low. We're working on increasing this, and to make life easier we are using `Travis CI`_ for continuous integration. This means that the test suite is run every time a code change is made, so we can try and make sure we avoid basic bugs and other regressions.
Please include tests in the ``tests/`` folder when committing code changes.
.. _Travis CI: http://travis-ci.org/
Database schema changes
-----------------------
As well as making your normal code changes to ``models.py``, please generate a Django migration file and commit it with your code. You will want to use a command similar to the following::
./manage.py migrate helpdesk --auto [migration_name]
Make sure that ``migration_name`` is a sensible single-string explanation of what this migration does, such as *add_priority_options* or *add_basket_table*
This will add a file to the ``migrations/`` folder, which must be committed to git with your other code changes.

View File

@ -69,7 +69,7 @@ django-helpdesk is released under the BSD license, however it packages 3rd party
Dependencies
------------
1. Python 2.7+ (or 3.3+)
2. Django (1.7 or newer)
1. Python 2.7+ (or 3.4+)
2. Django (1.8 or newer)
3. An existing **working** Django project with database etc. If you cannot log into the Admin, you won't get this product working! This means you **must** run `syncdb` **before** you add ``helpdesk`` to your ``INSTALLED_APPS``.

View File

@ -35,7 +35,7 @@ Adding To Your Django Project
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites', # Required for determing domain url for use in emails
'django.contrib.sites', # Required for determining domain url for use in emails
'django.contrib.admin', # Required for helpdesk admin/maintenance
'django.contrib.humanize', # Required for elapsed time formatting
'markdown_deux', # Required for Knowledgebase item formatting
@ -43,6 +43,12 @@ Adding To Your Django Project
'helpdesk', # This is us!
)
Your ``settings.py`` file should also define a ``SITE_ID`` that allows multiple projects to share
a single database, and is required by ``django.contrib.sites`` in Django 1.9+.
If you aren't running multiple sites, you can simply add a default ``SITE_ID`` to ``settings.py``::
SITE_ID = 1
2. Make sure django-helpdesk is accessible via ``urls.py``. Add the following line to ``urls.py``::
url(r'helpdesk/', include('helpdesk.urls')),

View File

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-10 19:27
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('helpdesk', '0014_usersettings_related_name'),
]
operations = [
migrations.AlterField(
model_name='queue',
name='permission_name',
field=models.CharField(blank=True, editable=False, help_text='Name used in the django.contrib.auth permission system', max_length=72, null=True, verbose_name='Django auth permission name'),
),
]

View File

@ -180,7 +180,7 @@ class Queue(models.Model):
permission_name = models.CharField(
_('Django auth permission name'),
max_length=50,
max_length=72, # based on prepare_permission_name() pre-pending chars to slug
blank=True,
null=True,
editable=False,