Immersion

April 8, 2013
  • install Ubuntu 10.12
  • students must install the OS Ubuntu10.12
  • install Django, Phyton, VM (virtual mahine), VirtualEnv
  • discuss partition when installing the OS
  • join trello.com
April 9, 2013
  • install synaptic and review the virtualenv
  • start with the DjangoProject tutorial
    • installation guide
    • tutorials #1-5
    • DjangoProject.com
  • checking the tool versions
    • virtual env (1.9x)
    • python (2.7.3)
    • ubuntu (10.12)
  •  familiarize the Ubuntu environment 
  • familiarize basic commands in python
  • understand how to activate and deactivate virtualenv
  • simononsoftware.com/virtual-tutorial
April 10, 2013

  • continuation of Python Project Tutorial
  • creating models and tables
  • using shell - python manage.py shell
  • virtualenv - tutorials and mercurial
  • working with tutorials #1 and #2
    • Notes!
    • running the server - python manage.py runserver to stop ctrl-c
    • ctrl alt t - new terminal
April 11, 2013
  • review and continuation of tutorial #1 to #4
  • discuss the errors in writing simple form in django app part4
  • get_object_on_404 error must be place at the top 
  • deleting the index(), default(),results() views from polls/views.py 
  •  install mercurial - sudo apt-get install mercurial
Mercurial tutorial #1 http://hginit.com/01.html
  • Create a repository
  • Add and remove files in a repository
  • After making changes, see what uncommitted changes you made, then
  • … commit if you like them,… or revert if you don’t.
  • See old versions of files, or even move your directory backwards and forwards in time
  • we can follow  this url http://mercurial.aragost.com/kick-start/en/basic/#creating-a-repository 
Creating a repository tutorial #2
  • creating an account in https://bitbucket.org/ for first repository
  • Set up a central repository and let team members clone off of it
  • Push changes into the central repository
  • Pull changes from the central repository
  • Merge changes from different contributors
PUSH TAH UGMA!!!
hg push https://mrserrano@bitbucket.org/mrserrano/recipes

April 15, 2013
  1. hg clone https://mrserrano@bitbucket.org/rcartagena/recipes
  2. hg add file.txt
  3. hg commit https://mrserrano@bitbucket.org/rcartagena/recipes
  4. hg push clone https://mrserrano@bitbucket.org/rcartagena/recipes
  5. hg log
  6. hg pull https://mrserrano@bitbucket.org/rcartagena/recipes
  7. hg update
  8. hg status
  9. hg merge
  • hg init: create a new repository.
  • hg add: schedule a file for addition.
  • hg diff: see changes that will be included in the next commit.
  • hg commit: save your changes in the current repository.
  • hg log: see all changes in your repository.
  • hg pull: get all changes from another repository into the current one.
  • hg push: send all changes from your repository to another one.
  • hg merge: join different lines of history. 
    hg help
 notes:
  • when you push it will automatically create a folder
  • install meldmerge - sudo apt-get install meld
  • Ctrl - H ==> unhide folder
  • Problem with the .hgrc folder: make sure the default path

April 16, 2013

reading site apps!!!



django-admin.py startproject mysite
 
start project: Curriculum Evaluation using Django


April 17-19, 2013

Curriculum management

creating models/apps

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
April 22-26, 2013 

fixing admin side [one or more methods within the class]
using for in, if ....
 
Admin.py and Models.py 
 
April 30, 2013 
 
USING IF (MODEL0
 
class SubjectsEnrolled(models.Model):
    student =  models.ForeignKey(Student)
    #STATUS = (
    #    ('1', 'Passed'),
    #    ('2', 'Failed'),
    #    ('3', 'No Grade'),
    #    ('4', 'Incomplete'),
    #)
    subject = models.ForeignKey(Subject)
    grade = models.DecimalField(max_digits=4, decimal_places=2, blank=True, null=True)
    #status = models.CharField(max_length=2, choices=STATUS, blank=True, null=True)
    status = models.CharField(max_length=8)
    schoolterm = models.ForeignKey(SchoolTerm,unique=True)

    def status(self): 
        p="Passed" 
        f="Failed" 
        ni="NG/INC"
        if self.grade > 0 and self.grade <= 3: 
            return p 
        elif self.grade > 4 and self.grade <= 5:
            return f     
        else: 
            self.grade ==0 and self.grade > 6
            return ni


    class Meta: 
        verbose_name = _('Subjects Enrolled') 
        verbose_name_plural = _('Subjects Enrolled') 

No comments: