#16671: 5th tutorial on turning Polls into a reusable app
-------------------------------+------------------------------------
     Reporter:  stumbles       |                    Owner:  ben@…
         Type:  New feature    |                   Status:  new
    Component:  Documentation  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by danols):

 * cc: ognajd@… (added)


Comment:

 I am +1 on this. One of the biggest challenges I faced when starting with
 Django is figuring out how to structure my projects/app and this tutorial
 clearly helps with that. Thank you to the authors working on this.

 I suggest it ought to use `distribute` which is a replacement for
 `setup_tools` which was a successor for `distuitls` - python package
 installation landscape is hairy to say the least:
 [http://stackoverflow.com/questions/6344076/differences-between-
 distribute-distutils-and-setuptools Differences between distribute,
 distutils and setuptools?]. I suggest the following `setup.py`.
 {{{
 from setuptools import setup, find_packages

 setup(
     install_requires=['distribute'], # let's require the successor to
 setuptools
     name='django-polls',
     version='0.1',
     packages=find_packages(),
     include_package_data=True, # this will use MANIFEST.in during install
 where we specify additional files
     license='',
     description=package.__doc__.strip(),
     long_description=open('README.txt').read(),
     url='http://www.example.com/',
     author='Your Name',
     author_email='yourn...@example.com',
 )
 }}}
 I am torn between using very explicit `package_data` or the
 `include_package_data` and `MANIFEST.in` to specify additional directories
 files. Former is more python however personally and from
 [http://danielsokolowski.blogspot.ca/2012/08/setuptools-
 includepackagedata-option.html experience] I settled on the latter as that
 is the only way to include root package files like `README.txt` and is the
 simplest - [http://packages.python.org/distribute/setuptools.html
 #including-data-files Including Data Files].

 {{{
 include LICENSE
 include README.rst
 recursive-include polls/templates *
 recursive-include docs *
 }}}

 Also let's link to http://packages.python.org/distribute/index.html in the
 tutorial

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16671#comment:18>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to