Hi,

I want to write a web site for tourists about the city I live in.
A main component will be a sightseeing product:
It consists of sights, that can be ordered in lists or in guided tours.
As I am an absolute beginner in django, I need already help at this  
point:

How can I add sights to guided tours and change their order if needed?

I would like to have a field in each guided tour to add sights and a  
list of sights, that were already added with 2 arrows after their  
name and a delete button to remove it from that tour.

And where can I find some documentation about using PIL with django  
(yes - I am also a python newbie :))


Thanks, Manuel  

My models.py looks like this right now:


from django.db import models


class GuidedTour(models.Model):
     name = models.CharField(maxlength=200, core=True)
     discription =models.CharField(maxlength=200)

     class Admin:

         list_display = ('name'),
         search_fields = ('name',)
         list_per_page = 20

class Sight(models.Model):
     name = models.CharField(maxlength=200, core=True);
     slug= models.SlugField(prepopulate_from= 
('name',),help_text='Automatically built from the name.',
           null=True,
   )
     place =  models.CharField(maxlength=200);
     entrance_fee = models.FloatField(max_digits=4,decimal_places=2)
     short_description = models.CharField(maxlength=500)
     description = models.TextField()
     def __str__(self):
         return self.name

     class Admin:

         list_display = ('name'),
         search_fields = ('name',)
         list_per_page = 20




class Image(models.Model):
      image = models.ImageField(null=True, upload_to='.',  
blank=True,core=True)
      description =models.CharField(maxlength=20,core=True,)
      def __str__(self):
             return self.image



class SightImage(Image):
         sight=models.ForeignKey(Sight,edit_inline=models.TABULAR)



class Map(Image):
     guidedtour=models.ForeignKey 
(GuidedTour,edit_inline=models.TABULAR, num_in_admin=1)



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to