<commit_before>============
Installation
============

This guide assumes that Django is properly installed and that you have installed the
dependencies mentioned in the requirements section.

1. Get the latest Satchmo production source release::

        svn co svn://satchmoproject.com/satchmo/tags/0.6
             or download from
        http://www.satchmoproject.com/snapshots/satchmo-0.6.tar.gz


.. Note::
    If you would like the latest bleeding edge release, get it via svn-
	    svn co svn://satchmoproject.com/satchmo/trunk/
        
2. Ensure that satchmo is on your pythonpath.  There are several options for adding Satchmo to the path:
	
	- Add satchmo to the PYTHONPATH variable
	- Create a .pth file in your site-packages directory. pth_.
	- Install Satchmo in the site-packages directory

   Either way, once it's done, you should be able to do this successfully::

	$ python
	Python 2.4.2 (#1, Feb  9 2006, 05:29:30)
	[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
	Type "help", "copyright", "credits" or "license" for more information.
	>>> import django
	>>> import satchmo
	>>>

   Do not attempt to progress any further on the install until the above imports
work.

   The next two steps depend on whether or not Satchmo is a standalone project or
just an app that is part of another Django project.

If Satchmo is a standalone app (follow steps 3 and 4):

3.  Modify Satchmo's default settings-customize.py file::

        cp settings-customize.py settings.py
    
4.  Modify settings.py to reflect your setup.

If Satchmo is part of another Django app (follow step 5):

5. Modify you project settings.py file so that it has the following line at the end::

        from local_settings import *

   Now that the basic application settings are complete, you will need to
   configure the satchmo specific items stored in local_settings.py.

6. Create your customized local_settings.py file::
    
        cp local_settings-customize.py local_settings.py

   Note that if you are installing as an app, you need to copy the local_settings file into your app somewhere.  It doesn't **have** to be named local_settings.  I often call it "settings_satchmo", but keep in mind that we'll be calling it "local_settings" throughout the instructions.

7.  Edit this local_settings.py file for your setup. The following values need to be changed::
		
        DATABASE_NAME = 'Your DB Name Here'
        DATABASE_PASSWORD = '<PASSWORD>'
        DATABASE_USER = 'Your DB User Here'
        SECRET_KEY = 'Your secret key here'

   Note that if you are running as an app, you probably already have database settings in your settings file.  But you will need to go through the local_settings file and make sure that everything in there is commented or uncommented appropriately.
        
   Commonly, this will include entries such as::<commit_msg>clarified installation as an app (tweaking layout)<commit_after>============
Installation
============

This guide assumes that Django is properly installed and that you have installed the
dependencies mentioned in the requirements section.

1. Get the latest Satchmo production source release::

        svn co svn://satchmoproject.com/satchmo/tags/0.6
             or download from
        http://www.satchmoproject.com/snapshots/satchmo-0.6.tar.gz


.. Note::
    If you would like the latest bleeding edge release, get it via svn-
	    svn co svn://satchmoproject.com/satchmo/trunk/
        
2. Ensure that satchmo is on your pythonpath.  There are several options for adding Satchmo to the path:
	
	- Add satchmo to the PYTHONPATH variable
	- Create a .pth file in your site-packages directory. pth_.
	- Install Satchmo in the site-packages directory

   Either way, once it's done, you should be able to do this successfully::

	$ python
	Python 2.4.2 (#1, Feb  9 2006, 05:29:30)
	[GCC 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)] on linux2
	Type "help", "copyright", "credits" or "license" for more information.
	>>> import django
	>>> import satchmo
	>>>

   Do not attempt to progress any further on the install until the above imports work.

   The next two steps depend on whether or not Satchmo is a standalone project or just an app that is part of another Django project.

**If Satchmo is a standalone app (follow steps 3 and 4):**

3.  Modify Satchmo's default settings-customize.py file::

        cp settings-customize.py settings.py
    
4.  Modify settings.py to reflect your setup.

**If Satchmo is part of another Django app (follow step 5):**

5. Modify you project settings.py file so that it has the following line at the end::

        from local_settings import *

   Now that the basic application settings are complete, you will need to
   configure the satchmo specific items stored in local_settings.py.

6. Create your customized local_settings.py file::
    
        cp local_settings-customize.py local_settings.py

   Note that if you are installing as an app, you need to copy the local_settings file into your app somewhere.  It doesn't **have** to be named local_settings.  I often call it "settings_satchmo", but keep in mind that we'll be calling it "local_settings" throughout the instructions.

7.  Edit this local_settings.py file for your setup. The following values need to be changed::
		
        DATABASE_NAME = 'Your DB Name Here'
        DATABASE_PASSWORD = '<PASSWORD>'
        DATABASE_USER = 'Your DB User Here'
        SECRET_KEY = 'Your secret key here'

   Note that if you are running as an app, you probably already have database settings in your settings file.  But you will need to go through the local_settings file and make sure that everything in there is commented or uncommented appropriately.
        
   Commonly, this will include entries such as::
{'fraction_non_alphanumeric': 0.07178602243313201, 'fraction_numerical': 0.015530629853321829, 'mean_word_length': 3.3028953229398663, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4472768', 'n_tokens_mistral': 1728, 'n_tokens_neox': 1623, 'n_words': 777}