Re: Dealing with 'date' ranges in template?

2009-01-14 Thread Daniel Roseman
On Jan 13, 9:40 pm, Manfred wrote: > Hello, > > I wrote a special kind of blog- or news application. One of the > specialities of this application is, that authors are able to make > entries visible/invisible by a date range or by a simple switch to > hide the entry.

post_syncdb signal: Called several times

2009-01-14 Thread Thomas Guettler
Hi, I read the docs for the sync_db signal: http://docs.djangoproject.com/en/dev/ref/signals/#post-syncdb The signal gets fired several times. Since my app has several model classes. But how can you know that the tabel for a particular model was just created? Or do you need to write the

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
Also my admin code is from TECHNOBUD.visitcard.models import Article from django.contrib import admin admin.site.register(Article) Need help :( I tried to do everything from the beginning, so started a new project. I added there django tiny_mce application. I added these code to my

Re: Getting url/host/domain info in settings.py

2009-01-14 Thread Tom Dyson
Settings can be altered at runtime - the middleware code I referenced does this - but the Django docs warn against it: http://docs.djangoproject.com/en/dev/topics/settings/#altering-settings-at-runtime I'd recommend using middleware to set the subdomain in the request scope, e.g.:

Transactions not working

2009-01-14 Thread thomasbecht...@googlemail.com
Hi all, Problem: I want to use Transaction to save data to a postgresql-db. Error: IntegrityError: doppelter Schlüsselwert (double keyvalue) verletzt (harm) Unique-Constraint »measurements_loggerdata_logger_id_key« My Model looks like this: class LoggerData(models.Model): logger =

a different kind of file path field

2009-01-14 Thread DrKayBee
Hi, I'm creating a task journal using django for personal use. I'm creating an application wherein I require a CharField to store a file location on a local drive. This is different from the FileField, since I do not want to 'upload' the file to any different location on my local drive, just to

request.user objects in base.html

2009-01-14 Thread izzy_dizzy
Hi all, I'm having a hard time on how to use request.user objects in base.html. I know that we can use requestcontext to be able to render request.user and its objects on a given template but I would like someone help me to be able to use it on base.html like: {% if user.is_authenticated%} You

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread izzy_dizzy
Try using django-tiny_mce Here's its documentation: http://django-tinymce.googlecode.com/svn/tags/release-1.2/docs/.build/html/index.html On Jan 14, 3:26 pm, "Oleg Oltar" wrote: > Ok, I read the doc...But not sure if I done everything correctly, as the > tinyMCE is

Re: request.user objects in base.html

2009-01-14 Thread Alan
On your views.py, do something like: @login_required def readme(request): return render_to_response('acpypi/readme.html', {'user': request.user}) I mean, your view has to pass the 'user' value to the template. I use this very same scheme where all my pages extent base.html, so in my

How to import Hotmail/Messenger contacts...

2009-01-14 Thread bcurtu
Is there any API like gdata or bbauth to authenticated against hotmail servers to be able to read hotmail contacts? thanx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
yep, trying it But still not sure how to add it to admin On Wed, Jan 14, 2009 at 10:54 AM, izzy_dizzy wrote: > > Try using django-tiny_mce > > Here's its documentation: > http://django-tinymce.googlecode.com/svn/tags/release-1.2/docs/.build/html/index.html > > > > On Jan

Re: Getting url/host/domain info in settings.py

2009-01-14 Thread Donn
Tom, thanks for your feedback. I guess what I was asking was how to get the domain/subdomain info from places like models and settings -- i.e. places that have no connection to a request. Still, I see a way through and will employ your suggestions. \d

Re: How to find out more info about "Error: No module named ..."

2009-01-14 Thread Alan
Assuming you are in your project dir, I think it has to be: python -v ./manage.py validate Alan On Wed, Jan 14, 2009 at 02:59, Karen Tracey wrote: > On Tue, Jan 13, 2009 at 1:21 PM, jhill10110 wrote: > >> >> I am getting a module load error but I

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread kamil
Hi Oleg You must create your admin config eg: class ArticleOptions(admin.ModelAdmin): class Media: js = ('/static_media/js/tiny_mce/tiny_mce.js', '/static_media/ js/textareas.js') Please check if it correspond to your urs. good luck kamil On Jan 13, 9:43 pm, "Oleg Oltar"

I'm moving to Oxford

2009-01-14 Thread Will McGugan
Hi, I'm sending this out to everyone in my gmail contacts, because I'm lazy. Apologies if you don't need to know this. I'm moving to Oxford tomorrow (Thursday 15th). Please get in touch if you need my new address. My landline will change, but you can always get me on my mobile. I wont have

admin model search

2009-01-14 Thread Bobby Roberts
hi all... I have search fields setup in my admin model as such: search_fields = ['name','postdate','testimony'] When i try to search , it just shows everything in the database. Am I missing something here? TIA --~--~-~--~~~---~--~~ You received this

Re: How to add tinyMCE to django 1.0.2 admin

2009-01-14 Thread Oleg Oltar
it, worked! thanks everyone! On Wed, Jan 14, 2009 at 3:40 PM, kamil wrote: > > Hi Oleg > > You must create your admin config eg: > > class ArticleOptions(admin.ModelAdmin): > >class Media: >js = ('/static_media/js/tiny_mce/tiny_mce.js', '/static_media/ >

Re: Overriding Model's save method: error propagation

2009-01-14 Thread Markus
David, I've been looking for a solution for this problem, too. Maybe this helps - I'm yet to try this out: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin Things seem to be underway though: http://code.djangoproject.com/ticket/6845

Getting a 'too many values to unpack' error

2009-01-14 Thread Michael
Hello, Here is my code: filter = {} if request.GET.get('color', '').isdigit(): filter['color_cat'] = request.GET['color'] if request.GET.get('origin', '').isdigit(): filter['collection__origin'] = request.GET['origin'] styles =

Re: Overriding Model's save method: error propagation

2009-01-14 Thread Markus T.
David, for me, these two links did the trick: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#adding-custom-validation-to-the-admin http://docs.djangoproject.com/en/dev/ref/forms/validation/#ref-forms-validation However, validation as described in the Django docs does not happen in the

Re: Overriding Model's save method: error propagation

2009-01-14 Thread Markus T.
if x > y: should read except: of course... --~--~-~--~~~---~--~~ 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,

ifequals Decimalfield comparison

2009-01-14 Thread Ardesco
So, I have a decimalfield that can be 3 different values. In my view, I pass in a dictionary of values that contains the appropriate decimal values as keys. {% for item in booklist %} {% for key, value in numvec.items %} {{item.number}} {% ifequals item.number value %} {{value}} {% endifequals

Re: I'm moving to Oxford

2009-01-14 Thread Marc Boivin
Glad you let the whole Django community know ;) On 09-01-14, at 08:52, "Will McGugan" wrote: > Hi, > > I'm sending this out to everyone in my gmail contacts, because I'm > lazy. Apologies if you don't need to know this. > > I'm moving to Oxford tomorrow (Thursday

Re: I'm moving to Oxford

2009-01-14 Thread Juan Hernandez
yes, we are going to miss you very much ;) So long london! On Wed, Jan 14, 2009 at 10:10 AM, Marc Boivin wrote: > Glad you let the whole Django community know ;) > > > On 09-01-14, at 08:52, "Will McGugan" wrote: > > Hi, > > I'm sending this out to

Re: Getting a 'too many values to unpack' error

2009-01-14 Thread Thomas Guettler
yourmodel.objects.filter(a) does not work since a seems to be a queryset. You need to use .filter(attribute=value) or something like this. BTW: Why do you do all the select_related() calls? Michael schrieb: > Hello, > Here is my code: > > filter = {} > if request.GET.get('color',

Re: Transactions not working

2009-01-14 Thread Thomas Guettler
You need to test if the data is already in the db first. There is a handy method: model_object, created = YourModel.objects.get_or_create(...) If you still get this errors, you might want to check if your sequence is in sync: select max(id) from yourapp_yourmodel; select * from

Re: I'm moving to Oxford

2009-01-14 Thread José Moreira
dont go, run from the white light! 2009/1/14 Juan Hernandez : > yes, we are going to miss you very much ;) > > So long london! > > On Wed, Jan 14, 2009 at 10:10 AM, Marc Boivin wrote: >> >> Glad you let the whole Django community know ;) >> >> >> On

Re: How to set the from a ModelChoiceField?

2009-01-14 Thread mb0...@googlemail.com
Thank you very much... it took me some time to figure it out. But now it works :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

redirect to results

2009-01-14 Thread Vince
Hi everyone, I am a bit confused about how to do what follows, I would appreciate any help. My django project is very simple I have a upload zip page, this page processes a zip file and it is being decompressed and stored in a folder for further purposes. After I check and unzip the file I call

mod_python 3.3.1, Python 2.4.6, Apache 2.2.9 (MacPorts) on Mac OS X 10.5.6 (Leopard)

2009-01-14 Thread peterandall
Hi All, I've been playing around with this for days and getting nowhere. I've got python2.4 installed via macports along with the standard Python2.3 and 2.5 installed in '/Library/Python/2.x'. I want to get mod_python working for the macports version of python(2.4) I've downloaded mod_python

User Messages

2009-01-14 Thread Tim
Hi all - I am using the messages framework to notify users when another user has commented on their profile or on an item they've posted. I was pretty excited to see that such an infrastructure was included with the authentication system out of the box. However, I was disappointed to see that

GeoDjango: Extract Latitude and Longitude from PointField

2009-01-14 Thread Alfonso
Hey, Must be missing something extraordinarily simple - how do I individually parse the latitude and longitude values from a PointField entry into my app's templates? I just want... Latitude: Longitude: Thanks, Al --~--~-~--~~~---~--~~ You received this

Re: mod_python 3.3.1, Python 2.4.6, Apache 2.2.9 (MacPorts) on Mac OS X 10.5.6 (Leopard)

2009-01-14 Thread peterandall
I've also tried doing this: $ cd /System/Library/Frameworks $ sudo mv Python.framework XXX_Python.framework $ cd $ ./configure --with-apxs=/opt/local/apache2/bin/apxs --with-python=/ opt/local/bin/python2.4 --with-max-locks=32 Then editing the src/Makefile and updating the LDFLAGS to

Re: GeoDjango: Extract Latitude and Longitude from PointField

2009-01-14 Thread J. Cliff Dyer
On Wed, 2009-01-14 at 09:49 -0800, Alfonso wrote: > Hey, > > Must be missing something extraordinarily simple - how do I > individually parse the latitude and longitude values from a PointField > entry into my app's templates? I just want... > > > Latitude: > Longitude: > > > Thanks, > >

Re: GeoDjango: Extract Latitude and Longitude from PointField

2009-01-14 Thread Ariel Mauricio Nunez Gomez
... point = models.PointField()... Longitude: {{point.x}} Latitude: {{point.y}} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django Continuous Integration

2009-01-14 Thread Adam V.
> Revision Control: How do you layout your development repository? I'm > using Subversion for my setup but would be interested in hearing what > else others are using (Mercurial, Bazaar, Git, etc) We're using Subversion. We have one big repository, but we treat it like two top-level repository,

trying to install a database for settings.py what should i do?

2009-01-14 Thread bconnors
i'm trying for a free download of mysql from the internet. the 1st 3 tries i've failed on. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: trying to install a database for settings.py what should i do?

2009-01-14 Thread Prashanth
On Wed, Jan 14, 2009 at 11:37 PM, bconnors wrote: > > i'm trying for a free download of mysql from the internet. the 1st 3 > tries i've failed on. > You dint bother to explain how you tried and beyond that you are asking this in the django mailing list which is no way

Re: Slow application performance...

2009-01-14 Thread SnappyDjangoUser
I am having a similar problem with super slow performance in my production environment (Apache with mod_python). Does anyone have suggestions of settings that I can try tweaking? Graham has provided a lot of useful information earlier in the post, but I am with Vernon in that I am unsure

Adding a view inside a view?

2009-01-14 Thread Bradley
I'm new to Django and I'm trying to modify an existing django website for a local newspaper. They would like to have a polls on the their website. I just used the tutorial from the djangoproject website to create the polls module. It works fine, except that I need it to work inside a section

Django VBulletin auth backend

2009-01-14 Thread Chris H.
Has anybody done any work on writing a Django auth backend for an existing VBulletin[1] website? I have a need to utilize the existing user database in a Django project and would appreciate not having to reinvent the wheel. My google-fu has failed me on this one, so it may not exist. Any other

the last line is plone\Python\lib\site-packages\django\db\backends\sqlite3\base.py

2009-01-14 Thread bconnors
In the settings.py it says “ If you're new to databases, we recommend simply using SQLite (by setting DATABASE_ENGINE to 'sqlite3').” I did that but get this error: C:\PROGRA~1\plone\Python\jan13django\mysite>..\..\python manage.py syncdb Traceback (most recent call last): File "manage.py",

Fwd: [wingide-users] Integrating with django's unit tests

2009-01-14 Thread James Matthews
-- Forwarded message -- From: Philip Gatt Date: Wed, Jan 14, 2009 at 7:10 AM Subject: [wingide-users] Integrating with django's unit tests To: wingide-us...@wingware.com Does anyone know how to integrate Wing with Django's unit tests? With my django projects,

list all context variables?

2009-01-14 Thread David Lindquist
Is there an easy way to see a list of all the context variables and their values available in a given template? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: the last line is plone\Python\lib\site-packages\django\db\backends\sqlite3\base.py

2009-01-14 Thread bconnors
my bad. i read that sqlite3 was supplied by python 2.5. i have python 2.4. the base.py says sqlite2 is correct for prior to python 2.5, but that didn't work either. tomorrow i install python 2.5. will that work? On Jan 14, 2:16 pm, bconnors wrote: > In the settings.py

how/where to constrain the relationships in a model?

2009-01-14 Thread Margie
Supose I want to model the following: A Task is owned by a family but may additionally have specific owners that are within that family. The model would look like this: class Family(models.Model): surName=models.CharField() class Task(models.Model): ownerFamily=models.ForeignKey(Family)

Re: how/where to constrain the relationships in a model?

2009-01-14 Thread Ariel Mauricio Nunez Gomez
Margie, My best bet would be to override the model's save method and do your validation there. http://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#overriding-default-model-methods Ariel On Wed, Jan 14, 2009 at 3:37 PM, Margie wrote: > > Supose I

Re: Help with m2m relationships through intermediary tables

2009-01-14 Thread felix
open a shell with ./manage.py shell from models import * fetch one of your Authors (one that has a job already) dir(author) that will list all the ways you can poke at it. always useful you should see some way to access the AuthorNewspaper directly from the Author object to display a whole

Re: the last line is plone\Python\lib\site-packages\django\db\backends\sqlite3\base.py

2009-01-14 Thread Briel
Yes, that should work. All you need is to create the db-file, and then give the name/path to it in settings.py -Briel On 14 Jan., 21:18, bconnors wrote: > my bad. i read that sqlite3 was supplied by python 2.5. i have python > 2.4. the base.py says sqlite2 is correct

Re: auth: get_profile(): create if it does not exist.

2009-01-14 Thread jweinstein
Where does this code go? I want to create a user profile for every user created. On Dec 18 2008, 2:37 am, "James Bennett" wrote: > On Wed, Dec 17, 2008 at 5:21 PM, Malcolm Tredinnick > > wrote: > > This would be the "standard" solution. I

Re: Adding a view inside a view?

2009-01-14 Thread Briel
I'm not sure exactly what you want. Do you want a single poll, that the admins can choose? Should users be able to create polls ect. Anyways, in case you only want to display a single poll, the easiest way to accomplish that would probably to create a boolean field called display or front_page.

Re: mod_python 3.3.1, Python 2.4.6, Apache 2.2.9 (MacPorts) on Mac OS X 10.5.6 (Leopard)

2009-01-14 Thread Graham Dumpleton
Use mod_wsgi instead, it should set up compiler flags correctly even for fussy MacPorts. I can't remember if I rolled those changes into mod_python in subversion trunk. If still want to try mod_python though use: svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk

Re: Slow application performance...

2009-01-14 Thread Graham Dumpleton
As before, if you can move to mod_wsgi and use its daemon mode try that as first step. This will eliminate memory swapping issues and other issues around startup cost of Apache child processes loading Django. Also gives a more predictable environment in which can then start doing testing as to

pizzas toppings, and subs

2009-01-14 Thread mamco
in the documentation the many to many relationship between toppings and pizzas is well presented (http://docs.djangoproject.com/en/dev/ topics/db/models/#many-to-many-relationships). My question has to do with something else that would have toppings, subs for example. If in my toppings model,

Problems with (Model)ChoiceField and the like

2009-01-14 Thread James Smagala
Hey All, There is a discussion here about building dynamic form select fields using __init__ on the form. This, by itself, is not hard. http://groups.google.com/group/django-users/browse_thread/thread/98bde0a6d818e627 Problem: I have a formset that needs each form in it to be created in this

Re: pizzas toppings, and subs

2009-01-14 Thread mamco
disregard, turns out it is quite simple. create another mantytomanyfield on the sub model. class Sub(models.Model): # ... toppings = models.ManyToManyField(Topping) I had this earlier, but got an error. I mis-read it to mean I couldn't do just this, but turns out I had another issue

request.user objects in base.html

2009-01-14 Thread izzy_dizzy
Hi, I'm new to django and I would like to know how to make request.user objects available in context of base.html template. I wonder if someone can give me a full code for a custom template tag for it. Thanks in advance --~--~-~--~~~---~--~~ You received this

no objects found

2009-01-14 Thread Brian
Django 1.0.2-1 If I do: >>> object=models.software.objects.get(id=267) >>> print models.software_installation.objects.filter(software=object) [] >>> print models.software_installation.objects.filter(software=object).count() 10 Huh? First statement says there are no results, next one says there

Re: Adding a view inside a view?

2009-01-14 Thread Eric Abrahamsen
On Jan 15, 2009, at 2:42 AM, Bradley wrote: > > I'm new to Django and I'm trying to modify an existing django website > for a local newspaper. They would like to have a polls on the their > website. I just used the tutorial from the djangoproject website to > create the polls module. It

Re: Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-14 Thread Malcolm Tredinnick
On Tue, 2009-01-13 at 19:30 +, Rachel Willmer wrote: > I've just upgraded some code to Django 1.0 and the caching stopped working. > > I have found a fix but I don't understand what's happening so if > anyone can explain, I'd be grateful. > > My code used to look somthing like this

Re: temporary user model

2009-01-14 Thread Malcolm Tredinnick
On Tue, 2009-01-13 at 22:39 +, Mengsong Chen wrote: > Just wonder if anyone have achieved such a temporary user model to > allow unregistered user to use some features, > but will clean up the data after the session completed if the user is > not going to register. You could use a user

Re: post_syncdb signal: Called several times

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 10:42 +0100, Thomas Guettler wrote: > Hi, > > I read the docs for the sync_db signal: >http://docs.djangoproject.com/en/dev/ref/signals/#post-syncdb > > The signal gets fired several times. Since my app has several model classes. The "since" bit doesn't follow. The

Re: how/where to constrain the relationships in a model?

2009-01-14 Thread Margie
Thanks Ariel! That makes sense ... On Jan 14, 1:52 pm, Ariel Mauricio Nunez Gomez wrote: > Margie, > > My best bet would be to override the model's save method and do your > validation there. > > http://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddo...

Re: list all context variables?

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 13:01 -0700, David Lindquist wrote: > Is there an easy way to see a list of all the context variables and > their values available in a given template? Have a look at the "debug" template tag. Regards, Malcolm --~--~-~--~~~---~--~~ You

Re: no objects found

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 16:54 -0800, Brian wrote: > Django 1.0.2-1 > > If I do: > > >>> object=models.software.objects.get(id=267) > >>> print models.software_installation.objects.filter(software=object) > [] > >>> print models.software_installation.objects.filter(software=object).count() > 10 >

How can I process ajax code post encodeURI string ?

2009-01-14 Thread K*K
Hi, All. I'm using the Ajaxmethod to post some string after encodeURI function processed to the Django server, How can I decodeURI in the server side ? Very simple question, But I'm a newbie of Django for process multi- language program. So thank you very much.

Re: request.user objects in base.html

2009-01-14 Thread Igor Sobreira
On Wed, Jan 14, 2009 at 9:28 PM, izzy_dizzy wrote: > > Hi, > > I'm new to django and I would like to know how to make request.user > objects available in context of base.html template. I wonder if > someone can give me a full code for a custom template tag for it. > Hi, You

Re: How does django.contrib.auth.views.login work?

2009-01-14 Thread scelerat
On Jan 9, 9:16 am, Brian Neal wrote: > If you use RequestContext and have the settings in your > TEMPLATE_CONTEXT_PROCESSORS, then the user variable will be available > for use in your templates. Check out: > >

Re: no objects found

2009-01-14 Thread Brian
On Jan 15, 1:57 pm, Malcolm Tredinnick wrote: > Please open a ticket for this and assign it to me (mtredinnick in Trac), Ok, done. Thanks. Brian May --~--~-~--~~~---~--~~ You received this

Mod-Python = Headaches (cannot find my settings file)

2009-01-14 Thread mclovin
I have my project settings file in: 'C:/projects/caliber/settings.py" I have mod_python activated (latest version as of today) along with Apache (latest version as of today) Now this is at the bottom of my httpd.conf file: SetHandler python-program PythonHandler

Re: Mod-Python = Headaches (cannot find my settings file)

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 20:33 -0800, mclovin wrote: > I have my project settings file in: > > 'C:/projects/caliber/settings.py" > > I have mod_python activated (latest version as of today) along with > Apache (latest version as of today) > > Now this is at the bottom of my httpd.conf file: > >

Re: Mod-Python = Headaches (cannot find my settings file)

2009-01-14 Thread mclovin
Here is my new revised: SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE caliber.settings PythonDebug On PythonPath "['C:/projects/'] + sys.path" still does not work. gives the same error

Model manager natural sort order

2009-01-14 Thread Delta20
Is there a way to make a model manager get_query_set function return items sorted in natural alphanumeric order? order_by returns things in rather than the ASCII order, which is not generally what users expect. For example, sorting by name for a set of objects with names: img10, img1, img103,

Re: Model manager natural sort order

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 21:14 -0800, Delta20 wrote: > Is there a way to make a model manager get_query_set function return > items sorted in natural alphanumeric order? order_by returns things in > rather than the ASCII order, which is not generally what users expect. Depends very much on which

Re: Mod-Python = Headaches (cannot find my settings file)

2009-01-14 Thread Malcolm Tredinnick
On Wed, 2009-01-14 at 20:44 -0800, mclovin wrote: > Here is my new revised: > > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE caliber.settings > PythonDebug On > PythonPath "['C:/projects/'] + sys.path" > > > still

Duplicating sitemap dictionary with a get variable

2009-01-14 Thread Alessandro Ronchi
I have a sitemap dictionary. I want to add in my sitemap.xml an url for every url of my sitemap with a ?lang=en ending. Is it possible? So, if my sitemap contains: http://www.detectorpoint.com/ http://www.detectorpoint.com/about/ I want my sitemap to contain: http://www.detectorpoint.com/

How do I manage the order of related objects?

2009-01-14 Thread scelerat
I've got a part/collection pairing of objects tables, and I'd like to know the best way to manage the order of things inside the table. Briefly: class Activity(models.Model): # etc... class ActivityPart(models.Model): order = models.IntegerField("order in parent", default=1)