Django handles inheritance tables with entries in them plugged in?

2012-11-18 Thread Federico Erbea
To give an example: I create a table "Library" in which I create 3 Libraries. Then create a table "Author" in which three authors associate each of the three libraries created before, so far I can manage very well with ForeignKey ... I then create another table "Book" which will specify the title

models.ManyToManyField

2013-04-17 Thread Federico Erbea
Hello everyone, I am a neophyte and maybe it's a stupid question so thank you in advance aid. My question is: can I go back and retrieve all the movies assigned to a specific actor, director, or other through the class film? Or do I have to create a specific class for each item to which I want t

Re: models.ManyToManyField

2013-04-18 Thread Federico Erbea
I think it is the first solution that you have proposed, but I can't figure out how to use it. Also, is there a way to make sure that the ID is automatically taken? With a proper publisher for loop I would like all the lists of movies for each actor. This is my urls.py from django.conf.urls.de

Re: models.ManyToManyField

2013-04-18 Thread Federico Erbea
I think it is the first solution that you have proposed, but I can't figure out how to use it. Also, is there a way to make sure that the ID is automatically taken? With a proper publisher for loop I would like all the lists of movies for each actor. This is my urls.py from django.conf.urls.de

Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Federico Erbea
I bought a Marco Beri's book "Sviluppare applicazioni web con django" but after the first chapter only explains the different functions in contrast to the first chapter where the functions were explained by developing them. I also bought "Instant Django Application Development Starter

Re: Hello everyone, can you tell me a good django's book that explains the various functions but at the same time develop a complete website chapter by chapter?

2013-05-09 Thread Federico Erbea
Thanks but there isn't something more new, maybe make with django 1.4? Il giorno giovedì 9 maggio 2013 10:56:17 UTC+2, Federico Erbea ha scritto: > > I bought a Marco Beri's book "Sviluppare applicazioni web con django" but > after the first chapter only explai

how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
Hello everyone thanks in advance on the aid, I'm new in programming in general. I would like to create a link (in Film.html) and using the ID to open a new page (Attore.html) where to load only the data associated with that ID but it doesn't do that since it loads all data of attori instead of

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
Sorry for the stupid question, but how? Thanks. *views.py :* from django.shortcuts import render_to_response, get_object_or_404from django.template import RequestContextfrom models import * def film(request): film = Film.objects.order_by("titolo") return render_to_response('Film.html',

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
In this way there isn't an exception but it doesn't load attore.nome e attore.cognome *Attore.html :* {% extends "Base.html" %} {% block titolo %}Attore{% endblock %} {% block contenuto %} {% for attore in film %} {{ attore.nome }} {{ attore.cognome }} {% endfor %}{% endblock %} -- Y

Re: how make a template's link using get_object_or_404 by pk=id

2013-05-10 Thread Federico Erbea
ok i'm totaly stupid {% extends "Base.html" %} {% block titolo %}Attore{% endblock %} {% block contenuto %} {{ attore.nome }} {{ attore.cognome }} {% endblock %} -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gr

View pictures from the template via models.FilePathField

2013-05-23 Thread Federico Erbea
I'm not sure this is the correct method to use, so I'm open to suggestions. Practically I want to display the image retrieving the path where they are saved from the database. In a class in models.py I have inserted: locandina = models.FilePathField( path = "C:/Users/Federico.Erbea/Google Drive

Some problems with Paginator

2013-06-06 Thread Federico Erbea
I'm new in python and django, so i'm sorry for the stupid question...:) This is in views.py def attore(request, id): attore = get_object_or_404( Attore, pk=id ) # return render_to_response('Attore.html', { 'film': Film.objects.filter( attori=attore ), 'attore': attore }) film_attor

Re: Some problems with Paginator

2013-06-07 Thread Federico Erbea
I'm really stupid, why i never think to the easiest way, never...I wrong "{% for film in attore.film_set.all %}" because i had write "{% for film in film_attore %}"...Sorry...;) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fr

How can I view in the templates the files that I stored by “models.FilePathField”?

2013-06-25 Thread Federico Erbea
I can't understand how to pass to the template a relative path rather than an absolute. Could you help me please...??! here a class of my models.py : class Brano( models.Model ): titolo = models.CharField( max_length=39 ) testo = models.TextField( max_length=1000 ) locandina = mod

Re: View pictures from the template via models.FilePathField

2013-06-27 Thread Federico Erbea
but ImageField, you should not use to save the imported files by users? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com