This site is an archive; learn more about 8 years of OpenHatch.

[OH-Dev] Replace controllers with helpers

Asheesh Laroia asheesh at asheesh.org
Thu Mar 28 09:32:08 UTC 2013


On Thu, 28 Mar 2013, Asheesh Laroia wrote:

> On Wed, 27 Mar 2013, Rajesh Pradhan wrote:
>
>> Hi,
>> 
>> I have replaced controllers with helpers and merged controllers.py with 
>> helpers.py in the base directory of missions. However I had to omit the 
>> call @mysite.base.decorators.unicodify_strings_when_inputted before 
>> _geocode and cached_geocoding_in_json due to error!
>
> Hi Rajesh! This sounds like a super great start to reorganizing the 
> code. Thank you for it!
>
> I took a look at https://github.com/openhatch/oh-mainline/pulls and 
> couldn't see a corresponding pull request. Did you make one? If not, 
> I'll need more instructions on how to see your changes.


Got it -- I think I see it here.

https://github.com/rajeshpradhan/oh-mainline/pull/1

It looks like you should run the following commands within the git 
repository:

git remote add upstream git://github.com/openhatch/oh-mainline.git

git fetch upstream

git rebase upstream/master

git push origin HEAD:rebased

And then visit https://github.com/rajeshpradhan/oh-mainline/commit/rebased 
and you should submit a request that openhatch pull from you.

That's a purely git stylistic concern; I can address that for you if 
needed, although we should get you to the point where you're comfortable 
enough wigit that you can do that too.

The other thing is that you called the file helpers.py not view_helpers.py 
, and in http://lists.openhatch.org/pipermail/devel/2013-March/003151.html 
I suggested view_helpers.py as the filename.

You can adjust that after-the-fact by doing:

git mv helpers.py view_helpers.py
git commit -m 'Rename to view_helpers'

(You'll have to do that once per app, e.g. search/project/etc.)

Additionally, you'd have to update the test suite.

Having said that, this change set is very impressive, and makes the code 
hugely easier to follow.

Would you be willing to make the above changes? I can step you through any 
part you need help with, now that I've read your code; just find me on 
IRC, or ask here on the list!

-- Asheesh.


More information about the Devel mailing list