Permalink
Browse files

Merge: membership_default

commit f124decbee49c0957ace120bd8138ed5ab23f6fc
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Dec 19 13:55:49 2012 -0600

    Updating invoices to detect for entry.object_type NoneType object.

commit fe51fb964c59771dce9d4d18af055230bc42717c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Dec 19 13:45:43 2012 -0600

    Updated the invoice module to check for an object_type attribute before referencing.

commit ed70f8e6285944629f98b9249ae26c35188df71d
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 19 13:40:48 2012 -0600

    Fix template edit error (html_url referenced before assignment) when zip file is not uploaded.

commit b415a80c5310cf89c7ffbd8bd3713ac1d046a685
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Dec 19 12:18:16 2012 -0600

    Refresh member number on profile page after editing the profile page.

commit d8b5fab0107cc2e43d9260deece9f5eba7abce89
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Dec 19 11:51:26 2012 -0600

    Changed membership add link.

commit 7657c8eb613da1e48d7c8df01f3db355201d9272
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 19 11:12:14 2012 -0600

    Clear out cache for membership import with invalidate.

commit 211efdbe78ee289d55da65b28a7cd5ff1660d7a2
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 18 15:26:35 2012 -0600

    Add export link to the corp nav.

commit 9bebccd75a974da347fe9348ec07946ede282b68
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 18 15:22:12 2012 -0600

    Include authorized_domains and dues_rep fields to the corp. export.

commit f822047beab2932878ee77c09878fa725e3e3324
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 18 14:59:48 2012 -0600

    Update django model report in setup.py.

commit 1fabe0eb8d53d9471dc040b88728bc3745e6387a
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 18 14:49:11 2012 -0600

    Update django model report version.

commit 6e7b6cb651fbf997194ab891f8ac3107bef5bae9
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Dec 18 11:42:02 2012 -0600

    Updated user/profile import to use dparser.parse instead of dparser.parser.  "parse" returns a datetime object instead of a parser object.

commit 818c6e6ce91e2181caf68f7f4feecb829e5e3ce0
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 18 11:40:07 2012 -0600

    Add model report templates to tendenci templates.

commit 587f2572e6784aadf34f411bf9b8f366cb20d0e2
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Dec 18 11:06:06 2012 -0600

    Added 5 custom fields to user/profile import feature.

commit 915e323726aaad1ea0fe423c492c8a5e01379076
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 18 10:28:47 2012 -0600

    Update command port_to_membership_default.

commit c3a2f2a6c8487c967357010e8296233dd76abcfd
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Dec 18 09:37:37 2012 -0600

    Added 5 user defined fields to the profile export feature.

commit d8d452f428a4d68d1a80f0ee1c79eaf74c4b5981
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 17 17:43:57 2012 -0600

    Fix the 'matching query does not exist' error for payment_method function in AppEntry (the function is used in port_to_membership_default command)

commit 4c58aed06672338e86160fcaa4206ccb1d893bb2
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 17 16:41:33 2012 -0600

    Resolve membership migration conflicts

commit f1b93d8abac41b845b324a17ef3fcfe1c90c9dda
Author: Jenny Qian <jqian@schipul.com>
Date:   Sun Dec 16 16:16:37 2012 -0600

    Add CorpExportForm to export.

commit d720a8614b36bfedd2800590c99cfd013a13e871
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Dec 17 16:40:05 2012 -0600

    Added 5 user defined fields to the membership application.

commit 0ffd48cec3385254cc7d1eb48efc54c72b24305c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Dec 17 15:12:24 2012 -0600

    Adding 5 user-defined fields to membership import.  The 5 user-defined fields will be stored in the profile database table.

commit 44058cc19ef16bc5744bfe5b2be88ad378c17884
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Dec 17 12:34:54 2012 -0600

    PEP8 import_memberships_defaults.py

commit c1e093a52e77d4e239cdc66eca1c576ba1b24b62
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Mon Dec 17 14:56:19 2012 -0600

    Removed the all_files gallery from the membership_default branch.

commit cdcb41744bde4f9b964e08cbdf1270612ece6baa
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Mon Dec 17 14:45:12 2012 -0600

    Adding a hard max length to imported fields on the user import.

commit b3b028d7f9f93142f7a10e4e21ef53a0e3a411cc
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Mon Dec 17 14:44:48 2012 -0600

    Updating user groups edit forms to be similar to each other.

commit 234e3e3d55acfba3e9a07e47d8ed788dc2521aac
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Fri Dec 14 08:24:59 2012 -0600

    inexact match on email when trying to match members.

commit 0afd8d4e55a7a2a41fe7bc19d232ac5d824fae6e
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 17 14:31:29 2012 -0600

    Add sync for newsletters to user group admin.

commit 3926187dfb93965cf202afaa0bbc8c895a3fbcd0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Dec 17 11:55:35 2012 -0600

    Adding 5 user defined fields to the profile model.

commit 384e2f3d77f835015a7a8fc1aa7e76486137e15b
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 17:51:28 2012 -0600

    Wrap @password_required to corp. export.

commit b520854bb4701719bdc922450cd9dbf7768ea13b
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 17:37:14 2012 -0600

    Corp. memb. export.

commit 895153315cac50c90c2c02a2561a881f57e5badf
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 17:36:47 2012 -0600

    Add corp. import link to nav.

commit 8573d70839c5c9c257dc6d0ea2059532d69a046e
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 15:37:28 2012 -0600

    Wrap password_required decorator to corp import.

commit 0be816ec338228145896b0b31e31461c4b6be70f
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 15:25:55 2012 -0600

    Corp. memb. import update.

commit 82008bc36b3196d31895f625c51640ac39b3e868
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 13:41:21 2012 -0600

    Corp. memb. import css update.

commit 15a7b011e58f2800795b6bd0512a54b8c75fd389
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 13:22:09 2012 -0600

    Add nav to the import preview and status pages.

commit bcaa32e76e37671bbe370c1d8dc31aed704e0010
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 13:19:45 2012 -0600

    Update corp. memb. import instruction.

commit b7c71437c198fa21d91fed3d533a46ead7ee2e1e
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 14 13:09:21 2012 -0600

    Handle authorized domains and dues reps in the corp. memb. import.

commit a25b052fb69dbf77085d6f2d29d5ff532aa8f74d
Author: Alex <aragsdale@schipul.com>
Date:   Fri Dec 14 09:17:25 2012 -0600

    Change text on membership report list.

commit c0fce5b6549eeaea8ba9032e57ed36687d39e683
Author: Alex <aragsdale@schipul.com>
Date:   Fri Dec 14 09:14:44 2012 -0600

    Add download CSV to renewed members report.

commit 3eceddd81eb9437bedb51b668f6cbef30ecbf59f
Author: Alex <aragsdale@schipul.com>
Date:   Fri Dec 14 09:06:37 2012 -0600

    Add download CSV to current members quick list.

commit 90bd708a58a1c106941e96694e807269f0c5fa3d
Author: Alex <aragsdale@schipul.com>
Date:   Fri Dec 14 08:55:32 2012 -0600

    Members YTD by type report.

commit a71baca59571a2afcf6a36f5473c93d3efaacc0d
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 13 15:57:04 2012 -0600

    Option for corporate membership import to bind members to corporations by their company names.

commit 46de434c3790747b76f5973f44ec611644ff4317
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 13 14:25:06 2012 -0600

    Changed the status_detail from 'archived' to 'archive' for memberships and corporate memberships.

    This is to keep consistent with T4.

commit 411db1092b749114fa2a4d58519baa9d1fcf5262
Author: Alex <aragsdale@schipul.com>
Date:   Thu Dec 13 13:30:11 2012 -0600

    Add link to membership invoices on membership report list.

commit ef15552897c639287e2cacc901b542bf8f3733d5
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 13 09:36:10 2012 -0600

    Corp. memb. import process and status page.

commit f4bed76201921ebd534e4afbf707614e88bf468a
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 13 09:35:10 2012 -0600

    Correct the upload url in membership_default_import_status.

commit af2fdf92dba5b792e98c074d8bae9a56e2d7058b
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 13 09:32:49 2012 -0600

    Management command to import corporate memberships.

commit 6ad3ee009ed97bc05087b52163e79faa3cfa8b60
Author: Alex <aragsdale@schipul.com>
Date:   Thu Dec 13 12:30:36 2012 -0600

    Remove membership reports from admin bar and link to the membership report list instead.

commit b733dd6af77c2c22a627e05d830058bbeaebd015
Author: Alex <aragsdale@schipul.com>
Date:   Thu Dec 13 12:22:11 2012 -0600

    Add back advanced options stuff in invoices search view.

commit 76ce016d67d2e2b6a7e21f12877dec1d5a72019f
Merge: c5ca7d7 7fe19f8
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Dec 13 11:54:08 2012 -0600

    Merge branch 'refs/heads/master' into membership_default

    Conflicts:
    	setup.py
    	tendenci/addons/corporate_memberships/templates/corporate_memberships/invoice_search_result_line.html
    	tendenci/addons/corporate_memberships/utils.py
    	tendenci/templates/top_menu/admin_top.html

commit c5ca7d7ab008cf9578300763f8fee200b3395f8e
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 22:01:19 2012 -0600

    Update corp. memb. preview.

commit 311b731b812c116902399205e2ad6bbe2893bbe7
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 22:00:51 2012 -0600

    Management command to pre-process corp. memb. import.

commit a3c61c5e0345e8a740634f392b40685170fe8377
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 21:40:41 2012 -0600

    Corp. memb. import preview.

commit 58f1bf701a645ea67a94a4165176710dcbf536c0
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 13:01:20 2012 -0600

    Template download page for corp memb. import

commit 38411af68f78390220effcffe24b30525f4558d1
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 11:32:44 2012 -0600

    Corp memb. import upload page.

commit 6f56d81648d65784740169321899436cc298ffc4
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 12 10:40:45 2012 -0600

    Added models CorpMembershipImport and CorpMembershipImportData.

commit f5e80a5123b3a0e2b266670fa8d600a6d2d9d9a5
Author: Alex <aragsdale@schipul.com>
Date:   Wed Dec 12 14:48:08 2012 -0600

    Active Members YTD report.

commit c12956315e84d73ed978d9a0ec6f1ae7400e2fe3
Author: Alex <aragsdale@schipul.com>
Date:   Wed Dec 12 10:50:32 2012 -0600

    Update expired and active memberships report to add days filter. Remove new members report that is now redundant.

commit bb7c10ae0579e2352380404786c63bd32a8e053f
Author: Alex <aragsdale@schipul.com>
Date:   Wed Dec 12 08:01:28 2012 -0600

    Add renewed members report and order new members report by join dt.

commit 9ee82e9887cff3b5ca99070079dce2554c7699fd
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 11 18:24:28 2012 -0600

    Corp membership roster search.

commit ac6f45f21e1937dcec72f7cf72f4add44fdc793a
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 11 12:13:05 2012 -0600

    Add members in grace period report.

commit 8f2f93550a0c017be044a18c6a62f00986451e22
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 11 10:15:07 2012 -0600

    Fix up membership joins report and membership joins pdf to work with new membership model.

commit 77c9e3000792c3c16c1a64745b8c1f138ddd6e6a
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 11 10:12:27 2012 -0600

    Add report for members in renewal period.

commit efbb30c55293a1c2d7418a9f8c46cf883a2ea81b
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 11 09:40:31 2012 -0600

    Add link to pending memberships in django admin on member report list.

commit 80f4332240eec913726a8bd597fd8cded27780d0
Author: Alex <aragsdale@schipul.com>
Date:   Tue Dec 11 08:48:11 2012 -0600

    Add new members filterable by join date report.

commit 74652959adf9d011af38b41d562a3616e270e032
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 16:41:42 2012 -0600

    Update corp nav and add it to search, add, edit, delete, approve, preview and view pages.

commit 26d52d2f8ce41ff1df234ff603701307de8be0a6
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 15:06:09 2012 -0600

    Corp. membership invoice update

commit fdfc79d6dd7b8383bd6a935c39160da2ce7d7c25
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 13:52:04 2012 -0600

    Update corp. memb approval.

commit c0d0c395b01c0935a2bdf9801bf852017ab6ec34
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 13:51:11 2012 -0600

    Remove the Payment Method section break from app_fields.json

commit d5b79d2722c95137822bc3c63c801a1b873891b5
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 13:50:27 2012 -0600

    Updated the is_rep function to pull reps from corp_profile.

commit 2d4548dfd769c7c54776e607bf471008e3de8f7e
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 10 13:49:44 2012 -0600

    If corp. membership doesn't have the entity, assign the default one on save.

commit 5724eebd02b1a548a9f32bd7f0004d600a46dddc
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 14:42:52 2012 -0600

    Move and rename active memberships per month.

commit 8b8acdd7eab32a4acf46a8ca352a9490d2d06567
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 14:36:44 2012 -0600

    Group the reports on the membership report list because it is getting long.

commit 42e33d89b083649ef9e46ecda76ec1a6257b0123
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 14:31:06 2012 -0600

    Add current member totals by company report.

commit 18ed09893cf2c6d0ead298ace010969281c655c4
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 13:46:58 2012 -0600

    Add current members quick list report and link it on the report list.

commit e9dc9a9ad938bca08660ecd50383051c24dd8f8d
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 13:38:10 2012 -0600

    Add a membership report list view and link it in the admin bar instead of linking to each membership report.

commit df3e125744b3e346807b1b9effd8db900ef2a4ae
Author: Alex <aragsdale@schipul.com>
Date:   Mon Dec 10 11:54:56 2012 -0600

    Current member roster report with new MembershipDefault model.

commit 83ff2be38baf1d491030a156bc71c41bb59886b9
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 7 17:31:43 2012 -0600

    Corp membership renewal and renewal confirmation.

commit 77cb0e19de0d6ef3637e0e5f438e001047b60bf3
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Dec 7 10:14:40 2012 -0600

    New model IndivMembershipRenewEntry added for corp renewal

commit 8b327358ce3db17623e702b54cc4f9c7d5603609
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 21:36:36 2012 -0600

    Added a field corp_profile_id to MembershipDefault.

    This field is used to associate memberships to CorpProfile for individual memberships under corporations.

commit 03a2baf6b732912becc5ec800165f3d069bd1e55
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 17:34:43 2012 -0600

    Update corp individual signup to reflect the db changes.

commit 84ed0d684e7c7a9f960e52a2584f9ae47386eea6
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 17:33:46 2012 -0600

    Check the existence of the approved_user before linking to it's profile.

commit ced75f354f268e42ffe417011cfb9a6707e98c0e
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 17:30:07 2012 -0600

    Updated the spawn_username to exclude the first argument because it's the profile class.

commit 87858992cdb07a845edf3b59058293f43b038c88
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 16:14:01 2012 -0600

    Update corp. memb. approval to reflect the db change.

commit d90c0675be063b9b23a14ad43aeedfc84ba9828b
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 16:09:45 2012 -0600

    Update corp. memo. search and delete to reflect the db change.

commit bd4db653865278afef85f254c12de3716278ec9e
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 15:31:55 2012 -0600

    Update the corp. memb. view page to reflect the db changes.

commit 6f12a383ac9ccbb50d5befd443b792207039b8aa
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 14:43:36 2012 -0600

    Update corp membership edit to reflect the change of db structure.

commit 1b421ca299327b77890d01cb0d1bd37218df55c9
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 14:26:54 2012 -0600

    Update corp membership add to reflect the change of db structure.

commit 029c8d05bd17040bc44e3aab428d8243075a6213
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 12:04:16 2012 -0600

    Update corp app preview to reflect the change of db structure.

commit 5e04c19adaeb8207f4c901905dbda04dc8cbfabe
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 10:39:40 2012 -0600

    Add the secret_code field to the corp app fields

commit 0dd18c42e2d8d3ce620b7ca152d1cb1b4b2d2128
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Dec 6 10:23:12 2012 -0600

    New model CorpProfile to store corporate profile information and serve as foreign key for corporate memberships.

commit 2222b475bc46a9bf08f32b583e0ae82bca499a5d
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 5 16:43:26 2012 -0600

    Corp memberships update

commit 82a3f6903bb2a00ad1b7fde17944c4c777cd83b5
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 5 15:18:50 2012 -0600

    Added the link on view and search pages for individuals to join under the corporation.

commit 85cfbc441ce538223e279bf73843694c4c618f34
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 5 14:54:08 2012 -0600

    Avoid payment_method.is_online to be evaluated when payment_method is None.

commit 2068bd0a8a0df511432ba5c4d5cbdc2ce2259588
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 5 14:22:02 2012 -0600

    Updated the membership type choices to display the one associated with corp membership for corp. individuals.

commit bd9e1541b2f9a20adb59b41580c5444d3ff728b2
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Dec 5 13:05:27 2012 -0600

    Individuals join under corporations.

commit 3caad610c0ac1a9657711e75678f0431d8c0f04d
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 16:42:35 2012 -0600

    Added the IndivEmailVerification model to store the data for individual email verifications.

commit d4f4c87334f02ab72c51f2eeaef3dae37445b41b
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 13:44:48 2012 -0600

    Remove blank fields from corp. memb. view.

commit ad26f39fa51a2454af292e7ac9e402e54b389dbd
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 12:34:45 2012 -0600

    Update urls in the corp. memb. notifications.

commit cb8afe5a4d04efd8fe3ccb76470da37d57c5c8fd
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 12:24:04 2012 -0600

    Corp. Memb. approve.

commit c1080916967c89bd313415b152167a424a46369b
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 11:34:28 2012 -0600

    Update corp. memb. view to better display date and None field value.

commit 36d0ad2f67de61a1e747397e5ca298e097eb26d3
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 11:30:15 2012 -0600

    Corp Membership delete

commit 72eaa5b670595fb90d79d3fdf1968b4b9726c49b
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 10:58:13 2012 -0600

    Corp membership search.

commit 5d070458150618834b391179a97400ea905b45c2
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Dec 4 09:24:33 2012 -0600

    Corp. membership view.

commit 4cd9469ca3e464c838a8a0f7fc58ea5a2509d96b
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Dec 3 16:26:12 2012 -0600

    Corporate membership edit submission.

commit c1d77b78748e56395912fd551374c0b17c1b35de
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 30 10:28:08 2012 -0600

    Corporate membership edit.

commit b9cc3da63656cde68a15f36ce262437bd25e5df3
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 30 12:07:11 2012 -0600

    Updated the list of initial fields and attributes when creating a membership application form.

commit 1fa2c6492af1676af564da2738ff579498d942c8
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 18:30:46 2012 -0600

    Updated the UserForm.__init__ instance method to use the password widget on the password field.

commit fe2cfc5340ef9618812ac98fc5c56c7fdbeb0852
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 16:58:21 2012 -0600

    Refactoring MembershipDefault2Form.save instance model.

commit 0ae56591bb99c9368dc56cc919dd0666424f94b3
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 16:35:55 2012 -0600

    Updated the MemershipDefault2Form.save instance method.  Removing an else statement that handles edit.  This form is only used for adding memberships.

commit 24c2edcaa2f27fec22d1639e6c6fda48abd66b5b
Merge: 86dede4 371d734
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 15:24:35 2012 -0600

    Merge branch 'refs/heads/master' into membership_default

    Conflicts:
    	tendenci/core/base/fields.py

commit 86dede44032e8d0dc96c9d77b1a4e1a8ef11f2d7
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 29 13:24:23 2012 -0600

    Data migration to add permission for view_corpmembership.

commit 6503a391a6fa2264a0f8107d7a1168d9e6d385a9
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 29 12:56:24 2012 -0600

    Update join notifications to make them work with the new corp memberships.

commit 86f9d089a9cb528a66e580f88afd9ce66a911f8d
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 29 12:55:00 2012 -0600

    Make payment method not required for free corporate membership types.

commit fc3cd67341eb47e6cb27361273d69bf5981fed80
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 29 12:53:46 2012 -0600

    CorpMembershipApp custom manager function current_app to get the app being used currently.

commit bf953987137eadb35e174f2170797704a015dadf
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 29 11:17:15 2012 -0600

    Corporate membership add.

commit 84a15b80b0c02b7b0c85b9424428fcd307954550
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:12:18 2012 -0600

    Updating the membership_default_preview view [method] to process form information.

commit 84c6dcc93fce71fe9d7eab9d7a1b2c3b1705c5c6
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:09:54 2012 -0600

    Created MembershipDefault.is_paid_online instance method.  This method checks if the online payment method was selected and whether there is a total to pay.

commit 8a1fea890b628d478c3ab7fe9ad128aae28663dd
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:08:38 2012 -0600

    Updated MembershipDefault.set_expire_dt instance method to check application_approved field before changing values.

commit d33263d63906c8ce2e58876cad83903707bf9711
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:05:12 2012 -0600

    Updated MembershipDefault.set_renew_dt instance method check application_approved before making changes.

commit 11e3aa0b701cfa161f94bc7d367e42f27b3f483e
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:02:34 2012 -0600

    Updated MembershipDefault.get_price instance method to to consider a NoneType admin_fee field.

commit 2ff7e8308372ca2b68f7b76d20ac2ccfb6251b01
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:00:30 2012 -0600

    Added MembershipDefault.pend instance method.

commit 825e37f4c26efd7593d48446acf83009a6220b4d
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 11:00:10 2012 -0600

    PEP8 CSVForm

commit c8170f41a42e1380c5090dccde6d316d38c8dbee
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 10:59:50 2012 -0600

    Replaced MembershipDefault2Form.save instance method.

commit 9ece0963d1bc73e1585424b31c867fd4593db8fb
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 10:54:59 2012 -0600

    Replaced memberships/ProfileForm.save instance method.

commit ee43a3de1e38cf75a18a45572dd9113a786565eb
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 29 08:51:58 2012 -0600

    Updated the UserForm with a clean and save method.

commit 42369eaf5de2a3d96135e51d9200defc097296c1
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 17:20:04 2012 -0600

    Removing commented out fields from the MembershipDefaultForm.

commit 42f90b478005a711f06ff25e1b1598fdcc5bf50f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 16:54:50 2012 -0600

    Updated membership view calls via the admin interface by passing the request.user.

commit 5708c5362de6a68b9bdfa8c64be14f3966a390fe
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 16:54:10 2012 -0600

    Updated Profile.get_or_create_user to update email address if passed as parameter.

commit 2f4d41a4f421a8ad1cd55d69cbd99fde3b0984b9
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 16:53:12 2012 -0600

    Updated the profile __unicode__ method to only return a username if the user object is available.

commit 757687c956fc82b42f7e5c14368a56a2c264b51e
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 16:45:35 2012 -0600

    Updated the profile view page to show different membership records depending on who the end-user is.

commit 4c3bd1564753d9f0e4483dd840e644a36bff18f0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 13:07:33 2012 -0600

    PEP8 on notifications/utils.py

commit 55e28b861b942ac837d45d21cf6f8c867db0dfd3
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 28 13:07:11 2012 -0600

    Added 2 new class methods to Profile.  Profile.spawn_username and Profile.get_or_create_user.

commit 4f3064d70d53671c4fd9242139dfc60417c00691
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 27 17:21:38 2012 -0600

    Remove unnecessary code.

commit ac41ff3ad1597490134a05eb8787e83e6ffc9997
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 27 17:21:20 2012 -0600

    Update default for admin_only field.

commit 4a88eb6ebf3e6faf66fed2d8a9d941bfe147c9c0
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 27 16:45:27 2012 -0600

    Added authentication_method field to the corp admin fieldsets.

commit 967274e341e8e6841adb84b48c4dbdceef6306c1
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 27 16:34:15 2012 -0600

    Rebuild schema migration for corp. membership. Added corp. memb. app preview.

commit c015376d80c91e8dff9a2a95af5df8d58a1cba20
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 27 12:08:24 2012 -0600

    Corporate membership app builder.

commit e7cffde3aa8b874cb8cb7b09e611eb168806ee21
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 26 18:31:00 2012 -0600

    Update model CorpMembershipAppField.

commit 3a057c17da07a17597b3df9be707f937bd452267
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 26 17:41:10 2012 -0600

    Added models CorpMembershipApp and CorpMembershipAppField.

commit 8b1e35c34aa0830533a3be416fbe6b06305e9cb1
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 26 16:55:36 2012 -0600

    Added CorpMembership model.

commit 32a6fd75613709246da7deeaaadf56c247b07343
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 26 11:41:14 2012 -0600

    Integrating membership app to membership add.

commit 62745967f7e07b5042c46f30940f89738aa3f0dc
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:07:40 2012 -0600

    Updated text on membership stats report.

commit 2c3c82b9b150cbfb930e728747f247292d75b902
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:07:24 2012 -0600

    Removed extra stylesheet link to reports.css from membership over time report.

commit 0c46979921ec16a9b922b281506f1d3d50b0cbd6
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:06:51 2012 -0600

    Updated the expired memberships report to work with the MembershipDefault model.

commit 165031759308d7c607b89e7a04b00cfc9920b91f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:05:48 2012 -0600

    Updated the active memberships report to work with the MembershipDefault model.

commit 170fffb07f5b6724271b5b38ec3254a09da17447
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:04:12 2012 -0600

    Updated the reports.css with several styles regarding membership reports.

commit df559528d4207494bfef88452711a61a89efd9f0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:03:38 2012 -0600

    Updated reports/base.html to use STATIC_URL context variable.  This allows us to pull our reports.css from S3.

commit 16b41c19e55806de2b6187fb478436bee07e120d
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:02:48 2012 -0600

    Updated count_active_memberships function to work with MembershipDefault model.

commit b57bc406361872788942073a4a601f0c0679a7a0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:02:24 2012 -0600

    Updated get_over_time_stats function to work with MembershipDefault model.

commit 63b1a81bd7db08cc3552fda7a77cc6613ef88cb0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 16:01:59 2012 -0600

    Updated get_membership_stats function to work with MembershipDefault model.

commit 1a4146024ad94d3dcc7a1dd2302be9a2ac304316
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 15:59:32 2012 -0600

    Updated function get_user to return a User object or NoneType object without relying on exceptions.

commit 7a3562fc07b25f35abbd03cdde01d4b7bd6def2b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 15:57:42 2012 -0600

    Updated MembershipDefault.get_invoice instance method to get invoice or NoneType object without using relying on exceptions.

commit 84abff11748b85d1f5fd39ebd1e879e337db8da5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 20 15:56:21 2012 -0600

    Added a new manager instance method MembershipDefaultManger.expired.

commit bf7a4c967d717d38b21b0915ec5bc91b4851bc36
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 19 23:15:26 2012 -0600

    Hide payment method if all membership types are free.

commit 3251ea4b25c3ef34f0f5a1f6a8d47ae9993f2583
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 19 18:14:50 2012 -0600

    Remove the irrelevant help_text for the groups field.

    Also, set the list-style-type to none for some radio select and checkbox fields.

commit e935643874cf8cd15da9f7d51c3cc36348be069e
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 19 17:49:55 2012 -0600

    Added the groups field to the MembershipDefault.

commit 03e846106dd5b1711916f76f53b1d68416a92ce8
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 19 16:53:26 2012 -0600

    Update membershipapp preview for membership_type, payment_method, status_detail and corporate_membership.

commit 4f989e7eb9dacd7599533a5aa1550970f0b08055
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 16:05:13 2012 -0600

    Updated NoticeAdmin reference to context variables.

commit 7539b71ced75ffceb4331901df53004c78002810
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 16:04:50 2012 -0600

    Passed the membership object to the Notification.send_emails instance method.

commit ee925c21ed22a60e685a116ee800b48d213515b5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 16:03:46 2012 -0600

    Moved the notification import on  Membership/models.py.

commit ecc6e92a34b678eddc2306b10b89c13e58ec22fc
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 16:03:09 2012 -0600

    Updated membership notice context variables.

commit 5f50a80a06e40f0b5f5eabbb45aa1c35ad78041c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 15:58:17 2012 -0600

    Added MembershipDefault.get_absolute_url instance method.

commit 058cfcc07f77bb30a1bd2fe9afb56f6fdd59d4fb
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 19 15:57:36 2012 -0600

    Added 'send email' feature to admin membership detail form.

commit 81807d6a9fda5012637a4b3a4900d13e2d770e89
Author: Jenny Qian <jqian@schipul.com>
Date:   Sun Nov 18 22:53:06 2012 -0600

    Added membership application preview.

commit 9e26b96795cb5b81f14ac2a2d1d430c3afccf9bc
Author: Jenny Qian <jqian@schipul.com>
Date:   Sat Nov 17 22:03:49 2012 -0600

    Remove test code.

commit 9e6faa4df9f120136c7c59a31f0299e86da5a39a
Author: Jenny Qian <jqian@schipul.com>
Date:   Sat Nov 17 22:01:04 2012 -0600

    Remove unnecessary list.

commit c04882c572666cbde634fa3f4c55cac129c4f741
Author: Jenny Qian <jqian@schipul.com>
Date:   Sat Nov 17 18:15:17 2012 -0600

    Updated the pagination for the membership import preview.

commit 8e2e0409a3755366cc0ce3069e94fcaa8edccc94
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 16 18:57:01 2012 -0600

    Cleanup username to remove the stuff not in the username pattern.

commit c980d301102ba04c70bbc15c50b3f5d5c31de9e4
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 16 17:56:54 2012 -0600

    Update import to put csv data parse in the background process.

commit 32214a60b95b53073a2fd7d6479a1990001098ae
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 16 17:54:57 2012 -0600

    Add model MembershipImportData to dump the data so it can be more efficient on import preview and processing pages.

commit e0b5b3e1c662a8705604c9cd5d354d3f545af4dc
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 16 11:29:05 2012 -0600

    Put upload file in it's own directory to avoid overriding the existing one.

commit 6ff7230fdf68790b2be8b1693716feb56b23cd88
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 22:42:04 2012 -0600

    Invalidate johnny cache on membership import.

commit b212379b42a539d7402fb4a888ee3b5ce29e8dc7
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 16:19:10 2012 -0600

    Added a "search members" link from the DjangoDefaultAdmin list page.

commit 79147b848422ace5c48850f805180b5edcf3fdb7
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 12:51:56 2012 -0600

    Updated membership admin templates to work without entries.

commit 3d69ed5e55934d418d8631bd3953de8b76136748
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 12:24:29 2012 -0600

    Updated the membership application templates for superusers.

commit b0761cf71d31964f79efaf8470516b171907087b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 12:07:23 2012 -0600

    Updated the MembershipDefaultForm to send approval email if approved.

commit 80a5f58d8c0c3144b1798290a0b5458c49b5f789
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 11:50:24 2012 -0600

    Updated the MembershipDefaultAdmin actions on the list page to send an email to both members and administrators when an action is applied to a membership.

commit 00df092404c7199cb3d21336714a98833cd36aab
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 11:49:29 2012 -0600

    Added [convenience instance method] MembershipDefault.send_email that sends typical membership emails. Requires the request object and notice_type string.

commit 49a6316d35d954e74019e0f777a5588858b0030d
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 11:24:00 2012 -0600

    Updated the membership disapprove notification template. Now it's the same as the other membership notification templates.

commit 5d4372bb842fa77a728e4a834b8bf3ca9c278b50
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 16 11:20:27 2012 -0600

    Updated the Notice model to work with the MembershipDefault model instead of the original Membership model.

commit b96c6ba5f56c803172cfaee075d4bbe706f53902
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 17:01:58 2012 -0600

    Reduce the item numbers per page to 10 on import preview.

commit aac790bf3b4c9d75c67fcb59498dee4714f2a740
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 15 16:31:12 2012 -0600

    Changed verbose_name of MembershipDefault model.

commit 88cca6074ed2fa53518a88b704bbeef398ee3a05
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 16:08:45 2012 -0600

    Management command to check the encoding of the uploaded file. The encoding process is put in the background to prevent the timeout.

commit 304e1e5fb5ee3bb68ae93ed08a819b4dd0e5ec56
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 15 16:03:22 2012 -0600

    Updated the membership default application template.  Reformatted the way non field errors and field errors display.

commit b029dcace7b6f449c5727128382ab3ee54958314
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 15 16:00:35 2012 -0600

    Overrode the MembershipDefaultForm.clean instance method that validates username and password if they're submitted.

commit 546cf0181cf113b19c4afa5f3f67a667221137f5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Thu Nov 15 15:59:40 2012 -0600

    Updated the MembershipDefault.get_or_create_user instance method to accept username and password.  It attempts to find the user via username and only uses the password when creating an account.

commit e555e2a45875606cfcd1cf5c59b0edabea95cc07
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 11:58:10 2012 -0600

    Process encoding one chunk at a time.

commit 23cc04c3de5f2c2198ac8be35030d5ce1a13b1bf
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 08:52:32 2012 -0600

    Convert uploaded file to utf8 before importing.

commit a2a98833f92797df8b4e47a26786a54ff3e0cba4
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 15 08:49:34 2012 -0600

    Add chardet to setup.

commit 7d2ce656650d054c6e05d37e6548264d038bece5
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 14 18:16:55 2012 -0600

    Check the uniqueness of username on update.

commit fd45e8ff72b46f419cfe9fb96c89cc4c8aa88b36
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 16:39:24 2012 -0600

    Updated membership porting command to get payment method from entry if membership does not exist in original system.

commit 92dbba62f4fe7a64057be0bc1d6639d2c94f2297
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 16:26:19 2012 -0600

    Updated profile to use "hide" settings.  (e.g. hide_email, hide_phone, hide_address)

commit f5fc2cf568e4e3e8acc5050eabad512f8470e598
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 14 16:17:58 2012 -0600

    Assign profile status=True and status_detail=active if blank.

commit f6b219aba475affd71c834bdbee7f3270411acab
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 15:55:46 2012 -0600

    Excluding search results if a person's profile is requesting to be removed from search.

commit 0a364f9fa0df01333ea4d780fcec24f53994cba7
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 15:54:52 2012 -0600

    PEP8 profiles/urls.py

commit b355365775f5d80093bf085453645b9881958595
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 14 15:31:34 2012 -0600

    Test for blank status.

commit a581f0f52f2caa90b13d3fd5b90219bc73db5435
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 15:16:52 2012 -0600

    Added link to profile from membership default change_form page.

commit 6b49e58f8c393d0a68a8df14c4e86df9d769c26a
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 14 15:09:55 2012 -0600

    Correct datetime assignment.

commit 352356ccecfcda5e0c6b9750aaaad1144f2e8798
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 14:59:40 2012 -0600

    Adding depends_on for industries and regions on memberships

commit 5d27f10eb3cb080da9469e6d7f5efbcfbd099820
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 14:59:10 2012 -0600

    Add invalidation for login to prevent new users from experiencing login issues.

commit 1c27841796c1a573652ff3fbe7818f2181343ece
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 13:36:07 2012 -0600

    Updating exception handling on member imports.

commit 25a8089b62c928053c78ec630788b7884f7f8245
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 13:11:16 2012 -0600

    Resorted actions list on MembershipDefault admin page.

commit 57f3254b37ba77bcaadbee39df254886cf22ea0e
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 12:51:12 2012 -0600

    Added disapprove action and link on MembershipDefault admin side.

commit 4dc6e9771f071a1492aa3ebb43bc8e2b649696ca
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 12:42:14 2012 -0600

    Updated MembershipDefault instance methods (e.g. approve, renew, expired) to accept the request_user.

commit b1e0636bae34852931a5a9c6f907a3cbe5f0a45f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 12:31:34 2012 -0600

    Updated redirects on on custom admin pages.

commit 19b08383cec1849be6ea782d42be9858cf9c5232
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 12:31:13 2012 -0600

    Updated misspelling on admin:membership url.

commit f9a8e0ae69f6d39b49c347ae820d683f420b147a
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 11:12:53 2012 -0600

    Created MembershipDefault.disapprove method that works with new MembershipDefault fields.

commit 57c39bfb27be4b32301d0267439d190566ecc652
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 14 10:48:15 2012 -0600

    Add reporting options block on the membership admin index page.

commit c366e33a1dca37ed0f323bbf94c9d85f936862b5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 10:45:40 2012 -0600

    Optimized action options on MembershipDefault admin page to only query specific memberships when applying actions.

commit 08c5a3569dccc68c3df219b9540219d991f7ba10
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 10:44:54 2012 -0600

    Updated Membership instance methods (e.g. approve, renew, and expire) to avoid memberships of certain a status.

commit eba815a9fe8ca85482f60c41cc36efb5550f5705
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 10:25:21 2012 -0600

    Added filter for user__is_active when filtering members in search

commit b80dde557225d5c8117870f50cd40c1c0a35012b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Wed Nov 14 10:03:17 2012 -0600

    Updating the membership porting command to use guid for matching if a membership record is available, else use create_dt and membership_type.

commit 2fe4217bc64631f555c7cd82e5e454685f21622d
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 09:36:54 2012 -0600

    Updated output on member number command.

commit 670473049c2c1e19e1a2584fff5d6697aa39e010
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Wed Nov 14 09:15:27 2012 -0600

    Updated the refresh_member_number method on the profiles.

commit 2041caedf1a070487abf38becb7683e10c3ea7a8
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 22:32:33 2012 -0600

    Add some section breaks to the app fields list.

commit 1a71ff12dc5f365145e878a65c4fef0fe3ba005a
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 18:28:54 2012 -0600

    Pre-populate slug from name. Split permissions into two sections.

commit 44ce8aa715c93bc2ddee3d35b1ca6c59229f01fd
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 18:08:48 2012 -0600

    Remove the add another field option from the form.

commit 2cd10e89e699bf1c1f770507cf1c4a3d2976ba3d
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 18:07:57 2012 -0600

    Show cursor only on the last column.

commit 8e67af4e5b1aee3ea4ec3b43d5387e77419f2bc3
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 17:57:07 2012 -0600

    Correct payment_method typo.

commit 24075f6d82ac9b39f533b95f86a35c0b0633d35d
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 17:55:02 2012 -0600

    Enable sorting for app fields.

commit 769ef8f78e1cdc88bd2d7ab3b720a3344b6aa8e2
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 17:13:51 2012 -0600

    Membership App admin backend (for membership_default).

commit ea40bd1c6174d6ba89a134e19db46811b9ca5ebc
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 12:47:32 2012 -0600

    Add field display to the membershipappfield.

commit ab6f6728785b79e061680c664e357bd485ff24a2
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 13 12:26:34 2012 -0600

    Membership app admin. Remove the field app_field_selection.

commit 2f823a977f09eb6a24e549fc39850253bffea903
Author: Jenny Qian <jqian@schipul.com>
Date:   Sun Nov 11 20:33:25 2012 -0600

    Added models MembershipApp and MembershipAppField.

commit d57d48a04be55fd2ecac6c08ba2a50a5dec30e39
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:42:17 2012 -0600

    Added 'renew' and 'expire' options to membership admin list page.

commit 93a3526bdfe32afd2337e646665d9146e75991c8
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:31:11 2012 -0600

    Adding links to MembershipDefaultAdmin change page to approve, renew, and expire.

commit 466963e7a7cd501147c2b2706ee3e7fb38b4e865
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:30:41 2012 -0600

    Added urls to MembershipDefaultAdmin end that will approve, renew, and expire memberships.

commit 99011e6907efe7b1eb0e47475ab682a55ee99564
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:30:07 2012 -0600

    Using new MembershipDefault.approve instance method in approve option on admin page.

commit 6fef351f4cdc5432c917f88c3684290f0ac038d7
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:28:37 2012 -0600

    Corrected spelling 'membership' in document string.

commit 747a12938205875afe091797f064938d024a99e8
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:28:11 2012 -0600

    Using extra field that came from old model Membership.application_approved when calculating whether MembershipDefault is approved.

commit 104a486be0c450f08000eef866bb8ed8086745e9
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 16:25:24 2012 -0600

    Created instance methods copy, renew, and expire.

commit 57c35691b44f9183a327715b80d640a430c4617c
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Tue Nov 13 15:44:14 2012 -0600

    Revert "Squashed commit of the following: Adding 404 reporting"

    This reverts commit 2c09530354c0d2756eda289aaedc759585841ed0.

commit 2c09530354c0d2756eda289aaedc759585841ed0
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Tue Nov 13 15:14:18 2012 -0600

    Squashed commit of the following: Adding 404 reporting

    commit fffede8520887da8efba19dbf6c4f949f2f130b5
    Author: John Eddie Ayson <je@bixly.com>
    Date:   Tue Nov 6 16:41:28 2012 +0800

        added 404 reports

commit d57631bb680bcf739e2b18a4f03ed754ce6c95ce
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 12:24:08 2012 -0600

    Updated porting membership script.  If a membership type cannot be found, skip the porting of the membership record.

commit 08f36b238696f956b45b97fb5330e166ad567d52
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 11:55:02 2012 -0600

    Saved membership record before saving invoice.  A membership type has to be associated before getting a price.

commit 7385f2440455064d8844d8e495988291356bd9af
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 11:34:30 2012 -0600

    Updated membership porting script to save membership record first, then save user to group.  User is referenced via membership record, this means the membership record has to exist in the database first.

commit 9b5f404605d77e09178f9c082258740a00d7134f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 10:29:02 2012 -0600

    Updated membership porting management command to properly identify when a membership record is created and when it's updated.

commit 47e6c2f1ff0f82a9319d8831443a166ebcf5f76f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 10:28:01 2012 -0600

    Included membership type as column in MembershipDefault admin page.

commit 8b8d33d9f210e1328d23dea1e368c4fd1f764c87
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 13 10:27:38 2012 -0600

    Excluding memberships that are active and expired from being re-approved.

commit ddaba83ef3fc32816ad40b9513acc1c826946ea8
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 16:53:24 2012 -0600

    Overrode change_form.html for MembershipDefault admin page.

commit b231df12a02a8aa00ce5267071f3e26dd2163b7c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 15:29:02 2012 -0600

    Updated MembershipDefault.set_join_dt instance method to use MembershipDefault.application_approved_dt field.

commit 3ff49c3be67212505167b0de4b46b8ce908a7046
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 15:28:25 2012 -0600

    Sorted MembershipDefault admin page with most recently approved memberships on top.

commit c530e508057e2b0c18e61e6b9df1a5e6c2da5a5a
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 15:27:57 2012 -0600

    Removed the create date time column and added the approved date time column on the MembershipDefault admin page.

commit daa51dbe5f7a2822f7500007674f968994ca39c1
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 15:27:22 2012 -0600

    Added actions to MembershipDefault admin page that approves memberships.

commit e2d72c426f174cc4094a88d32dc9a362e4a18a59
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 15:26:30 2012 -0600

    Removed unused methods from MembershipDefaultAdmin model.

commit 599442a2882c9927af37fc3c96d3849dbcb08e24
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 14:22:52 2012 -0600

    Sorting MembershipDefault admin page by create date time.  With newest created item first.

commit 79426c4b7010523bb9c91c41d2e821a0acafcb45
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 14:22:18 2012 -0600

    Combined first and last name to create name column on MembershipDefault admin page.

commit c63af70435dcf0192e2110e44e7774c6e0d0f167
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 13:02:55 2012 -0600

    Updated MembershipDefaultAdmin.queryset instance method to exclude 'inactive' and 'archived' memberships.

commit def994077c5f48b01da015bb0dc53ef4c8ddf250
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:54:18 2012 -0600

    Added 'status' column on MembershipDefault admin page.

commit 051bfb8f04d01b492957e19f41ea071eb3640dd4
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:15:46 2012 -0600

    Updated membership management command that ports membership data from old membership structure to new membership structure.

commit ced2ed41f8b0384de69265bf531a7408e2d879d9
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:14:45 2012 -0600

    Updated calls to m dictionary when retrieving key 'membershiptype' in membership importer methods.

commit ce1a4f46e1b658a20db60bfab0bc8fc59dfa75ed
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:13:23 2012 -0600

    Made MembershipDefaultManager.

commit 6a22e166550f317f45e0031fb9b952b0f5448d2f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:12:56 2012 -0600

    Updated document string on MembershipDefault.qs_membership instance method.

commit 67ec59d941d67938b2a1defbcbcf46a2dc4d30c2
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:12:04 2012 -0600

    Replaced call from profile.can_renew to profile.can_renew2 in order to use MembershipDefault model instead of Membership model.

commit dd88406c686861aa003bb9536b3917609d4fd89c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:10:36 2012 -0600

    Added Profile.can_renew2 instance method.  Uses MembershipDefault model instead of Membership model.

commit 75721eefc731f77fd3f7e405f8697a06b51497bb
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:09:47 2012 -0600

    Added MembershipDefault.get_renewal_period_dt instance method.

commit 961908c1d484c47983b2133e87a2100af33f00db
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:08:49 2012 -0600

    Added manager to MembershipDefault model.

commit 5c10dd2b5e833b2826feaffc3654dbd6ab39fbd5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:07:43 2012 -0600

    Added EntityManager.first class method.  Returns object or NoneType object without using exceptions.

commit 3d6e13974763d7f155d2de23e972c735e5b1d2d5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:07:21 2012 -0600

    Updated InvoiceManager.first class method.  Returns object or NoneType object without using exceptions.

commit c6aba276590151cd570c9fdbdefe1eb6ff1a7a99
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 12:06:52 2012 -0600

    Updated TendenciBaseManager.first class method.  Returns object or NoneType object without raising exceptions.

commit ab42792b26725130d4e0aa87b0e08b2bd2e28b5c
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 12 09:26:27 2012 -0600

    Updated the membership confirmation page.  Reference the profile object instead of the user object.

commit 19f03fd5762af74d4cfad599da4c1f4bc4cf6912
Author: Alex <aragsdale@schipul.com>
Date:   Fri Nov 9 16:25:10 2012 -0600

    Jobs: add comma missing in get_approve_url.

commit 39768be742f60ac3b770d1c626500b8d26c950f7
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Fri Nov 9 14:53:04 2012 -0600

    Squashed commit of the following: Updated the options for the password reset.

    commit d896780ccef5cadc5e9f43bcb1de9e692679149c
    Author: Alex <aragsdale@schipul.com>
    Date:   Wed Nov 7 17:06:51 2012 -0600

        Change text on go back to registration link.

    commit 8737c1df49e460c902e875fd78c54f9dde0459a7
    Author: John Eddie Ayson <je@bixly.com>
    Date:   Tue Nov 6 17:14:45 2012 +0800

        added fix

    commit 06b26f4db8def4119535c43d222c11ff6d601a02
    Merge: b41af5d 6aace6c
    Author: John Eddie Ayson <je@bixly.com>
    Date:   Wed Oct 31 16:45:20 2012 +0800

        Merge branch 'master' into 390_prompt_password_reset

    commit b41af5df481c4b93dd898ff738fbf04b11c7bbee
    Author: John Eddie Ayson <je@bixly.com>
    Date:   Wed Oct 31 16:44:38 2012 +0800

        added prompt for password reset

commit c87e4c2f2d6a864352c87fa50c68ea7f0883d0e6
Author: jmoswalt <jmoswalt@gmail.com>
Date:   Fri Nov 9 11:34:58 2012 -0600

    Adding data migration for payment methods to add the initial methods.

commit 05b5515e8ee9ee4e194c38a93e6c25c69213e18e
Author: Alex <aragsdale@schipul.com>
Date:   Fri Nov 9 11:17:41 2012 -0600

    Events: remove option to use different custom reg forms for different pricings.

commit af7f62c54a814b03280eb6d958058399aba3bd52
Merge: 15394e0 c938df9
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 9 11:03:32 2012 -0600

    Merge branch 'refs/heads/master' into membership_default

    Conflicts:
    	tendenci/settings.py

commit 15394e0bf4724fb25246fcf1cc8839075ef1ab55
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 9 11:01:50 2012 -0600

    Added access to the original membership application.  This is required for import memberships to the original system.

commit 099ffc891a4e1565044551c134711f5282991be5
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 9 10:28:37 2012 -0600

    Initial creation of management command that ports data from our current Membership/Entries tables to our new MembershipDefault/Profile tables.

commit 91db5a1ccdb059965d53c3b30a23cb1622483848
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 9 10:24:25 2012 -0600

    Wrap password_required decorator to the import for the security check.

commit b71c31b63bf3c61d1d5e5c452ac62e133e5d1f9a
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 9 10:10:45 2012 -0600

    Update the way of processing membership_type.

commit 18d1d95c47c71a49d83f24556b58be32f7ce274a
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 8 22:41:37 2012 -0600

    Handle T4 timezone.

commit c891d25601da5e9ba386cb3862f70570b8501186
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 8 17:25:48 2012 -0600

    Exclude user from the profile fields.

commit 37a4cccf42fca1fac4901c42aa370ca34442b183
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 8 17:05:48 2012 -0600

    Allow payment_method to be null.

commit 8ddba7e916c40e080e6860c5107617b64360ce26
Author: Jenny Qian <jqian@schipul.com>
Date:   Thu Nov 8 17:03:08 2012 -0600

    Update membership_default import.

commit 8a8f6257f316aea8a0481adf2c9cb035bcffa6d6
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 7 23:04:34 2012 -0600

    Log an event for import

commit c509bb5dd5e18d5eb08624673c79f205f6cf8874
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 7 22:58:22 2012 -0600

    Update membership_default import

commit 86269df0651d70417feb808edfb90f09449b2e3f
Author: Jenny Qian <jqian@schipul.com>
Date:   Wed Nov 7 09:23:41 2012 -0600

    Import instruction update.

commit 138f3153de99f3e65ab04e944800045f5f6942bf
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 21:09:16 2012 -0600

    Force integer to the foreignkey value before querying db.

commit fa9d806c021763d2942894cc8bbe5e508257cbc0
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 17:50:23 2012 -0600

    Correct a typo

commit 2112ed38627970e0bfecfbf16f919cd831055892
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 17:40:41 2012 -0600

    Added methods to MembershipDefault model that help create accounting entries when an invoice is created.

commit 44a4179f1d7ed82c72af7a58ca67ec51b2cd9953
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 17:39:21 2012 -0600

    Increase width for import-settings.

commit bf59faa48154fc2613c23526e095f7e2ce976911
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 17:38:27 2012 -0600

    Added method MembershipDefault.auto_update_paid_object.  This method updates the membership record once the end-user returns from the payment gateway.

commit 5a80356de0993c21a9fa0ca698cff2967e1c702b
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 17:24:31 2012 -0600

    Trap errors in the management command import_membership_defaults

commit 3c42f4b14928465dd5a8deb0d04d28a9255efb01
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 16:27:09 2012 -0600

    Update upload page.

commit 1cbc809d3e0b320fa9520730524a5107a8134c6c
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 16:05:38 2012 -0600

    Display the list of foreign keys.

commit d6f3495df0ef4d71b195ec1a6b5cf7244328e95d
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 15:05:28 2012 -0600

    Add instruction for spreadsheet preparation.

commit 6a76f773758341ad99ce41e9ab8d0f69b9d33de3
Author: Jenny Qian <jqian@schipul.com>
Date:   Tue Nov 6 14:10:54 2012 -0600

    Update the way of cleanning up the import data.

commit c8252ac2dc54d29f49a907ac078fa0cceb9b4654
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 16:35:56 2012 -0600

    Added extra methods to MembershipDefault model to help detect renewal period.  Updated logic on profile page to display renewal link.  Renewal link goes to default membership application.

commit ad735e686e63e9550b42fe4c2911f02817adb83a
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 16:15:22 2012 -0600

    Updated membership links that show up on profile page to use MembershipDefault.

commit c6c0bfe8103820991bd4bb524ebf9faaabd92572
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 16:14:47 2012 -0600

    Removed commented-out MembershipDefaultForm field.  It does not exist in the Profile object.

commit 2f0b7dba1b259e6d1a2d2646f55a0f8c3518ba0e
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 15:28:38 2012 -0600

    Removed link to membership entries from user tabbed navigation.

commit e1b8abac3cf8be3617efa32489b049acbb8b161d
Merge: 975a663 d3510e2
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 15:17:53 2012 -0600

    Merge branch 'refs/heads/master' into membership_default

    Conflicts:
    	tendenci/addons/memberships/templates/memberships/nav.html
    	tendenci/addons/memberships/views.py

commit 975a663662a64f2d5c5d95c727880a0662c061de
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 13:11:36 2012 -0600

    Grouped notice URLs together.

commit 266cda511d6cdcb8c00536fed7c1931fa47bec00
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 13:06:51 2012 -0600

    Removed membership export link.  This feature does not exist with the new module yet.

commit 0a00aac8ef5afdfae4515819b59b32a47ddbff5b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 13:03:25 2012 -0600

    Removed entry and application references.

commit 9632c7728855053b2211173aabceb4e3ee13f624
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 12:42:50 2012 -0600

    Commented out URLS to membership entries that are not being reference from the new membership module.  I did not delete the lines, we can use them later to track dependents and delete both dependents and links at once.

commit e21c704600a7c310201eb059aa6faf77099bbff0
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 12:29:09 2012 -0600

    Removed pending, entries, and app link from membership navigation tab.

commit eb5d639e700851e7b4677fbf962375a1abe83286
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 12:21:29 2012 -0600

    Removed application module from admin area.  With the new updates this module is deprecated.

commit 6c97d59bd3ac35a879cade1ed686b30c28307ffd
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 09:40:09 2012 -0600

    Removed the MembershipDefault.generate_member_number field.

commit bc98aa9e430655a7d863a6ad67324b0bc416188f
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Tue Nov 6 09:32:30 2012 -0600

    Added very basic confirmation page, very little formatting.

commit 342fe7b6b94c6e494060aa989f8fed326d750535
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 5 16:05:47 2012 -0600

    Change url recurring_payments/ to rp/

commit e60ea12cc86878d409ff1add8040ebfaed1e8602
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 5 16:02:34 2012 -0600

    Updated membership confirmation page to display basic confirmation information.

commit ece22d03fa550e03aff8c7a8dad37d749e720e43
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 5 16:01:56 2012 -0600

    Added Profile.get_name method.  Calls different attributes attempting to get a user name.

commit 06f2a8f928d5baeec7098ced8b915bba2c8e3b7e
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 5 15:57:07 2012 -0600

    Updated more workflow fields on the MembershipDefault object when filling out the membership application form.

commit 69fd33eaec3174cf05b854713582d90774a60341
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Mon Nov 5 14:57:19 2012 -0600

    Updated the MembershipDefaultForm to return MembershipTypes depending on whether the profile is in renewal mode or not.

commit a254b17df88bc675a5ef606550d5055bbb5c2a54
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 2 14:57:04 2012 -0500

    Added more membership fields to default membership form.

commit fb7053bf3ca4440bf38d00d21f78874dc5e45f90
Author: Jenny Qian <jqian@schipul.com>
Date:   Mon Nov 5 14:07:41 2012 -0600

    Updated key choices for membership_default import.

commit 4801c8d3a6d947b717319a881ae4b797ed98a80d
Author: Jenny Qian <jqian@schipul.com>
Date:   Sun Nov 4 17:19:36 2012 -0600

    Move styles from templates to its own css file for membership_default import.

commit 73b76f7632fab929cf19d27ad4665b9948080fc8
Author: Jenny Qian <jqian@schipul.com>
Date:   Sun Nov 4 16:29:34 2012 -0600

    Style update for the member_default import.

commit 8979f86484cde6eceb9b929bd76b0bb873b1a982
Author: Jenny Qian <jqian@schipul.com>
Date:   Fri Nov 2 17:39:24 2012 -0500

    MembershipDefault import status page with progress bar

commit 4ce52465fbf518ba6f3f7a53f3e5addd29a0f28b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 2 14:43:28 2012 -0500

    Removed extra industry and region fields on default membership detail page.

commit 36ff0f095a9561b9af8fc9128344542c2bfdef9b
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 2 14:42:53 2012 -0500

    Updated MembershipDefaultForm logic to handle approval process and archiving process.

commit 4a9f012a3c660739f00f9e4d15b5992980b17e13
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 2 11:51:38 2012 -0500

    Set email address to required on MembershipDefaultForm and created new methods to set join dt, set renew dt, set expire dt.

commit 30c1e345e8ecb7e0f1963c29393ab3482d8e6077
Author: Eloy Zuniga Jr <eloyz.email@gmail.com>
Date:   Fri Nov 2 10:01:1…
  • Loading branch information...
1 parent e6d06d7 commit a17cf41d9222229b835c6bcf315150baf9027053 @eloyz eloyz committed Dec 20, 2012
Showing with 18,091 additions and 373 deletions.
  1. +3 −2 setup.py
  2. +6 −3 tendenci/addons/campaign_monitor/views.py
  3. 0 tendenci/addons/careers/__init__.py
  4. +46 −0 tendenci/addons/careers/admin.py
  5. +66 −0 tendenci/addons/careers/forms.py
  6. +8 −0 tendenci/addons/careers/managers.py
  7. +206 −0 tendenci/addons/careers/migrations/0001_initial.py
  8. 0 tendenci/addons/careers/migrations/__init__.py
  9. +65 −0 tendenci/addons/careers/models.py
  10. +70 −0 tendenci/addons/careers/settings.json
  11. +15 −0 tendenci/addons/careers/urls.py
  12. 0 tendenci/addons/careers/views.py
  13. +73 −15 tendenci/addons/corporate_memberships/admin.py
  14. +390 −0 tendenci/addons/corporate_memberships/forms.py
  15. +480 −0 tendenci/addons/corporate_memberships/import_processor.py
  16. +75 −0 tendenci/addons/corporate_memberships/management/commands/corp_membership_import_preprocess.py
  17. +60 −0 tendenci/addons/corporate_memberships/management/commands/import_corp_memberships.py
  18. +35 −2 tendenci/addons/corporate_memberships/managers.py
  19. +1,001 −0 ...erships/migrations/0003_auto__add_corpmembershipappfield__add_corpmembershipauthdomain__add_co.py
  20. +984 −0 tendenci/addons/corporate_memberships/migrations/0004_auto__add_indivmembershiprenewentry.py
  21. +1,026 −0 ...orate_memberships/migrations/0005_auto__add_corpmembershipimportdata__add_corpmembershipimport.py
  22. +1,000 −0 ...addons/corporate_memberships/migrations/0006_auto__add_field_corpmembershipimport_bind_members.py
  23. +904 −4 tendenci/addons/corporate_memberships/models.py
  24. +103 −0 tendenci/addons/corporate_memberships/static/css/corp-membership-import.css
  25. +9 −0 tendenci/addons/corporate_memberships/static/css/corpmemberships-admin.css
  26. +10 −0 tendenci/addons/corporate_memberships/static/css/corporate_memberships.css
  27. BIN tendenci/addons/corporate_memberships/static/images/pbar-ani.gif
  28. +29 −0 tendenci/addons/corporate_memberships/static/js/admin/corpmembershipapp_tabular_inline_ordering.js
  29. +226 −0 ...addons/corporate_memberships/templates/corporate_memberships/admin/corpmembershipapp/tabular.html
  30. +296 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/app_fields.json
  31. +131 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/add.html
  32. +37 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/add_conf.html
  33. +38 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/add_pre.html
  34. +163 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/approve.html
  35. +42 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/delete.html
  36. +119 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/edit.html
  37. +48 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/meta.html
  38. +79 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/preview.html
  39. +85 −0 ...rporate_memberships/templates/corporate_memberships/applications/render_corpmembership_field.html
  40. +67 −0 ...enci/addons/corporate_memberships/templates/corporate_memberships/applications/search-result.html
  41. +76 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/search.html
  42. +155 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/applications/view.html
  43. +182 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/imports/preview.html
  44. +143 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/imports/status.html
  45. +201 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/imports/upload.html
  46. +1 −1 tendenci/addons/corporate_memberships/templates/corporate_memberships/index.html
  47. +8 −6 ...enci/addons/corporate_memberships/templates/corporate_memberships/invoice_search_result_line.html
  48. +13 −21 tendenci/addons/corporate_memberships/templates/corporate_memberships/invoice_view_display.html
  49. +20 −21 tendenci/addons/corporate_memberships/templates/corporate_memberships/nav.html
  50. +21 −20 tendenci/addons/corporate_memberships/templates/corporate_memberships/options.html
  51. +3 −9 tendenci/addons/corporate_memberships/templates/corporate_memberships/payment_thankyou_display.html
  52. +1 −1 tendenci/addons/corporate_memberships/templates/corporate_memberships/payment_thankyou_header.html
  53. +430 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/renewal.html
  54. +38 −0 tendenci/addons/corporate_memberships/templates/corporate_memberships/renewal_conf.html
  55. +59 −16 tendenci/addons/corporate_memberships/templates/corporate_memberships/roster_search.html
  56. +1 −1 tendenci/addons/corporate_memberships/templates/corporate_memberships/search.html
  57. +2 −2 tendenci/addons/corporate_memberships/templates/notification/corp_memb_added/full.html
  58. +1 −1 tendenci/addons/corporate_memberships/templates/notification/corp_memb_added_user/full.html
  59. +1 −1 tendenci/addons/corporate_memberships/templates/notification/corp_memb_edited/full.html
  60. +3 −2 tendenci/addons/corporate_memberships/templates/notification/corp_memb_join_approved/full.html
  61. +1 −1 tendenci/addons/corporate_memberships/templates/notification/corp_memb_renewal_approved/full.html
  62. +6 −6 tendenci/addons/corporate_memberships/templates/notification/corp_memb_renewed/full.html
  63. +4 −4 tendenci/addons/corporate_memberships/templates/notification/corp_memb_renewed_user/full.html
  64. +26 −0 tendenci/addons/corporate_memberships/templatetags/corporate_memberships_tags.py
  65. +84 −20 tendenci/addons/corporate_memberships/urls.py
  66. +262 −92 tendenci/addons/corporate_memberships/utils.py
  67. +1,204 −37 tendenci/addons/corporate_memberships/views.py
  68. 0 tendenci/addons/educations/__init__.py
  69. +38 −0 tendenci/addons/educations/admin.py
  70. +58 −0 tendenci/addons/educations/forms.py
  71. +8 −0 tendenci/addons/educations/managers.py
  72. +198 −0 tendenci/addons/educations/migrations/0001_initial.py
  73. 0 tendenci/addons/educations/migrations/__init__.py
  74. +42 −0 tendenci/addons/educations/models.py
  75. +70 −0 tendenci/addons/educations/settings.json
  76. +15 −0 tendenci/addons/educations/urls.py
  77. 0 tendenci/addons/educations/views.py
  78. 0 tendenci/addons/industries/__init__.py
  79. +35 −0 tendenci/addons/industries/admin.py
  80. +30 −0 tendenci/addons/industries/app_registry.py
  81. +54 −0 tendenci/addons/industries/forms.py
  82. +8 −0 tendenci/addons/industries/managers.py
  83. +194 −0 tendenci/addons/industries/migrations/0001_initial.py
  84. 0 tendenci/addons/industries/migrations/__init__.py
  85. +38 −0 tendenci/addons/industries/models.py
  86. +70 −0 tendenci/addons/industries/settings.json
  87. +15 −0 tendenci/addons/industries/urls.py
  88. 0 tendenci/addons/industries/views.py
  89. +406 −25 tendenci/addons/memberships/admin.py
  90. +29 −2 tendenci/addons/memberships/fields.py
  91. +993 −35 tendenci/addons/memberships/forms.py
  92. +2 −2 tendenci/addons/memberships/importer/tasks.py
  93. +1 −1 tendenci/addons/memberships/importer/utils.py
  94. +53 −0 tendenci/addons/memberships/management/commands/import_membership_defaults.py
  95. +75 −0 tendenci/addons/memberships/management/commands/membership_import_preprocess.py
  96. +280 −0 tendenci/addons/memberships/management/commands/port_to_membership_default.py
  97. +5 −2 tendenci/addons/memberships/management/commands/refresh_profile_member_numbers.py
  98. +42 −4 tendenci/addons/memberships/managers.py
  99. +154 −14 ...to__chg_field_membershipimport_creator.py → 0003_auto__add_field_membershipimport_upload_file.py}
  100. +593 −0 tendenci/addons/memberships/migrations/0004_auto__chg_field_membershipimport_app.py
  101. +622 −0 ...erships/migrations/0005_auto__add_field_membershipimport_total_rows__add_field_membershipimpor.py
  102. +763 −0 tendenci/addons/memberships/migrations/0006_auto__add_membershipdefault.py
  103. +793 −0 tendenci/addons/memberships/migrations/0007_auto__add_membershipappfield__add_membershipapp.py
  104. +725 −0 tendenci/addons/memberships/migrations/0008_auto__add_field_membershipappfield_display.py
  105. +741 −0 tendenci/addons/memberships/migrations/0009_auto__add_membershipimportdata.py
Sorry, we could not display the entire diff because it was too big.
View
5 setup.py
@@ -144,7 +144,7 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
""",
include_package_data=True,
dependency_links=[
- "https://github.com/tendenci/django-model-report/tarball/master#egg=django-model-report-0.0.9",
+ "https://github.com/tendenci/django-model-report/tarball/master#egg=django-model-report-0.0.11",
"http://a.pypi.python.org/",
"http://g.pypi.python.org/",
],
@@ -196,7 +196,8 @@ def find_package_data(where=".", package="", exclude=standard_exclude,
"django-tastypie",
"johnny-cache==1.4",
"docutils==0.9.1",
- "django-model-report==0.0.9",
+ 'chardet==2.1.1',
+ "django-model-report==0.0.11",
"dj-database-url==0.2.1",
"psycopg2==2.4.5",
"gunicorn==0.16.1",
View
9 tendenci/addons/campaign_monitor/views.py
@@ -318,13 +318,16 @@ def template_edit(request, template_id, form_class=TemplateForm, template_name='
#set up urls
site_url = get_setting('site', 'global', 'siteurl')
+ if hasattr(settings, 'USE_S3_STORAGE') and settings.USE_S3_STORAGE:
+ html_url = template.html_file.url
+ else:
+ html_url = str("%s%s" % (site_url, template.get_html_url()))
+
if template.zip_file:
if hasattr(settings, 'USE_S3_STORAGE') and settings.USE_S3_STORAGE:
zip_url = template.get_zip_url()
- html_url = template.html_file.url
else:
- zip_url = "%s%s"%(site_url, template.get_zip_url())
- html_url = str("%s%s"%(site_url, template.get_html_url()))
+ zip_url = "%s%s" % (site_url, template.get_zip_url())
else:
zip_url = ""
View
0 tendenci/addons/careers/__init__.py
No changes.
View
46 tendenci/addons/careers/admin.py
@@ -0,0 +1,46 @@
+from django.contrib import admin
+
+from tendenci.core.perms.admin import TendenciBaseModelAdmin
+from tendenci.addons.careers.models import Career
+from tendenci.addons.careers.forms import CareerForm
+
+
+class CareerAdmin(TendenciBaseModelAdmin):
+ list_display = ['user',
+ 'company',
+ 'position_title',
+ 'position_type',
+ 'start_dt',
+ 'end_dt',
+ 'admin_perms',
+ 'admin_status']
+ list_filter = ['status_detail', 'user']
+ search_fields = ['user', 'company']
+ fieldsets = (
+ ('', {
+ 'fields': ('user',
+ 'company',
+ 'company_description',
+ 'position_title',
+ 'position_description',
+ 'position_type',
+ 'start_dt',
+ 'end_dt',
+ 'experience',
+ )
+ }),
+ ('Permissions', {'fields': ('allow_anonymous_view',)}),
+ ('Advanced Permissions', {'classes': ('collapse',), 'fields': (
+ 'user_perms',
+ 'member_perms',
+ 'group_perms',
+ )}),
+ ('Status', {'fields': (
+ 'status',
+ 'status_detail',
+ )}),
+ )
+ form = CareerForm
+ ordering = ['-update_dt']
+
+admin.site.register(Career, CareerAdmin)
View
66 tendenci/addons/careers/forms.py
@@ -0,0 +1,66 @@
+from tendenci.addons.careers.models import Career
+from tendenci.core.perms.forms import TendenciBaseForm
+from django import forms
+
+
+class CareerForm(TendenciBaseForm):
+
+ status_detail = forms.ChoiceField(
+ choices=(('active', 'Active'),
+ ('inactive', 'Inactive'),
+ ('pending', 'Pending'),))
+
+ class Meta:
+ model = Career
+ fields = (
+ 'user',
+ 'company',
+ 'company_description',
+ 'position_title',
+ 'position_description',
+ 'position_type',
+ 'start_dt',
+ 'end_dt',
+ 'experience',
+ 'allow_anonymous_view',
+ 'user_perms',
+ 'member_perms',
+ 'group_perms',
+ 'status',
+ 'status_detail',
+ )
+
+ fieldsets = [('Career Information', {
+ 'fields': ['user',
+ 'company',
+ 'company_description',
+ 'position_title',
+ 'position_description',
+ 'position_type',
+ 'start_dt',
+ 'end_dt',
+ 'experience',
+ ],
+ }),
+ ('Permissions', {
+ 'fields': ['allow_anonymous_view',
+ 'user_perms',
+ 'member_perms',
+ 'group_perms',
+ ],
+ 'classes': ['permissions'],
+ }),
+ ('Administrator Only', {
+ 'fields': ['status',
+ 'status_detail'],
+ 'classes': ['admin-only'],
+ })]
+
+# def __init__(self, *args, **kwargs):
+# super(IndustryForm, self).__init__(*args, **kwargs)
+#
+# if not self.user.profile.is_superuser:
+# if 'status' in self.fields:
+# self.fields.pop('status')
+# if 'status_detail' in self.fields:
+# self.fields.pop('status_detail')
View
8 tendenci/addons/careers/managers.py
@@ -0,0 +1,8 @@
+from tendenci.core.perms.managers import TendenciBaseManager
+
+
+class CareerManager(TendenciBaseManager):
+ """
+ Model Manager
+ """
+ pass
View
206 tendenci/addons/careers/migrations/0001_initial.py
@@ -0,0 +1,206 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'Career'
+ db.create_table('careers_career', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('allow_anonymous_view', self.gf('django.db.models.fields.BooleanField')(default=True)),
+ ('allow_user_view', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('allow_member_view', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('allow_user_edit', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('allow_member_edit', self.gf('django.db.models.fields.BooleanField')(default=False)),
+ ('entity', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='careers_career_entity', null=True, blank=True, to=orm['entities.Entity'])),
+ ('create_dt', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
+ ('update_dt', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
+ ('creator', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='careers_career_creator', null=True, to=orm['auth.User'])),
+ ('creator_username', self.gf('django.db.models.fields.CharField')(max_length=50)),
+ ('owner', self.gf('django.db.models.fields.related.ForeignKey')(default=None, related_name='careers_career_owner', null=True, to=orm['auth.User'])),
+ ('owner_username', self.gf('django.db.models.fields.CharField')(max_length=50)),
+ ('status', self.gf('django.db.models.fields.BooleanField')(default=True)),
+ ('status_detail', self.gf('django.db.models.fields.CharField')(default='active', max_length=50)),
+ ('guid', self.gf('django.db.models.fields.CharField')(max_length=40)),
+ ('company', self.gf('django.db.models.fields.CharField')(max_length=150)),
+ ('company_description', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
+ ('position_title', self.gf('django.db.models.fields.CharField')(max_length=150)),
+ ('position_description', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
+ ('position_type', self.gf('django.db.models.fields.CharField')(default='full time', max_length=50)),
+ ('start_dt', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('end_dt', self.gf('django.db.models.fields.DateTimeField')(null=True, blank=True)),
+ ('experience', self.gf('django.db.models.fields.TextField')(default='', blank=True)),
+ ('user', self.gf('django.db.models.fields.related.ForeignKey')(related_name='careers', to=orm['auth.User'])),
+ ))
+ db.send_create_signal('careers', ['Career'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'Career'
+ db.delete_table('careers_career')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 24, 12, 47, 11, 139600)'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 10, 24, 12, 47, 11, 139492)'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'careers.career': {
+ 'Meta': {'object_name': 'Career'},
+ 'allow_anonymous_view': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'allow_member_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_member_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_user_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_user_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'company': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
+ 'company_description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'create_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'careers_career_creator'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'creator_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'end_dt': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'careers_career_entity'", 'null': 'True', 'blank': 'True', 'to': "orm['entities.Entity']"}),
+ 'experience': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'guid': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'careers_career_owner'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'owner_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'position_description': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
+ 'position_title': ('django.db.models.fields.CharField', [], {'max_length': '150'}),
+ 'position_type': ('django.db.models.fields.CharField', [], {'default': "'full time'", 'max_length': '50'}),
+ 'start_dt': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'status_detail': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '50'}),
+ 'update_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'careers'", 'to': "orm['auth.User']"})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'entities.entity': {
+ 'Meta': {'object_name': 'Entity'},
+ 'admin_notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'allow_anonymous_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_anonymous_view': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'allow_member_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_member_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_user_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_user_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'contact_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'create_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entity_creator'", 'to': "orm['auth.User']"}),
+ 'creator_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'email': ('django.db.models.fields.CharField', [], {'max_length': '120', 'blank': 'True'}),
+ 'entity_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'entity_parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'entity_children'", 'null': 'True', 'to': "orm['entities.Entity']"}),
+ 'entity_type': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
+ 'fax': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'guid': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'entity_owner'", 'to': "orm['auth.User']"}),
+ 'owner_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'phone': ('django.db.models.fields.CharField', [], {'max_length': '50', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'status_detail': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '50'}),
+ 'summary': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'update_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
+ 'website': ('django.db.models.fields.CharField', [], {'max_length': '300', 'blank': 'True'})
+ },
+ 'perms.objectpermission': {
+ 'Meta': {'object_name': 'ObjectPermission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'create_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['user_groups.Group']", 'null': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'object_id': ('django.db.models.fields.IntegerField', [], {}),
+ 'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']", 'null': 'True'})
+ },
+ 'user_groups.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'allow_anonymous_view': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'allow_member_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_member_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_self_add': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'allow_self_remove': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'allow_user_edit': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'allow_user_view': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'auto_respond': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'auto_respond_priority': ('django.db.models.fields.FloatField', [], {'default': '0', 'blank': 'True'}),
+ 'auto_respond_template': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
+ 'create_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'creator': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'user_groups_group_creator'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'creator_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'email_recipient': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'entity': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'user_groups_group_entity'", 'null': 'True', 'blank': 'True', 'to': "orm['entities.Entity']"}),
+ 'group': ('django.db.models.fields.related.OneToOneField', [], {'default': 'None', 'to': "orm['auth.Group']", 'unique': 'True', 'null': 'True'}),
+ 'guid': ('django.db.models.fields.CharField', [], {'max_length': '40'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'label': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
+ 'members': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.User']", 'through': "orm['user_groups.GroupMembership']", 'symmetrical': 'False'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),
+ 'notes': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'owner': ('django.db.models.fields.related.ForeignKey', [], {'default': 'None', 'related_name': "'user_groups_group_owner'", 'null': 'True', 'to': "orm['auth.User']"}),
+ 'owner_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'group_permissions'", 'blank': 'True', 'to': "orm['auth.Permission']"}),
+ 'show_as_option': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'slug': ('tendenci.core.base.fields.SlugField', [], {'unique': 'True', 'max_length': '100', 'db_index': 'True'}),
+ 'status': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'status_detail': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '50'}),
+ 'type': ('django.db.models.fields.CharField', [], {'default': "'distribution'", 'max_length': '75', 'blank': 'True'}),
+ 'update_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ },
+ 'user_groups.groupmembership': {
+ 'Meta': {'unique_together': "(('group', 'member'),)", 'object_name': 'GroupMembership'},
+ 'create_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
+ 'creator_id': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'creator_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['user_groups.Group']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'member': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'group_member'", 'to': "orm['auth.User']"}),
+ 'owner_id': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'owner_username': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
+ 'role': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),
+ 'sort_order': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),
+ 'status': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'status_detail': ('django.db.models.fields.CharField', [], {'default': "'active'", 'max_length': '50'}),
+ 'update_dt': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['careers']
View
0 tendenci/addons/careers/migrations/__init__.py
No changes.
View
65 tendenci/addons/careers/models.py
@@ -0,0 +1,65 @@
+import uuid
+from django.db import models
+from django.utils.translation import ugettext_lazy as _
+from django.contrib.contenttypes import generic
+from django.contrib.auth.models import User
+
+from tendenci.core.perms.models import TendenciBaseModel
+from tendenci.core.perms.object_perms import ObjectPermission
+from tendenci.addons.careers.managers import CareerManager
+
+POSITION_TYPE_CHOICES = (
+ ('full time', _('Full Time')),
+ ('part time', _('Part Time')),
+ ('permanent', _('Permanent')),
+ ('contract', _('Contract')),
+ )
+
+
+class Career(TendenciBaseModel):
+ guid = models.CharField(max_length=40)
+ company = models.CharField(_('Company'), max_length=150)
+ company_description = models.TextField(_('Company Description'),
+ blank=True,
+ default='')
+ position_title = models.CharField(_('Position Title'),
+ max_length=150)
+ position_description = models.TextField(_('Position Description'),
+ blank=True,
+ default='')
+ position_type = models.CharField(_('Position Type'),
+ max_length=50,
+ choices=POSITION_TYPE_CHOICES,
+ default='full time')
+
+ start_dt = models.DateTimeField(_('Start Date/Time'),
+ null=True, blank=True)
+ end_dt = models.DateTimeField(_('End Date/Time'),
+ null=True, blank=True)
+ experience = models.TextField(_('Experience'),
+ blank=True,
+ default='')
+ user = models.ForeignKey(User, related_name="careers")
+
+ perms = generic.GenericRelation(ObjectPermission,
+ object_id_field="object_id",
+ content_type_field="content_type")
+
+ objects = CareerManager()
+
+ class Meta:
+ permissions = (("view_career", "Can view career"),)
+ verbose_name = "Career"
+ verbose_name_plural = "Careers"
+
+ def __unicode__(self):
+ return '%s - %s' % (self.company, self.user)
+
+# @models.permalink
+# def get_absolute_url(self):
+# return ("career", [self.pk])
+
+ def save(self, *args, **kwargs):
+ self.guid = self.guid or unicode(uuid.uuid1())
+
+ super(Career, self).save(*args, **kwargs)
View
70 tendenci/addons/careers/settings.json
@@ -0,0 +1,70 @@
+[
+ {
+ "default_value": "true",
+ "description": "Module is enabled or not.",
+ "data_type": "boolean",
+ "update_dt": "2010-08-12 17:19:13",
+ "input_type": "select",
+ "client_editable": false,
+ "name": "enabled",
+ "value": "true",
+ "label": "Enabled",
+ "input_value": "true,false",
+ "parent_id": 0,
+ "scope": "module",
+ "scope_category": "careers",
+ "store": true,
+ "updated_by": ""
+ },
+ {
+ "default_value": "Career",
+ "description": "The singular name of the app.",
+ "data_type": "string",
+ "update_dt": "2012-02-29 15:08:56",
+ "input_type": "text",
+ "client_editable": true,
+ "name": "label",
+ "value": "Career",
+ "label": "Label",
+ "input_value": " ",
+ "parent_id": 0,
+ "scope": "module",
+ "scope_category": "careers",
+ "store": false,
+ "updated_by": ""
+ },
+ {
+ "default_value": "Careers",
+ "description": "The plural name of the app.",
+ "data_type": "string",
+ "update_dt": "2012-02-29 15:08:56",
+ "input_type": "text",
+ "client_editable": true,
+ "name": "label_plural",
+ "value": "Careers",
+ "label": "Label (Plural)",
+ "input_value": " ",
+ "parent_id": 0,
+ "scope": "module",
+ "scope_category": "careers",
+ "store": false,
+ "updated_by": ""
+ },
+ {
+ "default_value": "careers",
+ "description": "The root url for the industries app. Use letters and dashes only.",
+ "data_type": "string",
+ "update_dt": "2012-02-29 15:08:56",
+ "input_type": "text",
+ "client_editable": true,
+ "name": "url",
+ "value": "careers",
+ "label": "Root URL",
+ "input_value": " ",
+ "parent_id": 0,
+ "scope": "module",
+ "scope_category": "careers",
+ "store": false,
+ "updated_by": ""
+ }
+]
View
15 tendenci/addons/careers/urls.py
@@ -0,0 +1,15 @@
+from django.conf.urls.defaults import patterns, url
+from tendenci.core.site_settings.utils import get_setting
+
+urlpath = get_setting('module', 'careers', 'url')
+if not urlpath:
+ urlpath = "careers"
+
+urlpatterns = patterns('tendenci.addons.careers.views',
+# url(r'^%s/$' % urlpath, 'search', name="industries"),
+# url(r'^%s/(?P<id>\d+)/$' % urlpath, 'detail', name="industry"),
+# url(r'^%s/search/$' % urlpath, 'search_redirect', name="industry.search"),
+# url(r'^%s/add/$' % urlpath, 'add', name="industry.add"),
+# url(r'^%s/edit/(?P<id>\d+)/$' % urlpath, 'edit', name="industry.edit"),
+# url(r'^%s/delete/(?P<id>\d+)/$' % urlpath, 'delete', name="industry.delete"),
+)
View
0 tendenci/addons/careers/views.py
No changes.
View
88 tendenci/addons/corporate_memberships/admin.py
@@ -1,47 +1,105 @@
from django.contrib import admin
from django.conf import settings
-from tendenci.addons.corporate_memberships.models import CorporateMembershipType, CorporateMembership
+from tendenci.addons.corporate_memberships.models import (
+ CorporateMembershipType,
+ CorpMembershipApp,
+ CorpMembershipAppField,
+ CorporateMembership)
from tendenci.addons.corporate_memberships.models import CorpApp, CorpField
-from tendenci.addons.corporate_memberships.forms import CorporateMembershipTypeForm, CorpFieldForm, CorpAppForm
+from tendenci.addons.corporate_memberships.forms import (
+ CorporateMembershipTypeForm,
+ CorpMembershipAppForm,
+ CorpFieldForm,
+ CorpAppForm)
from tendenci.addons.corporate_memberships.utils import get_corpapp_default_fields_list, update_authenticate_fields, edit_corpapp_update_memb_app
from tendenci.core.event_logs.models import EventLog
class CorporateMembershipTypeAdmin(admin.ModelAdmin):
- list_display = ['name', 'price', 'renewal_price', 'membership_type',
+ list_display = ['name', 'price', 'renewal_price', 'membership_type',
'admin_only', 'status_detail', 'order']
list_filter = ['name', 'price', 'status_detail']
-
+
fieldsets = (
- (None, {'fields': ('name', 'price', 'renewal_price', 'membership_type', 'description')}),
- ('Individual Pricing Options', {'fields': ('apply_threshold', 'individual_threshold',
- 'individual_threshold_price',)}),
+ (None, {'fields': ('name', 'price', 'renewal_price',
+ 'membership_type', 'description')}),
+ ('Individual Pricing Options', {'fields':
+ ('apply_threshold', 'individual_threshold',
+ 'individual_threshold_price',)}),
('Other Options', {'fields': (
'order', ('admin_only', 'status'), 'status_detail')}),
)
-
+
form = CorporateMembershipTypeForm
-
-
+
def save_model(self, request, object, form, change):
instance = form.save(commit=False)
-
+
if not change:
instance.creator = request.user
instance.creator_username = request.user.username
instance.owner = request.user
instance.owner_username = request.user.username
-
+
# save the object
instance.save()
-
+
#form.save_m2m()
-
+
return instance
+class CorpMembershipAppFieldAdmin(admin.TabularInline):
+ model = CorpMembershipAppField
+ fields = ('label', 'field_name', 'display',
+ 'required', 'admin_only', 'order',
+ )
+# readonly_fields = ('field_name',)
+ extra = 0
+ can_delete = False
+ verbose_name = 'Section Break'
+ ordering = ("order",)
+ template = "corporate_memberships/admin/corpmembershipapp/tabular.html"
+
+
+class CorpMembershipAppAdmin(admin.ModelAdmin):
+ inlines = (CorpMembershipAppFieldAdmin, )
+ prepopulated_fields = {'slug': ['name']}
+ list_display = ('name', 'status', 'status_detail')
+ search_fields = ('name', 'status', 'status_detail')
+ fieldsets = (
+ (None, {'fields': ('name', 'slug', 'authentication_method',
+ 'description',
+ 'confirmation_text', 'notes',
+ 'corp_memb_type', 'payment_methods',
+ 'memb_app',)},),
+ ('Permissions', {'fields': ('allow_anonymous_view',)}),
+ ('Advanced Permissions', {'classes': ('collapse',), 'fields': (
+ 'user_perms',
+ 'member_perms',
+ 'group_perms',
+ )}),
+ ('Status', {'fields': (
+ 'status',
+ 'status_detail',
+ )}),
+ )
+
+ form = CorpMembershipAppForm
+
+ class Media:
+ js = (
+ '%sjs/jquery-1.4.2.min.js' % settings.STATIC_URL,
+ '%sjs/jquery_ui_all_custom/jquery-ui-1.8.5.custom.min.js' % settings.STATIC_URL,
+ '%sjs/admin/corpmembershipapp_tabular_inline_ordering.js' % settings.STATIC_URL,
+ '%sjs/global/tinymce.event_handlers.js' % settings.STATIC_URL,
+ )
+ css = {'all': ['%scss/admin/dynamic-inlines-with-sort.css' % settings.STATIC_URL,
+ '%scss/corpmemberships-admin.css' % settings.STATIC_URL], }
+
+
#class FieldInline(admin.TabularInline):
class FieldInline(admin.StackedInline):
model = CorpField
@@ -193,4 +251,4 @@ def log_addition(self, request, object):
admin.site.register(CorporateMembershipType, CorporateMembershipTypeAdmin)
-admin.site.register(CorpApp, CorpAppAdmin)
+admin.site.register(CorpMembershipApp, CorpMembershipAppAdmin)
View
390 tendenci/addons/corporate_memberships/forms.py
@@ -13,16 +13,25 @@
from captcha.fields import CaptchaField
from tinymce.widgets import TinyMCE
+from tendenci.core.perms.forms import TendenciBaseForm
from tendenci.addons.memberships.fields import PriceInput
from tendenci.addons.corporate_memberships.models import (
CorporateMembershipType,
+ CorpMembership,
+ CorpProfile,
+ CorpMembershipApp,
+ CorpMembershipImport,
CorpApp,
CorpField,
CorporateMembership,
Creator,
CorporateMembershipRep,
CorpMembRenewEntry)
from tendenci.addons.corporate_memberships.utils import (
+ get_corpmembership_type_choices,
+ get_corp_memberships_choices,
+ get_indiv_memberships_choices,
+ update_authorized_domains,
get_corpapp_default_fields_list,
update_auth_domains,
get_payment_method_choices,
@@ -71,6 +80,387 @@ class Meta:
)
+class CorpMembershipAppForm(TendenciBaseForm):
+ description = forms.CharField(required=False,
+ widget=TinyMCE(
+ attrs={'style': 'width:70%'},
+ mce_attrs={
+ 'storme_app_label': CorpMembershipApp._meta.app_label,
+ 'storme_model': CorpMembershipApp._meta.module_name.lower()}),
+ help_text='Will show at the top of the application form.')
+ confirmation_text = forms.CharField(required=False,
+ widget=TinyMCE(
+ attrs={'style': 'width:70%'},
+ mce_attrs={'storme_app_label': CorpMembershipApp._meta.app_label,
+ 'storme_model': CorpMembershipApp._meta.module_name.lower()}),
+ help_text='Will show on the confirmation page.')
+ notes = forms.CharField(label=_('Notes'), required=False,
+ widget=forms.Textarea(attrs={'rows': '3'}),
+ help_text='Notes for editor. Will not display on the application form.')
+ status_detail = forms.ChoiceField(
+ choices=(('active', 'Active'),
+ ('inactive', 'Inactive'),
+ ('admin hold', 'Admin Hold'),))
+
+ class Meta:
+ model = CorpMembershipApp
+ fields = (
+ 'name',
+ 'slug',
+ 'corp_memb_type',
+ 'authentication_method',
+ 'memb_app',
+ 'payment_methods',
+ 'description',
+ 'confirmation_text',
+ 'notes',
+ 'allow_anonymous_view',
+ 'user_perms',
+ 'member_perms',
+ 'group_perms',
+ 'status',
+ 'status_detail',
+ )
+
+ def __init__(self, *args, **kwargs):
+ super(CorpMembershipAppForm, self).__init__(*args, **kwargs)
+ if self.instance.pk:
+ self.fields['description'].widget.mce_attrs[
+ 'app_instance_id'] = self.instance.pk
+ self.fields['confirmation_text'].widget.mce_attrs[
+ 'app_instance_id'] = self.instance.pk
+ else:
+ self.fields['description'].widget.mce_attrs[
+ 'app_instance_id'] = 0
+ self.fields['confirmation_text'].widget.mce_attrs[
+ 'app_instance_id'] = 0
+
+field_size_dict = {
+ 'name': 36,
+ 'city': 24,
+ 'state': 12,
+ 'country': 14,
+ 'zip': 24,
+ 'phone': 22,
+ 'url': 36,
+ 'number_employees': 5,
+ 'referral_source': 28,
+ 'referral_source_member_name': 40,
+ 'referral_source_other': 28,
+ 'referral_source_member_number': 20,
+ }
+
+
+def get_field_size(app_field_obj):
+ return field_size_dict.get(app_field_obj.field_name, '') or 28
+
+
+def assign_fields(form, app_field_objs, instance=None):
+ form_field_keys = form.fields.keys()
+ # a list of names of app fields
+ field_names = [field.field_name for field in app_field_objs \
+ if field.field_name != '' and \
+ field.field_name in form_field_keys]
+ for name in form_field_keys:
+ if name not in field_names:
+ del form.fields[name]
+ # update the field attrs - label, required...
+ for obj in app_field_objs:
+ obj.display_only = False
+
+ # on edit set corporate_membership_type and payment_method
+ # as display only
+ if instance and instance.pk and obj.field_name in ['corporate_membership_type',
+ 'payment_method']:
+ obj.display_only = True
+ if obj.field_name == 'corporate_membership_type':
+ obj.display_content = instance.corporate_membership_type.name
+ del form.fields['corporate_membership_type']
+ continue
+ if obj.field_name == 'payment_method':
+ del form.fields['payment_method']
+ obj.display_content = instance.payment_method
+ if instance.invoice:
+ obj.display_content = """%s - <a href="%s">View Invoice</a>
+ """ % (obj.display_content,
+ instance.invoice.get_absolute_url())
+ continue
+
+ if obj.field_name in field_names:
+ field = form.fields[obj.field_name]
+ field.label = obj.label
+ field.required = obj.required
+ obj.field_stype = field.widget.__class__.__name__.lower()
+
+ if obj.field_stype == 'textinput':
+ size = get_field_size(obj)
+ field.widget.attrs.update({'size': size})
+ elif obj.field_stype == 'datetimeinput':
+ field.widget.attrs.update({'class': 'datepicker'})
+ label_type = []
+ if obj.field_name not in ['payment_method',
+ 'corporate_membership_type',
+ ]:
+ obj.field_div_class = 'inline-block'
+ label_type.append('inline-block')
+ if len(obj.label) < 16:
+ label_type.append('short-label')
+ #if obj.field_stype == 'textarea':
+ label_type.append('float-left')
+ obj.field_div_class = 'float-left'
+ obj.label_type = ' '.join(label_type)
+
+
+class CorpProfileForm(forms.ModelForm):
+ class Meta:
+ model = CorpProfile
+
+ def __init__(self, app_field_objs, *args, **kwargs):
+ self.request_user = kwargs.pop('request_user')
+ self.corpmembership_app = kwargs.pop('corpmembership_app')
+ super(CorpProfileForm, self).__init__(*args, **kwargs)
+
+ if self.corpmembership_app.authentication_method == 'email':
+ self.fields['authorized_domain'] = forms.CharField(help_text="""
+ <span style="color: #990000;">comma separated (ex: mydomain.com,
+ mydomain.net).</span><br />The
+ authorized e-mail domain will authenticate prospective<br />
+ members as they apply for membership under this company.
+ """)
+ if self.instance.pk:
+ auth_domains = ', '.join([domain.name for domain
+ in self.instance.authorized_domains.all()])
+ self.fields['authorized_domain'].initial = auth_domains
+ if not self.corpmembership_app.authentication_method == 'secret_code':
+ del self.fields['secret_code']
+
+ del self.fields['status']
+ del self.fields['status_detail']
+
+ assign_fields(self, app_field_objs)
+ self.field_names = [name for name in self.fields.keys()]
+
+ def save(self, *args, **kwargs):
+ if not self.instance.id:
+ if not self.request_user.is_anonymous():
+ self.instance.creator = self.request_user
+ self.instance.creator_username = self.request_user.username
+ self.instance.status = True
+ self.instance.status_detail = 'active'
+ if not self.request_user.is_anonymous():
+ self.instance.owner = self.request_user
+ self.instance.owner_username = self.request_user.username
+
+ super(CorpProfileForm, self).save(*args, **kwargs)
+
+ # update authorized domain if needed
+ if self.corpmembership_app.authentication_method == 'email':
+ update_authorized_domains(self.instance,
+ self.cleaned_data['authorized_domain'])
+ return self.instance
+
+
+class CorpMembershipForm(forms.ModelForm):
+ STATUS_DETAIL_CHOICES = (
+ ('active', 'Active'),
+ ('pending', 'Pending'),
+ ('admin_hold', 'Admin Hold'),
+ ('inactive', 'Inactive'),
+ ('expired', 'Expired'),
+ ('archive', 'Archive'),
+ )
+ STATUS_CHOICES = (
+ (1, 'Active'),
+ (0, 'Inactive')
+ )
+
+ class Meta:
+ model = CorpMembership
+
+ def __init__(self, app_field_objs, *args, **kwargs):
+ self.request_user = kwargs.pop('request_user')
+ self.corpmembership_app = kwargs.pop('corpmembership_app')
+ super(CorpMembershipForm, self).__init__(*args, **kwargs)
+ self.fields['corporate_membership_type'].widget = forms.widgets.RadioSelect(
+ choices=get_corpmembership_type_choices(self.request_user,
+ self.corpmembership_app),
+ attrs=self.fields['corporate_membership_type'].widget.attrs)
+ # if all membership types are free, no need to display payment method
+ require_payment = self.corpmembership_app.corp_memb_type.filter(
+ price__gt=0).exists()
+ if not require_payment:
+ del self.fields['payment_method']
+ else:
+ self.fields['payment_method'].empty_label = None
+ self.fields['payment_method'].widget = forms.widgets.RadioSelect(
+ choices=self.fields['payment_method'].widget.choices,
+ attrs=self.fields['payment_method'].widget.attrs)
+ self_fields_keys = self.fields.keys()
+ if 'status_detail' in self_fields_keys:
+ self.fields['status_detail'].widget = forms.widgets.Select(
+ choices=self.STATUS_DETAIL_CHOICES)
+ if 'status' in self_fields_keys:
+ self.fields['status'].widget = forms.widgets.Select(
+ choices=self.STATUS_CHOICES)
+
+ assign_fields(self, app_field_objs, instance=self.instance)
+ self.field_names = [name for name in self.fields.keys()]
+
+ def save(self, **kwargs):
+ super(CorpMembershipForm, self).save(commit=False)
+ anonymous_creator = kwargs.get('creator', None)
+ corp_profile = kwargs.get('corp_profile', None)
+ creator_owner = self.request_user
+ if not self.instance.pk:
+ if anonymous_creator:
+ self.instance.anonymous_creator = anonymous_creator
+ if not isinstance(self.request_user, User):
+ [creator_owner] = User.objects.filter(is_staff=1,
+ is_active=1)[:1] or [None]
+ if not self.request_user.profile.is_superuser:
+ self.instance.status = True
+ self.instance.status_detail = 'pending'
+ if not self.instance.join_dt:
+ self.instance.join_dt = datetime.now()
+ if not creator_owner.is_anonymous():
+ self.instance.creator = creator_owner
+ self.instance.creator_username = creator_owner.username
+ if not creator_owner.is_anonymous():
+ self.instance.owner = creator_owner
+ self.instance.owner_username = creator_owner.username
+ if corp_profile:
+ self.instance.corp_profile = corp_profile
+ self.instance.save()
+
+ return self.instance
+
+
+class CorpMembershipRenewForm(forms.ModelForm):
+ members = forms.MultipleChoiceField(widget=forms.CheckboxSelectMultiple,
+ choices=[],
+ required=False)
+ select_all_members = forms.BooleanField(widget=forms.CheckboxInput(),
+ required=False)
+
+ class Meta:
+ model = CorpMembership
+ fields = ('corporate_membership_type',
+ 'payment_method',
+ )
+
+ def __init__(self, *args, **kwargs):
+ self.request_user = kwargs.pop('request_user')
+ self.corpmembership_app = kwargs.pop('corpmembership_app')
+
+ super(CorpMembershipRenewForm, self).__init__(*args, **kwargs)
+
+ self.fields['corporate_membership_type'].widget = forms.RadioSelect(
+ choices=get_corpmembership_type_choices(
+ self.request_user,
+ self.corpmembership_app,
+ renew=True))
+ self.fields['corporate_membership_type'].empty_label = None
+ self.fields['corporate_membership_type'
+ ].initial = self.instance.corporate_membership_type.id
+
+ members_choices = get_indiv_memberships_choices(self.instance)
+ self.fields['members'].choices = members_choices
+ self.fields['members'].label = "Select the individual members you " + \
+ "want to renew"
+ if self.instance.corporate_membership_type.renewal_price == 0:
+ self.fields['select_all_members'].initial = True
+ self.fields['members'].initial = [c[0] for c in members_choices]
+
+ self.fields['payment_method'].widget = forms.RadioSelect(
+ choices=get_payment_method_choices(
+ self.request_user,
+ self.corpmembership_app))
+ self.fields['payment_method'].empty_label = None
+ self.fields['payment_method'].initial = \
+ self.instance.payment_method
+
+
+class RosterSearchAdvancedForm(forms.Form):
+ SEARCH_CRITERIA_CHOICES = (
+ ('username', _('Username')),
+ ('member_number', _('Member Number')),
+ ('phone', _('Phone')),
+ ('city', _('City')),
+ ('state', _('State')),
+ ('zip', _('Zip Code')),
+ ('country', _('Country'))
+ )
+ SEARCH_METHOD_CHOICES = (
+ ('starts_with', _('Starts With')),
+ ('contains', _('Contains')),
+ ('exact', _('Exact')),
+ )
+ cm_id = forms.ChoiceField(label=_('Company Name'),
+ choices=get_corp_memberships_choices(),
+ required=False)
+ first_name = forms.CharField(label=_('First Name'),
+ max_length=100,
+ required=False)
+ last_name = forms.CharField(label=_('Last Name'),
+ max_length=100, required=False)
+ email = forms.CharField(label=_('Email'),
+ max_length=100, required=False)
+ search_criteria = forms.ChoiceField(choices=SEARCH_CRITERIA_CHOICES,
+ required=False)
+ search_text = forms.CharField(max_length=100, required=False)
+ search_method = forms.ChoiceField(choices=SEARCH_METHOD_CHOICES,
+ required=False)
+
+ def __init__(self, *args, **kwargs):
+ super(RosterSearchAdvancedForm, self).__init__(*args, **kwargs)
+
+
+class CorpMembershipUploadForm(forms.ModelForm):
+ KEY_CHOICES = (
+ ('company_name', 'Company Name'),
+ )
+ key = forms.ChoiceField(label="Key",
+ choices=KEY_CHOICES)
+
+ class Meta:
+ model = CorpMembershipImport
+ fields = (
+ 'key',
+ 'override',
+ 'bind_members',
+ 'upload_file',
+ )
+
+ def __init__(self, *args, **kwargs):
+ super(CorpMembershipUploadForm, self).__init__(*args, **kwargs)
+ self.fields['key'].initial = 'name'
+
+ def clean_upload_file(self):
+ key = self.cleaned_data['key']
+ upload_file = self.cleaned_data['upload_file']
+ if not key:
+ raise forms.ValidationError('Please specify the key to identify duplicates')
+
+ file_content = upload_file.read()
+ upload_file.seek(0)
+ header_line_index = file_content.find('\n')
+ header_list = ((file_content[:header_line_index]
+ ).strip('\r')).split(',')
+ if 'company_name' not in header_list:
+ raise forms.ValidationError(
+ """
+ 'Field %s used to identify the duplicates
+ should be included in the .csv file.'
+ """ % 'company_name')
+ return upload_file
+
+
+class CorpExportForm(forms.Form):
+ export_format = forms.ChoiceField(
+ label=_('Export Format'),
+ choices=(('csv', 'csv (Export)'),))
+
+
class CorpAppForm(forms.ModelForm):
description = forms.CharField(required=False,
widget=TinyMCE(
View
480 tendenci/addons/corporate_memberships/import_processor.py
@@ -0,0 +1,480 @@
+import os
+import csv
+from decimal import Decimal
+from datetime import datetime, date, timedelta
+import dateutil.parser as dparser
+import pytz
+
+from django.core import exceptions
+from django.contrib.auth.models import User
+
+from tendenci.core.site_settings.utils import get_setting
+from tendenci.addons.corporate_memberships.models import (
+ CorpMembership,
+ CorpProfile,
+ CorpMembershipRep,
+ CorporateMembershipType)
+from tendenci.addons.corporate_memberships.utils import update_authorized_domains
+from tendenci.addons.memberships.models import MembershipDefault
+from tendenci.apps.profiles.models import Profile
+
+
+class CorpMembershipImportProcessor(object):
+ """
+ Check and process (insert/update) a corporate membership.
+ """
+ def __init__(self, request_user, mimport,
+ dry_run=True, **kwargs):
+ """
+ :param mimport: a instance of MembershipImport
+ :param dry_run: if True, do everything except updating the database.
+ """
+ self.key = mimport.key
+ self.request_user = request_user
+ self.mimport = mimport
+ self.dry_run = dry_run
+ self.summary_d = self.init_summary()
+ self.corp_profile_fields = dict([(field.name, field) \
+ for field in CorpProfile._meta.fields \
+ if field.get_internal_type() != 'AutoField' and \
+ field.name not in ['guid']])
+ self.corp_membership_fields = dict([(field.name, field) \
+ for field in CorpMembership._meta.fields \
+ if field.get_internal_type() != 'AutoField' and \
+ field.name not in ['user', 'guid',
+ 'corp_profile']])
+ self.private_settings = self.set_default_private_settings()
+ self.t4_timezone_map = {'AST': 'Canada/Atlantic',
+ 'EST': 'US/Eastern',
+ 'CST': 'US/Central',
+ 'MST': 'US/Mountain',
+ 'AKST': 'US/Alaska',
+ 'PST': 'US/Pacific',
+ 'GMT': 'UTC'
+ }
+ self.t4_timezone_map_keys = self.t4_timezone_map.keys()
+
+ def init_summary(self):
+ return {
+ 'insert': 0,
+ 'update': 0,
+ 'update_insert': 0,
+ 'invalid': 0
+ }
+
+ def set_default_private_settings(self):
+ # public, private, all-members, member-type
+ memberprotection = get_setting('module',
+ 'memberships',
+ 'memberprotection')
+ d = {'allow_anonymous_view': False,
+ 'allow_user_view': False,
+ 'allow_member_view': False,
+ 'allow_user_edit': False,
+ 'allow_member_edit': False}
+
+ if memberprotection == 'public':
+ d['allow_anonymous_view'] = True
+ if memberprotection == 'all-members':
+ d['allow_user_view'] = True
+ if memberprotection == 'member-type':
+ d['allow_member_view'] = True
+ return d
+
+ def validate_fields(self, cmemb_data, key):
+ """
+ 1. Check if we have enough data to process for this row.
+ 2. Check if this is an archived corporate membership.
+ """
+ error_msg = []
+
+ if key == 'name':
+ if not cmemb_data['company_name']:
+ error_msg.append("Missing key 'company_name'.")
+ if 'status_detail' in cmemb_data.keys():
+ if cmemb_data['status_detail'] in ['archive', 'archived']:
+ error_msg.append('No import for archived.')
+
+ return ' '.join(error_msg)
+
+ def process_corp_membership(self, cmemb_data, **kwargs):
+ """
+ Check if it's insert or update. If dry_run is False,
+ do the import to the corpmembership.
+
+ :param cmemb_data: a dictionary that includes the info
+ of a corp_membership
+ """
+ self.cmemb_data = cmemb_data
+ self.cmemb_data['name'] = self.cmemb_data['company_name']
+ del self.cmemb_data['company_name']
+ self.field_names = cmemb_data.keys() # csv field names
+ corp_memb_display = {}
+ corp_memb_display['error'] = ''
+ corp_memb_display['user'] = None
+
+ error_msg = self.validate_fields(self.cmemb_data, self.key)
+
+ # don't process if we have missing value of required fields
+ if error_msg:
+ corp_memb_display['error'] = error_msg
+ corp_memb_display['action'] = 'skip'
+ if not self.dry_run:
+ self.summary_d['invalid'] += 1
+ else:
+ #if self.key == 'name':
+ [corp_profile] = CorpProfile.objects.filter(
+ name=self.cmemb_data['name'])[:1] or [None]
+ if corp_profile:
+ [corp_memb] = CorpMembership.objects.filter(
+ corp_profile=corp_profile).exclude(
+ status_detail='archive'
+ ).order_by('-id')[:1] or [None]
+ else:
+ corp_memb = None
+
+ if corp_profile:
+ if corp_memb:
+ corp_memb_display['action'] = 'update'
+ corp_memb_display['corp_profile_action'] = 'update'
+ corp_memb_display['corp_memb_action'] = 'update'
+ else:
+ corp_memb_display['action'] = 'mixed'
+ corp_memb_display['corp_profile_action'] = 'update'
+ corp_memb_display['corp_memb_action'] = 'insert'
+ else:
+ corp_memb_display['action'] = 'insert'
+ corp_memb_display['corp_profile_action'] = 'insert'
+ corp_memb_display['corp_memb_action'] = 'insert'
+
+ if not self.dry_run:
+ if corp_memb_display['action'] == 'insert':
+ self.summary_d['insert'] += 1
+ elif corp_memb_display['action'] == 'update':
+ self.summary_d['update'] += 1
+ else:
+ self.summary_d['update_insert'] += 1
+
+ # now do the update or insert
+ self.do_import_corp_membership(corp_profile, corp_memb,
+ corp_memb_display)
+ # handle authorized_domain
+ if 'authorized_domains' in self.field_names:
+ update_authorized_domains(corp_profile,
+ self.cmemb_data['authorized_domains'])
+
+ # handle dues_rep
+ if 'dues_rep' in self.field_names:
+ self.update_dues_reps(corp_profile,
+ self.cmemb_data['dues_rep'])
+
+ return
+
+ corp_memb_display.update({
+ 'company_name': self.cmemb_data.get('name', ''),
+ 'email': self.cmemb_data.get('email', ''),
+ 'address': self.cmemb_data.get('address', ''),
+ 'address2': self.cmemb_data.get('address2', ''),
+ 'city': self.cmemb_data.get('city', ''),
+ 'state': self.cmemb_data.get('state', ''),
+ 'zip': self.cmemb_data.get('zip', ''),
+ })
+ return corp_memb_display
+
+ def update_dues_reps(self, corp_profile, dues_reps):
+ """
+ Update the dues reps for this corp_profile.
+ """
+ dues_reps = dues_reps.split(',')
+ dues_reps_list = [name.strip() for name in dues_reps]
+ dues_reps_users_list = []
+ # get the user objects by username
+ for username in dues_reps_list:
+ [u] = User.objects.filter(username=username)[:1] or [None]
+ if u:
+ dues_reps_users_list.append(u)
+ if dues_reps_users_list:
+ # delete the existing dues reps
+ CorpMembershipRep.objects.filter(corp_profile=corp_profile,
+ is_dues_rep=True).delete()
+ for u in dues_reps_users_list:
+ dues_rep = CorpMembershipRep(
+ corp_profile=corp_profile,
+ user=u,
+ is_dues_rep=True)
+ dues_rep.save()
+
+ def do_import_corp_membership(self, corp_profile, corp_memb, action_info):
+ """
+ Database import here - insert or update
+ """
+ # handle corp_profile
+ if not corp_profile:
+ corp_profile = CorpProfile()
+
+ self.assign_import_values_from_dict(corp_profile, action_info['corp_profile_action'])
+
+ if corp_profile.status == None or corp_profile.status == '' or \
+ self.cmemb_data.get('status', '') == '':
+ corp_profile.status = True
+ if not corp_profile.status_detail:
+ corp_profile.status_detail = 'active'
+ else:
+ corp_profile.status_detail = corp_profile.status_detail.lower()
+
+ if not corp_profile.creator:
+ corp_profile.creator = self.request_user
+ corp_profile.creator_username = self.request_user.username
+ if not corp_profile.owner:
+ corp_profile.owner = self.request_user
+ corp_profile.owner_username = self.request_user.username
+
+ corp_profile.save()
+
+ # corpmembership
+ if not corp_memb:
+ corp_memb = CorpMembership(
+ corp_profile=corp_profile,
+ creator=self.request_user,
+ creator_username=self.request_user.username,
+ owner=self.request_user,
+ owner_username=self.request_user.username,
+ )
+
+ self.assign_import_values_from_dict(corp_memb, action_info['corp_memb_action'])
+
+ if corp_memb.status == None or corp_memb.status == '' or \
+ self.cmemb_data.get('status', '') == '':
+ corp_memb.status = True
+ if not corp_memb.status_detail:
+ corp_memb.status_detail = 'active'
+ else:
+ corp_memb.status_detail = corp_memb.status_detail.lower()
+
+ # set to approved for active memberships
+ if not corp_memb.approved:
+ if corp_memb.status and corp_memb.status_detail == 'active':
+ corp_memb.approved = True
+
+ # corporate membership type
+ if not hasattr(corp_memb, "corporate_membership_type") or \
+ not corp_memb.corporate_membership_type:
+ # last resort - pick the first available membership type
+ corp_memb.corporate_membership_type = CorporateMembershipType.objects.all(
+ ).order_by('id')[0]
+
+ # no join_dt - set one
+ if not hasattr(corp_memb, 'join_dt') or not corp_memb.join_dt:
+ if corp_memb.status and corp_memb.status_detail == 'active':
+ corp_memb.join_dt = datetime.now()
+
+ # no expire_dt - get it via corporate_membership_type
+ if not hasattr(corp_memb, 'expiration_dt') or not corp_memb.expiration_dt:
+ if corp_memb.corporate_membership_type:
+ expiration_dt = corp_memb.corporate_membership_type.get_expiration_dt(
+ join_dt=corp_memb.join_dt)
+ setattr(corp_memb, 'expiration_dt', expiration_dt)
+
+ if not corp_memb.creator:
+ corp_memb.creator = self.request_user
+ corp_memb.creator_username = self.request_user.username
+ if not corp_memb.owner:
+ corp_memb.owner = self.request_user
+ corp_memb.owner_username = self.request_user.username
+ corp_memb.save()
+
+ # bind members to their corporations by company names
+ if self.mimport.bind_members:
+ self.bind_members_to_corp_membership(corp_memb)
+
+ def bind_members_to_corp_membership(self, corp_memb):
+ corp_profile = corp_memb.corp_profile
+ company_name = corp_profile.name
+ user_ids = Profile.objects.filter(company=company_name
+ ).values_list('user__id', flat=True)
+ if user_ids:
+ memberships = MembershipDefault.objects.filter(
+ user__id__in=user_ids
+ ).filter(status=True
+ ).exclude(status_detail='archive')
+ for membership in memberships:
+ if not membership.corp_profile:
+ membership.corp_profile_id = corp_profile.id
+ membership.corporate_membership_id = corp_memb.id
+ membership.save()
+
+ def is_active(self, corp_memb):
+ return all([
+ corp_memb.status,
+ corp_memb.status_detail == 'active',
+ not corp_memb.expiration_dt or corp_memb.expiration_dt > datetime.now()
+ ])
+
+ def assign_import_values_from_dict(self, instance, action):
+ """
+ Assign the import value from a dictionary object
+ - self.cmemb_data.
+ """
+ if instance.__class__ == CorpProfile:
+ assign_to_fields = self.corp_profile_fields
+ else:
+ assign_to_fields = self.corp_membership_fields
+ # list of field names from the model
+ # self.field_names is a list of field names from csv
+ assign_to_fields_names = assign_to_fields.keys()
+
+ for field_name in self.field_names:
+ if field_name in assign_to_fields_names:
+ if any([
+ action == 'insert',
+ self.mimport.override,
+ not hasattr(instance, field_name) or \
+ getattr(instance, field_name) == '' or \
+ getattr(instance, field_name) == None
+ ]):
+ value = self.cmemb_data[field_name]
+ value = self.clean_data(value,
+ assign_to_fields[field_name])
+ setattr(instance, field_name, value)
+ #print field_name, value
+
+ # if insert, set defaults for the fields not in csv.
+ for field_name in assign_to_fields_names:
+ if field_name not in self.field_names and action == 'insert':
+ if field_name not in self.private_settings.keys():
+ if field_name not in ['creator', 'owner',
+ 'creator_username',
+ 'owner_username']:
+ value = self.get_default_value(
+ assign_to_fields[field_name])
+ if value != None:
+ setattr(instance, field_name, value)
+
+ def get_default_value(self, field):
+ # if allows null or has default, return None
+ if field.null or field.has_default():
+ return None
+
+ field_type = field.get_internal_type()
+
+ if field_type == 'BooleanField':
+ return False
+
+ if field_type == 'DateField':
+ return date
+
+ if field_type == 'DateTimeField':
+ return datetime.now()
+
+ if field_type == 'DecimalField':
+ return Decimal(0)
+
+ if field_type == 'IntegerField':
+ return 0
+
+ if field_type == 'FloatField':
+ return 0
+
+ if field_type == 'ForeignKey':
+ if not field.name in ['creator', 'owner']:
+ [value] = field.related.parent_model.objects.all(
+ )[:1] or [None]
+ return value
+ return None
+
+ return ''
+
+ def clean_data(self, value, field):
+ """
+ Clean the data based on the field type.
+ """
+ field_type = field.get_internal_type()
+ if field_type in ['CharField', 'EmailField',
+ 'URLField', 'SlugField']:
+ if not value:
+ value = ''
+ if len(value) > field.max_length:
+ # truncate the value to ensure its length <= max_length
+ value = value[:field.max_length]
+ if field.name == 'time_zone':
+ if value not in pytz.all_timezones:
+ if value in self.t4_timezone_map_keys:
+ value = self.t4_timezone_map[value]
+ try:
+ value = field.to_python(value)
+ except exceptions.ValidationError:
+ if field.has_default():
+ value = field.get_default()
+ else:
+ value = ''
+
+ elif field_type == 'BooleanField':
+ try:
+ value = field.to_python(value)
+ except exceptions.ValidationError:
+ value = False
+ elif field_type == 'DateField':
+ if value:
+ value = dparser.parse(value)
+ try:
+ value = field.to_python(value)
+ except exceptions.ValidationError:
+ pass
+
+ if not value:
+ if not field.null:
+ value = date
+
+ elif field_type == 'DateTimeField':
+ if value:
+ value = dparser.parse(value)
+ try:
+ value = field.to_python(value)
+ except exceptions.ValidationError:
+ pass
+
+ if not value:
+ if value == '':
+ value = None
+ if not field.null:
+ value = datetime.now()
+ elif field_type == 'DecimalField':
+ try:
+ value = field.to_python(value)
+ except exceptions.ValidationError:
+ value = Decimal(0)
+ elif field_type == 'IntegerField':
+ try:
+ value = int(value)
+ except:
+ value = 0
+ elif field_type == 'FloatField':
+ try:
+ value = float(value)
+ except:
+ value = 0
+ elif field_type == 'ForeignKey':
+ orignal_value = value
+ # assume id for foreign key
+ try:
+ value = int(value)
+ except:
+ value = None
+
+ if value:
+ [value] = field.related.parent_model.objects.filter(
+ pk=value)[:1] or [None]
+
+ # membership_type - look up by name in case
+ # they entered name instead of id
+ if not value and field.name == 'corporate_membership_type':
+ [value] = CorporateMembershipType.objects.filter(
+ name=orignal_value)[:1] or [None]
+
+ if not value and not field.null:
+ if not field.name in ['creator', 'owner']:
+ # if the field doesn't allow null, grab the first one.
+ [value] = field.related.parent_model.objects.all(
+ ).order_by('id')[:1] or [None]
+
+ return value
View
75 ...nci/addons/corporate_memberships/management/commands/corp_membership_import_preprocess.py
@@ -0,0 +1,75 @@
+import os
+import chardet
+import traceback
+
+from django.core.management.base import BaseCommand
+from django.shortcuts import get_object_or_404
+from django.core.files.storage import default_storage
+from django.core.files.base import ContentFile
+
+
+class Command(BaseCommand):
+ """
+ Pre_precess the corporate membership import:
+
+ 1) Encode the uploaded file.
+ 2) Dump data to table CorpMembershipImportData
+
+ Usage:
+ python manage.py corp_membership_import_preprocess [mimport_id]
+
+ example:
+ python manage.py corp_membership_import_preprocess 1
+ """
+
+ def handle(self, *args, **options):
+ from tendenci.addons.corporate_memberships.models import CorpMembershipImport
+ from tendenci.addons.corporate_memberships.models import CorpMembershipImportData
+ from tendenci.addons.memberships.utils import memb_import_parse_csv
+
+ mimport = get_object_or_404(CorpMembershipImport,
+ pk=args[0])
+ if mimport.status == 'not_started':
+ if mimport.upload_file:
+ mimport.status = 'preprocessing'
+ mimport.save()
+
+ # encode to utf8 and write to path2
+ path2 = '%s_utf8%s' % (os.path.splitext(
+ mimport.upload_file.name))
+ default_storage.save(path2, ContentFile(''))
+ f = default_storage.open(mimport.upload_file.name)
+ f2 = default_storage.open(path2, 'wb+')
+ encoding_updated = False
+ for chunk in f.chunks():
+ encoding = chardet.detect(chunk)['encoding']
+ if encoding not in ('ascii', 'utf8'):
+ if encoding == 'ISO-8859-1' or \
+ encoding == 'ISO-8859-2':
+ encoding = 'latin-1'
+ chunk = chunk.decode(encoding)
+ chunk = chunk.encode('utf8')
+ encoding_updated = True
+ f2.write(chunk)
+ f2.close()
+ if encoding_updated:
+ mimport.upload_file.file = f2
+ mimport.upload_file.name = f2.name
+ mimport.save()
+ else:
+ default_storage.delete(path2)
+
+ # dump data to the table CorpMembershipImportData
+ # note that row_num starts with 2 because the first row
+ # is the header row.
+ data_list = memb_import_parse_csv(mimport)[1]
+ for i, memb_data in enumerate(data_list):
+
+ import_data = CorpMembershipImportData(
+ mimport=mimport,
+ row_data=memb_data,
+ row_num=i+2)
+ import_data.save()
+
+ mimport.status = 'preprocess_done'
+ mimport.save()
View
60 tendenci/addons/corporate_memberships/management/commands/import_corp_memberships.py
@@ -0,0 +1,60 @@
+from datetime import datetime
+import traceback
+
+from django.core.management.base import BaseCommand
+from django.shortcuts import get_object_or_404
+from django.contrib.auth.models import User
+
+
+class Command(BaseCommand):
+ """
+ Import corporate memberships.
+
+ Usage:
+ python manage.py import_corp_memberships [mimport_id] [request.user.id]
+
+ example:
+ python manage.py import_corp_memberships 10 1
+ """
+
+ def handle(self, *args, **options):
+ from tendenci.addons.corporate_memberships.models import CorpMembershipImport
+ from tendenci.addons.corporate_memberships.models import CorpMembershipImportData
+ from tendenci.addons.corporate_memberships.import_processor import CorpMembershipImportProcessor
+
+ mimport = get_object_or_404(CorpMembershipImport,
+ pk=args[0])
+ request_user = User.objects.get(pk=args[1])
+
+# fieldnames, data_list = memb_import_parse_csv(mimport)
+ data_list = CorpMembershipImportData.objects.filter(
+ mimport=mimport).order_by('pk')
+
+ imd = CorpMembershipImportProcessor(request_user, mimport, dry_run=False)
+
+ for idata in data_list:
+ cmemb_data = idata.row_data
+ # catch any error
+ try:
+ imd.process_corp_membership(cmemb_data)
+ except Exception, e:
+ # mimport.status = 'error'
+ # TODO: add a field to log the error
+ # mimport.save()
+ # raise Exception(traceback.format_exc())
+ print e
+
+ mimport.num_processed += 1
+ # save the status
+ summary = 'insert:%d,update:%d,update_insert:%d,invalid:%d' % (
+ imd.summary_d['insert'],
+ imd.summary_d['update'],
+ imd.summary_d['update_insert'],
+ imd.summary_d['invalid']
+ )
+ mimport.summary = summary
+ mimport.save()
+