-2

I have just started a new job in which I will be overhauling and updating a web-application written in Django. I have a loose familiarity with Django (and have been reading up on the documentation for Django and external libraries like Django REST Framework). But I am hoping someone with lots of experience in quickly understanding existing web applications so they can update them would have some suggestions how how to best do so, both in general and with respect to Django.

What to look for in the code, tutorials to look at, perhaps there are some defined methodologies for understanding old code I can implement.

I realize this is a subjective question, but would appreciate any suggestions, including where to ask this question that might yield the best responses.

0

The same way you would get up to speed on any other program.

  1. Is there documentation? Read it!
  2. Are there Unit tests? Read them! Run them! Step though them!
  3. Start reading code
  4. Write unit tests to
    • explore the code
    • pin down behaviours
    • cover code before refactoring (to verify it does the same afterwords)
  5. step though/debug it

For Django specifically:

  1. Read the Django Docs, make sure you understand the basics of how to use the library
    • the tutorials are useful here
  2. Look at the settings.py file
  3. Look at your urlconf, usually urls.py to see what entry points you have
  4. Look at your Database Models
  5. Look at your views
  6. Look at your forms
  7. Run the app locally; and/or debug

Unit Tests are the most important tool you have. If none are existing start writing them, if they do exist add more where you need. Don't let your debug effort evaporate into the ether, record the effort in a unit test!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.