-
Notifications
You must be signed in to change notification settings - Fork 42
Support Django 1.9 #82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
contributing | ||
------------ | ||
|
||
in order for a pull request to be merged, please make sure it meets the following criteria: | ||
|
||
1. all unit tests pass for all supported versions of python and django. | ||
2. every newly added line of code is exercised by at least one unit test. | ||
3. all code is compliant with PEP8 style conventions. | ||
|
||
|
||
development setup | ||
----------------- | ||
to setup a development environment, run the following commands:: | ||
|
||
$ pip install -r dev_requirements.txt | ||
|
||
|
||
unit testing | ||
------------ | ||
|
||
to run the unit tests, run the following commands:: | ||
|
||
$ cd test_app | ||
$ python manage.py test | ||
|
||
|
||
demo testing | ||
------------ | ||
|
||
to ensure the app behaves as expected, run the following:: | ||
|
||
$ cd test_app | ||
$ python manage.py runserver | ||
|
||
then, visit ``http://localhost:8000/`` in your browser and confirm it produces a valid CSV. | ||
|
||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
coveralls==0.3 | ||
coverage==3.6 | ||
flake8==2.5.1 | ||
django>=1.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from djqscsv import (render_to_csv_response, write_csv, # NOQA | ||
generate_filename, CSVException) # NOQA | ||
from .djqscsv import (render_to_csv_response, write_csv, # NOQA | ||
generate_filename, CSVException) # NOQA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9 on 2016-01-13 15:38 | ||
from __future__ import unicode_literals | ||
|
||
import datetime | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Activity', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=50, verbose_name=b'Name of Activity')), | ||
], | ||
), | ||
migrations.CreateModel( | ||
name='Person', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('name', models.CharField(max_length=50, verbose_name="Person's name")), | ||
('address', models.CharField(max_length=255)), | ||
('info', models.TextField(verbose_name=b'Info on Person')), | ||
('born', models.DateTimeField(default=datetime.datetime(2001, 1, 1, 1, 1))), | ||
('hobby', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='djqscsv_tests.Activity')), | ||
], | ||
), | ||
] |
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
from django.db import models | ||
|
||
from django.utils.translation import ugettext as _ | ||
|
||
from django.utils.encoding import python_2_unicode_compatible | ||
from datetime import datetime | ||
|
||
SOME_TIME = datetime(2001, 01, 01, 01, 01) | ||
SOME_TIME = datetime(2001, 1, 1, 1, 1) | ||
|
||
|
||
class Activity(models.Model): | ||
name = models.CharField(max_length=50, verbose_name="Name of Activity") | ||
|
||
|
||
@python_2_unicode_compatible | ||
class Person(models.Model): | ||
name = models.CharField(max_length=50, verbose_name=_("Person's name")) | ||
address = models.CharField(max_length=255) | ||
info = models.TextField(verbose_name="Info on Person") | ||
hobby = models.ForeignKey(Activity) | ||
born = models.DateTimeField(default=SOME_TIME) | ||
|
||
def __unicode__(self): | ||
def __str__(self): | ||
return self.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from test_csv_creation import * | ||
from test_utilities import * | ||
from djqscsv_tests.tests.test_csv_creation import * # NOQA | ||
from djqscsv_tests.tests.test_utilities import * # NOQA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
from django.conf.urls import patterns, include, url | ||
import views | ||
from django.conf.urls import url | ||
from djqscsv_tests import views | ||
|
||
urlpatterns = patterns( | ||
'', | ||
url(r'^get_csv/', views.get_csv, name='get_csv'), | ||
urlpatterns = ( | ||
url(r'^$', views.get_csv, name='get_csv'), | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For these requirements it may be good to point to the instructions further down in the document, and to also mention that Travis will be checking all three automatically. Maybe link to or include a screenshot of how Travis reports errors and how a contributor could use the Travis results to fixup their PR.