Friday, June 11, 2010

Coding Week 3

A third week of coding has gone by. The User Page status is at an "almost-there" status. The latest is uploaded to my GAE instance.
To have a user page, all users must have role assigned to them such as student,mentor,org_admin or program_admin. Only then do they get the option to Create a User Page on their sidebar. On the current instance, all users can Register as Student and then go ahead to create the User Pages.
However, there are still some things left to wind up with regards to User Pages, before I move onto extensive testing of this feature and then move on Calendars, which I have to start this week according to my timeline!

Things left to wind up:
  • listing all User Pages
  • Pulling present/past project data for student/mentors/org_admins
  • getting images api to upload profile picture(currently using blobstore to upload, but the picture doesn't seem to show up)
  • polishing CSS and layout of User pages
Upcoming Week:
  • Finish up with User Pages feature and start on testing.
  • Start coding work on Calendars

Sunday, June 6, 2010

GSoC 2010 Melange Testing Project: Week 2 of the Coding Period

In this week, I had planned to add test cases for app.soc.views.models.base.View as well as app.soc.logic.models.User.Logic and app.soc.views.models.User.View, app.soc.logic.models.Role.Logic and app.soc.views.models.Role.View.

As I mentioned in my project proposal, I want to use Django test client which acts as a dummy Web browser to test views of Melange because of its ease of use and good integration with Django (no surprise since it was developed by the Django team). So, I first tried to get Django test client working.

After many attempts, however, I still could not make it work. Then, I found that I could not even run Melange locally suddenly due to the error (google.appengine.api.yaml_errors.EmptyConfigurationFile). I first tired to solve the problem by checking the tracktrace and code. Unfortunately, however, I could not find the problem. I thought that I might have accidentally changed or removed some important files. So, I rebuilt my local Melange but it still did not work. I also tried to re-clone and rebuild another Melange, but it was still in a vain. At that time, I realized that I had to fall back on my last resort, asking my mentor Sverre :-) . Awesomely, Sverre found that the problem was due to the corrupted .appcfg_nag file and he then solved the problem by removing it.

After this problem was solved, I tried the test client again. However, it still did not work. So, I asked Sverre again and found that it is because I had used the trailing slash at the end of the url following Django's tradition while Melange uses a url pattern without the trailing slash. Finally, Django test client works!!! Hope I had asked Sverre earlier :-).

Because of these problems I encountered, I have not finished this week's work as planned. Fortunately, however, I have got Django test client working. In the next week, I will try to speed up my work, finish this week's work as soon as possible and then start next week's work load.