[pyar] [Consulta] Sobre django

Apokalyptica Painkiller apokalyptica79 en gmail.com
Mar Mayo 8 18:53:24 ART 2012


A Maxi por la ayuda va [?][?][?][?][?][?][?][?][?][?][?][?][?][?]

Y a Jamil por el link va [?][?][?][?][?] asi que le mando [?][?]

[?]

El 8 de mayo de 2012 18:49, Apokalyptica Painkiller <
apokalyptica79 en gmail.com> escribió:

> Gracias gentes :D
>
> El 8 de mayo de 2012 18:44, Jamil Enriquez Deceano <
> jenriquezdeceano en gmail.com> escribió:
>
> Se me olvidaba y podes verlo en video en youtube también.
>> http://www.youtube.com/watch?v=wOom6ize27o
>> navega por la lista de reproduccion del usuario y veras que esta
>> interesante sus videos de django
>>
>> El 8 de mayo de 2012 16:42, Jamil Enriquez Deceano <
>> jenriquezdeceano en gmail.com> escribió:
>>
>> Encontre esto en la web de ahi me apoyo
>>> http://programmersbook.com/chapter/22/Django/
>>> Saludos
>>>
>>> El 8 de mayo de 2012 16:34, Apokalyptica Painkiller <
>>> apokalyptica79 en gmail.com> escribió:
>>>
>>> GRANDE MAXI, SOS GROSO SABELO.
>>>>
>>>> Jamil gracias por el link :)
>>>>
>>>> El 8 de mayo de 2012 18:32, Maxi <maxirobaina en gmail.com> escribió:
>>>>
>>>>
>>>>> El 08/05/2012 18:24, "Apokalyptica Painkiller" <
>>>>> apokalyptica79 en gmail.com> escribió:
>>>>>
>>>>> >
>>>>> > Añado más a lo anterior por las dudas.
>>>>> >
>>>>> > El error en el navegador es el siguiente:
>>>>> >
>>>>> >> NameError at /admin/polls/choice/add/
>>>>> >>
>>>>> >> name 'Choice' is not defined
>>>>> >>
>>>>> >> Request Method:
>>>>> >> GET
>>>>> >> Request URL:
>>>>> >> http://127.0.0.1:8000/admin/polls/choice/add/
>>>>> >> Django Version:
>>>>> >> 1.3.1
>>>>> >> Exception Type:
>>>>> >> NameError
>>>>> >> Exception Value:
>>>>> >>
>>>>> >> name 'Choice' is not defined
>>>>> >>
>>>>> >> Exception Location:
>>>>> >> /home/ozymandias/demo/mysite/polls/admin.py in ChoiceInline, line 8
>>>>> >> Python Executable:
>>>>> >> /usr/bin/python
>>>>> >> Python Version:
>>>>> >> 2.7.2
>>>>> >
>>>>> >
>>>>> > Y mi codiguito es:
>>>>> >
>>>>> >> from polls.models import Poll
>>>>> >>
>>>>> >> from django.contrib import admin
>>>>> >>
>>>>> >>
>>>>> >> class PollAdmin(admin.ModelAdmin):
>>>>> >>
>>>>> >> fields = ['pub_date', 'question']
>>>>> >>
>>>>> >>
>>>>> >> class ChoiceInline(admin.StackedInline):
>>>>> >>
>>>>> >>     model = Choice                               ----> LINEA 8
>>>>> >>
>>>>> >>     extra = 3
>>>>> >>
>>>>> >>
>>>>> >> class PollAdmin(admin.ModelAdmin):
>>>>> >>
>>>>> >>     fieldsets = [
>>>>> >>
>>>>> >>         (None,               {'fields': ['question']}),
>>>>> >>
>>>>> >>         ('Date information', {'fields': ['pub_date'], 'classes':
>>>>> ['collapse']}),
>>>>> >>
>>>>> >>     ]
>>>>> >>
>>>>> >>     inlines = [ChoiceInline]
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> admin.site.register(Poll, PollAdmin)
>>>>> >>
>>>>> >>
>>>>> >> admin.site.register(Choice)
>>>>> >>
>>>>> >>
>>>>> >
>>>>> >
>>>>>
>>>>> te falta importar Choice
>>>>>
>>>>> from polls.models import Poll, Choice
>>>>>
>>>>> > Gracias, saludos
>>>>> > El 8 de mayo de 2012 18:12, Apokalyptica Painkiller <
>>>>> apokalyptica79 en gmail.com> escribió:
>>>>> >
>>>>> >> Hola gente, pregunta y valen como siempre las (puteadas)
>>>>> reprimendas pertinentes.
>>>>> >>
>>>>> >> Instalé django en mi Linux Mint 12 y estoy siguiendo los pasos del
>>>>> tuto, el problema es el siguiente, estoy en el tutorial02.
>>>>> >>
>>>>> >> Hay algo que no estoy pudiendo hacer, en la segunda parte del tuto
>>>>> https://docs.djangoproject.com/en/dev/intro/tutorial02/
>>>>> >>
>>>>> >> En la parte que dice Adding related objects me muestra el siguiente
>>>>> código:
>>>>> >>
>>>>> >>>
>>>>> >>> from polls.models import Choice
>>>>> >>>
>>>>> >>> admin.site.register(Choice)
>>>>> >>
>>>>> >> Hasta ahí llego, anda re bien el problema viene después, en donde
>>>>> tengo que insertar el siguiente código:
>>>>> >>
>>>>> >>>
>>>>> >>> class ChoiceInline(admin.StackedInline):
>>>>> >>>     model = Choice
>>>>> >>>     extra = 3
>>>>> >>>
>>>>> >>> class PollAdmin(admin.ModelAdmin):
>>>>> >>>     fieldsets = [
>>>>> >>>         (None,               {'fields': ['question']}),
>>>>> >>>         ('Date information', {'fields': ['pub_date'], 'classes':
>>>>> ['collapse']}),
>>>>> >>>     ]
>>>>> >>>     inlines = [ChoiceInline]
>>>>> >>>
>>>>> >>> admin.site.register(Poll, PollAdmin)
>>>>> >>
>>>>> >> Me dice que antes de poner eso tengo que:
>>>>> >>
>>>>> >>> Remove the register() call for the Choice model. Then, edit
>>>>> the Poll registration code to read:
>>>>> >>
>>>>> >>
>>>>> >> Para luego colocar el fragmento de código que te mostré
>>>>> anteriormente, el tema es que no exactamente que register() es el que tengo
>>>>> que eliminar.
>>>>> >>
>>>>> >> El contenido de mi admin.py es el siguiente:
>>>>> >>
>>>>> >>>> from polls.models import Poll
>>>>> >>>>
>>>>> >>>> from django.contrib import admin
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> class PollAdmin(admin.ModelAdmin):
>>>>> >>>>
>>>>> >>>>     fields = ['pub_date', 'question']
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> class PollAdmin(admin.ModelAdmin):
>>>>> >>>>
>>>>> >>>>     fieldsets = [
>>>>> >>>>
>>>>> >>>>         (None,               {'fields': ['question']}),
>>>>> >>>>
>>>>> >>>>         ('Date information', {'fields': ['pub_date'], 'classes':
>>>>> ['collapse']}),
>>>>> >>>>
>>>>> >>>>     ]
>>>>> >>>>
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> admin.site.register(Poll, PollAdmin)
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> from polls.models import Choice
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> admin.site.register(Choice)
>>>>> >>
>>>>> >>
>>>>> >>  Lo que creo que me pide es que borre es lo siguiente:
>>>>> >>
>>>>> >>>
>>>>> >>> from polls.models import Choice
>>>>> >>>
>>>>> >>> admin.site.register(Choice)
>>>>> >>
>>>>> >> Probé lo siguiente:
>>>>> >>
>>>>> >> # admin.site.register(Choice) y agregar todo ese bloque de
>>>>> fragmento, pero cuando ejecuto me da un error, entonces volví y lo deje
>>>>> como estaba pero sigo trabada en esa parte.
>>>>> >>
>>>>> >> Seguro que es una super boludez y no la estoy pudiendo ver, desde
>>>>> ya muchas gracias.
>>>>> >>
>>>>> >> Saludos
>>>>> >>
>>>>> >> --
>>>>> >>
>>>>> >>
>>>>> >> Divine queen of evil
>>>>> >> Sowing her seeds of hate
>>>>> >> Mistress of pain
>>>>> >> Diva satanica - Master of temptation
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > I live each day
>>>>> > Like it's my last
>>>>> > I live for rock and roll
>>>>> > I never look back
>>>>> >
>>>>> > I'm a rocker
>>>>> > Do as I feel as I say
>>>>> > I'm a rocker
>>>>> > And no one can take that away
>>>>> >
>>>>> >
>>>>> >
>>>>> > _______________________________________________
>>>>> > pyar mailing list pyar en python.org.ar
>>>>> > http://listas.python.org.ar/listinfo/pyar
>>>>> >
>>>>> > PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>>>> >
>>>>> > La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre
>>>>> de Argentina - http://www.usla.org.ar
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> pyar mailing list pyar en python.org.ar
>>>>> http://listas.python.org.ar/listinfo/pyar
>>>>>
>>>>> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>>>>
>>>>> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>>>>> Argentina - http://www.usla.org.ar
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> I live each day
>>>> Like it's my last
>>>> I live for rock and roll
>>>> I never look back
>>>>
>>>> I'm a rocker
>>>> Do as I feel as I say
>>>> I'm a rocker
>>>> And no one can take that away
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> pyar mailing list pyar en python.org.ar
>>>> http://listas.python.org.ar/listinfo/pyar
>>>>
>>>> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>>>
>>>> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>>>> Argentina - http://www.usla.org.ar
>>>>
>>>
>>>
>>
>> _______________________________________________
>> pyar mailing list pyar en python.org.ar
>> http://listas.python.org.ar/listinfo/pyar
>>
>> PyAr - Python Argentina - Sitio web: http://www.python.org.ar/
>>
>> La lista de PyAr esta Hosteada en USLA - Usuarios de Software Libre de
>> Argentina - http://www.usla.org.ar
>>
>
>
>
> --
> I live each day
> Like it's my last
> I live for rock and roll
> I never look back
>
> I'm a rocker
> Do as I feel as I say
> I'm a rocker
> And no one can take that away
>
>
>


-- 
I live each day
Like it's my last
I live for rock and roll
I never look back

I'm a rocker
Do as I feel as I say
I'm a rocker
And no one can take that away
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120508/d8880ea5/attachment.html>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: 338.gif
Type: image/gif
Size: 541 bytes
Desc: no disponible
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120508/d8880ea5/attachment.gif>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: 981.gif
Type: image/gif
Size: 577 bytes
Desc: no disponible
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120508/d8880ea5/attachment-0001.gif>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: 983.gif
Type: image/gif
Size: 280 bytes
Desc: no disponible
URL: <http://listas.python.org.ar/pipermail/pyar/attachments/20120508/d8880ea5/attachment-0002.gif>


More information about the pyar mailing list