Closed Bug 617993 Opened 14 years ago Closed 13 years ago

jetpack.views can use major refactoring

Categories

(addons.mozilla.org Graveyard :: Add-on Builder, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Builder 0.9.7

People

(Reporter: davedash, Assigned: zalun)

References

Details

After coverage is complete, we can go in and rename views to be a bit more descriptive. There's a lot of minor things that could enhance code readability: * Renaming methods so they don't all start with package_ - we're in the jetpack view we know we're dealing with jetpack packages. * the template choosing could be a bit cleaner, it'd be nice if each view had it's unique template and it wasn't parameterized, because it makes it hard to test. At the very least what the template suffix stuff can be pulled into a new method that woudl have its own tests. * we shoudl override render_to_response so it always gives us the request context, it's silly to spell it out each time. * view methods should take the parameter 'request' not 'r' this is django convention. I think with some refactoring we can get the file size down, and make this app really easy to dive into for new developers.
refactoring is always good.
and lets get a render to json shortcut too...
Component: FlightDeck → Add-on Builder
Product: Mozilla Labs → addons.mozilla.org
QA Contact: flightdeck → add-on-builder
What is the status on this Piotr?
Assignee: nobody → zaloon
OS: Mac OS X → All
Priority: -- → P2
Hardware: x86 → All
Target Milestone: --- → Builder 0.9.7
not touched yet
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.