Niharika Kohli

Page 2


6 Aug ‘14

For the past couple of days I’ve been resolving issues in deployment of the website. Things I did today:

  1. Fixed DATABASES in production.py.
  2. Created table in database and synced it.
  3. It was giving an error in loading static files. “Unknown command: collectstatic”. I explicitly set the DJANGO_SETTINGS_MODULE variable in env.sh to tell it where to find the required settings file.
  4. IP address is incorrect. Shows localhost address. I tried to switch to using django-ipware but it triggered a new series of errors.

Tasks for tomorrow:

  1. Fix IP address
  2. Check saving of bugs in database
  3. Check issues on logging into Admin end.

View →


3 Aug ‘14

The necessary JS and CSS files were not being loaded. I ran a
“ python manage.py findstatic ”. It told me some apps were not installed.

  • django_extensions
  • debug-toolbar
  • South
  • django_tables2
  • pyscopg2

After installing these, findstatic was running fine but required files were not listed in directory. I setup my repo as remote and updated the box. I also updated the PROJECT_ROOT in production.py. Now the CSS files load, but JS ones don’t. Weird.

I learnt about the grep and pipes command from Sheila. She also told me how we could write our own bash functions to shorten queries or commands.

Tasks for tomorrow:

  • Get the JS files to load
  • Setup the postgresql db on server

View →


2 Aug, ‘14

Sheila and I setup deployed the website on the backspace VM finally today.
It can be accessed here. The JS and CSS files are not getting loaded, that’s an issue I will deal with tomorrow. Here’s some bugs and errors we encountered while deploying the website:

  • Secret key was missing. Sheila suggested I save it off the VM and add it to gitignore. I did that, but the commit didn’t deploy on VM. Error code 128. So I saved the key on an environment variable in the box itself, which worked.
  • Next up, the URL gave a 500. Logs told us: ImproperlyConfigured: Secret-key. This meant that the environment variable isn’t loading before a=out app runs. So we added it to the deployment/runserver.sh.j2 Jinja file.
  • Another 500. It wanted a default Cache which we hadn’t configured. We decided to use locmemcache for now with the website.
  • A 400 this time. Skay figured that we needed to set ALLOWED_HOSTS...

Continue reading →


1 Aug ‘14

Sheila setup a rackspace VM for me to deploy the Django app. It’s the first time I’m using (and learning) Fabric.

Issues faced:

  • VM freezed everytime I entered the password. Resolved by setting env.password string in fabric task.
  • Jinja not found. I installed jinja explicitly.
  • Unknown command: collectstatic. I logged into the vm and installed django, I still get the same error.
Fatal error: sudo() received nonzero return code 1 while executing!

Requested: source /home/bugtracker/venvs/2014-08-01.3/bin/activate && python manage.py collectstatic --noinput --clear --settings=bugtracker.settings.production
Executed: sudo -S -p 'sudo password:'  -u "bugtracker"  /bin/bash -l -c "cd /home/bugtracker/site/bugtracker/bugtracker && source /home/bugtracker/venvs/2014-08-01.3/bin/activate && python manage.py collectstatic --noinput --clear --settings=bugtracker.settings.production"
...

Continue reading →


30 July ‘14

I installed vagrant on my Ubuntu VM, which I then had to upgrade from 1.0.1 to 1.6.3 (the latest). The Ubuntu maintainers didn’t stock the latest version, so I had to get it from the vagrant website directly. I ran a ‘vagrant up’ after the installation completed and got the following error message:

Warning: Connection timeout. Retrying...

This went on for about twenty times after which it terminated indicating error in networking of box. I looked up online and found several ‘fixes’ but none of them worked for me yet. I will exercise my other option and try to run the app on Windows itself tomorrow. I’ve vagrant on Windows already, so it should not be much problematic.

View →


29 July ‘14

I tried deploying the app on the VM by merging skay’s commit. I installed vagrant, but it’s version 1.0.1, far from being the latest. Upgrading to the latest version needs me to remove this and reinstall the new one. Also, skay suggested that it might become heavy on the VM at some point, so I am contemplating trying deploying the app on Windows itself. I’ll try and be done with this part by tomorrow.

View →


28 July ‘14

I talked to Sheila about getting the app up and running on a server. She’s helping me by writing fabric scripts to automate the process (something I am completely unfamiliar with). She gave me the link to a helpful blogpost for deploying a django project for the first time. It can be found here.

View →


24 July ‘14

I spent most of the day improvising the forms and looking up better ways I could take and save a page screenshot. I have two major tasks left to do now:

  • Setup the app on a server
  • Link it to the streaming system so that I can fetch the stream title and video stats and also take the screenshot.

I suspect the latter to be most difficult. After that, I can spend time testing and add-on features in the Admin panel.

View →


23 July ‘14

Modified the form fields today and added a little more design to it. I learnt how to include drop-down fields in Django models.

STATUS_CHOICES = (
        ('New', 'New'),
        ('Assigned', 'Assigned'),
        ('Discard', 'Discard'),
        ('Patch to review', 'Patch under review'),
        ('Resolved', 'Resolved'),
    )
    bugstatus = models.CharField(max_length=100, default='New', choices = STATUS_CHOICES)

    PRIORITY_CHOICES = (
        ('High', 'High'),
        ('Normal','Normal'),
        ('Low', 'Low'),
    )
    bugpriority = models.CharField(max_length=100, default='Unprioritised', choices = PRIORITY_CHOICES)
    ```

View →


22 July ‘14

Finally had success in resolving the bug about view not loading. The url was bring masked by another. I implemented the Edit and Delete functionalities on bugs today. They are in their most basic form, for now.
Every bug has an Edit and Delete button associated with it. Hitting edit takes you to a form with pre-populated data, which can be edited by the admin.
Clicking Delete, deletes the bug and refreshes the page.
I did some basic styling for the forms as well.

View →