• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Django Slides v1.0
 

Django Slides v1.0

on

  • 1,281 views

Mis slides en el ENLi 2011, en el mini-taller de Django...

Mis slides en el ENLi 2011, en el mini-taller de Django...

Statistics

Views

Total Views
1,281
Views on SlideShare
1,237
Embed Views
44

Actions

Likes
1
Downloads
10
Comments
0

1 Embed 44

http://314159bits.wordpress.com 44

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Django Slides v1.0 Django Slides v1.0 Presentation Transcript

    • Django:A High Caliber Framework By Omar TrinidadGutiérrez Méndez
    • Django Python MOpen Source V DRY principle CRA framework BSD licenseD Multiplataform
    • They are using Django among others...
    • Installing Django$ tar xzvf Django-1.2.X.tar.gz$ cd Django-1.2.X.tar.gz$ sudo python setup.py install$ python>>> import django>>>
    • Projects $ mkdir django-projects $ cd django-projects $ django-admin.py startproject enli-test $ ls enli-test✗✗ ...
    • Four Files?● __init.py__: A mark for Python package● manage.py: A command-line utility● settings.py: Configuration for a project● urls.py: URL declarations for the project
    • Isnt magic is technology
    • It works? $ python manage.py runserver✗✗ ...
    • Flying with Django
    • S etting up some things
    • Create an App $ python manage.py startapp regisApp✗ $ ls regisApp✗✗ __init.py__✗ models.py✗ tests.py✗ views.py
    • Setting up the Database settings.py is used to...✗✗ ...✗ ENGINE:...sqlite3,✗ NAME:/dir/project/site/name.db,✗ ...✗✗ $ python manage.py syncdb✗
    • Our example
    • Models: Relationships● Modify models.py:● Relationships: ● Many-to-many: field = models.ManyToManyField(Object) ● Many-to-one: field = models.ForeignKey(Object) ● One-to-one: field = models.OneToOneField(Object)
    • Mod els: Fields● Fields: ● Text: field = models.TextField() ● Varchar: field = models.CharField(max_length=000) ● Integer: field = models.IntegerField() ● Boolean: field = models.BooleanField()
    • Setting up the Models settings.py is used to...✗✗ ...✗ INSTALLED_APPS = (✗✗ enli-test.regisApp,✗ ... $ python manage.py sql regisApp✗ $ python manage.py syncdab✗
    • Magic?
    • Django includ e an admin site settings.py again...✗✗ ...✗ INSTALLED_APPS = (✗ django.contrib.admin, ... $ python manage.py syncdb
    • Django includ e an admin site Edit urls.py✗✗ $ python manage.py runserver
    • Contact● E-mails: ● omar_vpa@hotmail.com y ● omar.vpa@gmail.com● Twitter: @omar_trinidad● Blog: http://www.314159bits.wordpress.com
    • Thanks● To Jesucrist Lord● To ENLi organizers● To OpenOffice by Impress● And of course, all of you, because you are here yet :)