Generic ManyToMany lockup

2010-08-06 Thread Anders Eide
Hello! I'm setting up a blog, and for learning purposes I want to make everything as generic as possible. My tagging app looks like this -- class Tag(models.Model): name = models.SlugField(max_length=30, unique=True) class TagRelation(models.Model): tag = models.ForeignKey(Tag)

URL data in templatetags

2010-04-05 Thread Anders Eide
Hello! How can i get information from request.GET in a inclusion tag? http://docs.djangoproject.com/en/1.1/howto/custom-template-tags/#inclusion-tags - Anders -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: weird request.user problem in view

2010-02-13 Thread Anders Eide
I know. Just a typo in this post. Thanks for trying to help anyway :) the error was in the urls.py /user// /user/page/ When loading /user/page/ /user/ wrote: > On 13 February 2010 13:46, Anders Eide wrote: > > > > > did a stupid PEBCAK i the urls.py file. Works fine now >

Re: weird request.user problem in view

2010-02-13 Thread Anders Eide
did a stupid PEBCAK i the urls.py file. Works fine now On Feb 13, 1:33 pm, Anders Eide wrote: > Why on earth doesn't this user_page view work? Getting "404, No User > matches the given query." > > from django.contrib.auth.models import User > from django.templat

weird request.user problem in view

2010-02-13 Thread Anders Eide
Why on earth doesn't this user_page view work? Getting "404, No User matches the given query." from django.contrib.auth.models import User from django.template import RequestContext from django.shortcuts import render_to_response, get_object_or_404 def user_page(request): user = User.get_obje

Re: Updating data

2010-02-08 Thread Anders Eide
Thank you so much! I'm new to Django and I have to say that the framework is so easy to use that it's frustrating to find out how to do things -Anders On Feb 8, 3:09 pm, Tom Evans wrote: > On Mon, Feb 8, 2010 at 1:46 PM, Anders Eide wrote: > > I have a table width movies,

Updating data

2010-02-08 Thread Anders Eide
I have a table width movies, and I would like to make a form and a view thats updates a row. I build the form automatically from a model class SaveMovieForm(ModelForm): class Meta: model = Movie id = forms.IntegerField( widget = forms.HiddenInput(), required = Fals