Would you post the model and the relevant parts of the form and/or view?
In any case, you can easily fix it by following the error message's
suggestion of str(your_float). But if you think there's a discrepancy
between the way your fields are behaving, post some code and we'll see
if we can
On Jul 1, 2009, at 9:56 PM, Nick Fishman wrote:
>
> Hey everyone,
>
> I'm working with Django's named URL patterns, and was wondering how to
> fetch the name of the URL pattern that triggered the view. For
> example, with the following urlpatterns
>
> urlpatterns = patterns('',
>url(r'^archi
>
>
> The question, how can I return username of user in fields. I want
> the JSON response to contain value user.username instead of id of
> user oject
>
> Thanks,
> Oleg
>
Get everything you want into a dictionary. Then something like this
will give you what you need:
return safestring.ma
On Jul 11, 2009, at 6:23 PM, adelaide_mike wrote:
>
> Thanks Alex.
>
> A simpler way out would be if the agent field, which is a foreign key
> pick list, could be caused to show only those values I determine
> dynamically.
>
> Is this possible in a ModelForm?
>
> Mke
If I understand correctly,
My Django app uses postgres. I've defined TEST_DATABASE_NAME in
settings and created that database in postgres. However, I haven't
given my Django DB user permission to create and destroy databases --
just to own the database. So, I can't run manage.py test, because it
fails to delete the
>>
>
> I highly highly recommend that you separate your development, testing,
> and production instances of your DB and web server. You should never
> ever develop or test on a production system!
>
> - --
> Randy Barlow
That's already the case. I guess I wasn't clear enough. All the tests
wil
we can even get one of those onto
each podium, I think we could have awesome sound quality.
So, if there's already something planned, please let me know. If not,
let's see if we can hack something together so that everyone can
benefit from an
I had the same terrors. Unfortunately I didn't document exactly how I
did it, but my best recollection is that this will work:
1. Update setuptools: sudo easy_install -U setuptools
2. Download and unzip the tarball for psycopg2.
3. Edit the config file for psycopg2 as directed on other Web si
On Jul 14, 2009, at 2:51 AM, gganesh wrote:
>
> Hi friends,
> It could be helpful if someone suggest me to find a way to show
> Progress Bar while django is processing to send mails .I have a form
> where list of email Id's are displayed with checkbox and user selects
> those and submits.Here i
I think you'd just have the interview table without any foreign keys,
then add a ManyToMany to each of your Author and Illustrator models.
You would still, of course, be able to start with your interview table
and get the authors or illustrators, if necessary in your app. It
might be handy
On Jul 14, 2009, at 9:23 AM, The Danny Bos wrote:
>
>
> So the Author and Illustrator tables would stay as is.
> How would the Interview table talk to both of those tables at once, to
> allow me to assign an interview to who I'm interviewing. Whether it's
> an Illustrator, Author or even down th
On Jul 14, 2009, at 10:27 AM, The Danny Bos wrote:
>
> Is there a way to create a simple list using Django to go from 1 to
> 50.
> Eg:
>
> 1, 2, 3, 4, 5 ... 49, 50
>
> I figured it'd be easy, but I can't get it.
> I tried ...
>
> {% for i = 1 in 10 %}
> {{ i }},
> {% endfor %
On Jul 14, 2009, at 10:35 AM, Jonathan Buchanan wrote:
>
> One option would be to use a generic relation:
>
> http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
>
> Regards,
> Jonathan.
>
>
Yes, this is probably the right way to do it. I had heard about
generic relation, but
On Jul 14, 2009, at 12:30 PM, luca72 wrote:
>
> Hello
> I have a question in my view fiole i have this
>
> def myfunct()
> do this...
> now i need only to return a js alert message on the same page
> is it possible?
We need more information. Are you calling myfunct()
On Jul 14, 2009, at 2:50 PM, Viktor Semykin wrote:
>
> Hi everyone.
>
> I use django.views.generic.create_update.create_object to allow users
> to post new entries on my site.
> How can I make model automatically save the user currently logged in?
> Model like
> class MyModel(Model):
>user =
On Jul 14, 2009, at 2:57 PM, sjtirtha wrote:
> Hi,
>
> I'm looking for documentation, which describes how to build a web
> application which includes many other applications.
> For example like Facebook, it has following applications on the
> first screen:
> 1. On the left side is dynamic me
On Jul 14, 2009, at 3:43 PM, sjtirtha wrote:
> Thank you for the explanation.
> This helps me very much.
>
> You mentions about handling the smaller apps on the page with AJAX.
> Is there any basic functionality to do this from Django Framework?
> Or do you have any ajax lib/framework as prefe
I need to set up a one-click deployment from development to
production. What tool(s) are currently best-of-breed in the Django
community? Thanks in advance.
The tool must be able to automate the following manual process:
1. Log into the production server via ssh, using a user ID which
requ
>
> Any reason why you can't do 'sudo -u otheruser bash -l' or even
> 'sudo su
> - otheruser'? Seems strange to be able to sudo to root, but unable to
> sudo to a role account.
No, I don't see a reason not to do it that way. I just can't directly
su to the other user due to the lack of a pas
Basically, you want to test anything that might break if another part
of the code is changed that interacts with it, might break if the
application takes an alternative flow (maybe finally hits the 'else'
of that if/else statement), or could possibly receive invalid input.
Unfortunately, t
>
> Apart from django-evolution, also take a look at http://south.aeracode.org/
I second that -- I use South and it's really handy. I couldn't get
Evolution to work (maybe I didn't wait long enough ^_^), but South
does everything I need. The nice thing about it is that it's easily
reversib
On Jul 16, 2009, at 5:16 AM, Viacheslav Chumushuk wrote:
>
> class Book(models.Model):
>author = models.ForeignKey(Author)
>title = models.CharField(max_length=100)
>
> All that I need is edit some book by primary key.
Just make a forms.ModelForm for your Book model. The class Meta will
Try using form.data.initial to get the text only.
--~--~-~--~~~---~--~~
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 grou
And as a brief aside, I've found it helpful to have a
local_settings.py, which lives outside version control.
If you put your database stuff and DEBUG flag there, you never have to
fix it when you move to production.
--~--~-~--~~~---~--~~
You received this mes
On Jul 16, 2009, at 11:11 PM, Rubens Altimari wrote:
>
> Hello,
>
> Is there a way to show model fields in admin, but prevent them from
> being edited? Using 'editable=False' in the model won't do, since then
> the field simply is not displayed.
>
> Also, on a related topic: is there a simple wa
On Jul 17, 2009, at 8:08 AM, Rune Bromer wrote:
>
> Hello.
>
> For a small webshop I have the following models: Product, Category,
> Country and UserProfile. Each user have a country set with a FK, and
> should only be allowed to see content in the administration assigned
> to the same Country.
Look at south or evolution. I use south, personally. It does exactly
this very easily.
http://south.aeracode.org/wiki/Tutorial1
To add a column to the database with south, you add it to the model,
then:
./manage.py startmigration appname migration_name --add-field
model.field
So, if your
I think you still have to pass the user, but you can tell if the item
is modified or new by whether its id has a value. If it's brand new
and has never been saved, then it won't have one.
--~--~-~--~~~---~--~~
You received this message because you are subscribe
This isn't ideal, but it should work (or prompt someone to propose
something better).
Add a one-to-one table for the user, with a field containing the
initial password (encrypted, of course, so it looks like the password
in the auth_user table).
When the user logs in, have the login page c
"Beginning Python Visualization" was recently published to fit exactly
this need. (No disclaimer -- I have no association with the book other
than having purchased it.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
If I understand correctly, you can do this without having to re-
implementing the login. You will have to make a (very simple) login
template, and write a login view that contains these:
from django.contrib.auth import login
login(request, form.get_user())
Then you c
On Jul 21, 2009, at 12:00 PM, mettwoch wrote:
>
> Hi,
>
> I'd like to implement a simple "create" & "update" form for my
> "Partner" model using ModelForm. How can I make the difference in a
> view "save" function whether the POST comes from a "creation" or an
> "update" form? Unfortunately the
On Jul 21, 2009, at 12:49 PM, mettwoch wrote:
>
> Sorry my old brain doesn't get it. Is there somewhere a complete CRUD
> example using ModelForm?
>
> Thanks
> Marc
CRUD:
If your modelform is called PartnerForm, then.
CREATE and UPDATE:
#on initial page load (no POST)
"The Definitive Guide to Django," second edition. It was just
published and was written by Adrian Holovaty and Jacob Kaplan-Moss. In
case you don't know who they are, they're the co-creator and a lead
developer of Django, respectively.
--~--~-~--~~~---~--~~
>
> This always creates a new partner! In fact, in the ModelForm
> documentation is written that the save() method creates a new instance
> unless an existing instance is passed to the ModelForm constructor. So
> one has to differentiate if the POST comes from an initially empty
> form or from a bo
On Jul 21, 2009, at 3:39 PM, mettwoch wrote:
>
> Sorry to insist, but that's what I don't understand here. How can I
> know that the partner that is 'posted' is new or not? I really become
> crazy here. I can't believe after all the good things I've discovered
> in Django that this can be so har
On Jul 21, 2009, at 4:22 PM, Dan Harris wrote:
>
> What do you mean by having the ID "in" the form? I don't quite
> understand what you are trying to do.
>
> On Jul 21, 4:15 pm, mettwoch wrote:
>> Ok, I come back to what I wrote before. If the partner already exists
>> it has an id (primary-key
To expand on what Dan said with a full (tested and working) example:
In urls.py:
(r'^partner/$', 'partner_page'),
(r'^partner/(?P\d+)/$', 'partner_page'),
In the form tag of your template:
The view:
@login_required
def partner_page(request, partner_id = None):
if par
On Jul 21, 2009, at 5:21 PM, Juan Hernandez wrote:
> Hi there,
>
> i have two questions in my mind.
>
> 1- Let's say that I have tens of views. Do I always have to use
> render_to_response? I find it totally against DRY. My solution was
> creating a wrapper that would take as arguments the te
Do you know for certain that indata contains a value before you try
the objects.get()?
If you are getting an error like "no value found," it sounds like you
might not. If you're getting something like "no such object," then it
would be a different problem.
Is the field "word" in your model
Why not just use the automatic "id" field as the primary key?
--~--~-~--~~~---~--~~
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
My understanding of the slug field is that prettier URLs are the main
point.
"Slug" is a newspaper-industry term, and since Django has its roots
there, it's now a Django term.
Django does' in fact, contain a slugify function:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#slugi
Look for the post_save signal.
Once you can attach your own function to that signal (make it listen
for the signal and kick something off), you can probably have Django
dump the raw SQL query that is created to a text file. I don't know
the syntax for that, but check the django.db docs.
Ha
On Aug 21, 2009, at 12:50 PM, Ray wrote:
>
> Hi,
> I'm trying to do this:
>
> send_mail(subject='hey, Ray',
>message='Hey ray, this is an automated message, \n heres a
> link: yahoo.com or yahoo.com',
>from_email='bl...@gmail.co',
>recipient_list=['blan...@gma
On Aug 21, 2009, at 11:39 AM, ashish tiwari wrote:
> hi Friends
>
> i heared about the json format
> django provided utility of dumpdata, loaddata which dumps and loads
> data in json format.
>
> but i dont know,how to use it..
>
> i want to dumpdata...from my app
>
> name of iFriends
> n
There are different options, depending on whether the instance of B is
a required part of A's model.
1. You can add an "exclude" section to your ModelForm of A. Validate
BForm, validate AForm, then take the resulting instance of A and set
it's 'b' attribute to the resulting instance of BFor
I'm working on an existing project that I'm splitting up into multiple
apps. My question is about how to use those apps together.
Say I have an app called "main." Then two supporting apps which sit
outside of that Django project folder. They are "foo" and "bar." They
are not "installed" as
On Oct 1, 2009, at 9:25 AM, Carlos Gustavo wrote:
>
> Hi All,
>
> I am a django newbie and so far it has been great.
>
> How do I populate a mysql database table with data from a text file?
>
> Also How do I dump results of a database query into a text file.
>
> I have already created my django
Are both Django forms being rendered in the same HTML form, or are
they separate?
If they're in separate HTML forms, that could be the problem.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group
Your current approach makes sense. If you're concerned that you're
storing too much data in the session, you could just maintain a
session ID in the session and use that as a key for an sqlite3
database or something, or even a model in your app's database, if that
makes sense. Is there any
If you're trying to add template tags, check this out:
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/
Your custom tags go in a directory named "templatetags" in your app
directory.
Shawn
--~--~-~--~~~---~--~~
You received this message because
Remember that people often represent their best work, and I bet they
only answer the questions they're most confident about their
experience with.
If you care that much about your code, you'll be fine -- once you have
your 10,000 hours* in as a coder, people will be in awe of your code
to
On Oct 8, 2009, at 9:33 AM, grant neale wrote:
>
> Well 1 problem I was thinking about was uploading photos.
> Any suggestion.
>
> Grant
While it's not Django-specific, it's easy to write a Python script
that monitors an e-mail address and downloads and stores the
attachments. You could sc
The way to do what you're trying to do is to take advantage of the
following:
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
In brief, you'll create another model, which will then be specified in
your settings.py by AUTH_PROFILE_MODULE. From then
On Oct 8, 2009, at 9:33 AM, grant neale wrote:
>
> Well 1 problem I was thinking about was uploading photos.
> Any suggestion.
>
> Grant
While it's not Django-specific, it's easy to write a Python script
that monitors an e-mail address and downloads and stores the
attachments. You could sch
Chris,
I know this doesn't answer the hard part of your question, but here's
a simple way I delete old stuff from a database via an external script
that's run by cron:
Item.objects.filter(date_updated__lte = datetime.now() - timedelta
(days = 30)).delete()
If you use timedelta, you can eas
The way to do what you're trying to do is to take advantage of the
following:
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
In brief, you'll create another model, which will then be specified in
your settings.py by AUTH_PROFILE_MODULE. From then
Middleware question:
If 100% of an apps views require a logged-in user except for the login
page, does it makes sense to have middleware check the URL and
redirect to the login page rather than putting the @login_required
decorator over all the views?
I have to ensure that users' passwords expir
Ethan,
Thanks for the feedback. I did create my own middleware, and it was
ridiculously simple.
I just looked at the django.middleware files and saw how easy it was.
I only had to make exceptions for the pages pertaining to resetting a forgotten
password (from django.contrib.auth.views) and the
On Sat, Oct 17, 2009 at 1:42 PM, Raashid Malik wrote:
> I have a custom page e.g home and i want to have login functionality on this
> page. I m using django registration module for django login and
> registrations process. Now i m totally blank on how to implement this. Plz
> help
>
>
> Thanks,
Guillermo,
Please see the 'unique_together' syntax:
http://docs.djangoproject.com/en/dev/ref/models/options/#unique-together
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
Keith,
Depending on what you're doing, it might be a good place to use a
context processor.
http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors
Also, if you're using (or can use) the session middleware, you can
store these values in the session.
Shaw
Here's how to do a generic foreign key:
http://docs.djangoproject.com/en/dev/ref/contrib/contenttypes/#id1
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from
On Dec 4, 2009, at 12:10 PM, Philippe Clérié wrote:
> I am working on an application that requires getting some data offsite,
> process it and load the site database. This process can take up to five
> minutes. I would like to be able to capture the output and present it to the
> user so he kn
On Dec 4, 2009, at 1:34 PM, Philippe Clérié wrote:
> Are you using a library or did you code it yourself? What would be a good
> library to start with?
>
> --
>
>
> Philippe
>
I use jQuery, and that makes it simple.
First, have a view that returns JSON. Basically, this is all you need in
Ken,
You just put the submit buttons in the HTML form as you would normally.
The submit button isn't part of a Django Model or Form. It really
doesn't make sense there; there's no data there.
Shawn
On Dec 5, 2009, at 9:55 PM, Ken
wrote:
> I have the following form, which displays nicely
The easiest way I know of is this:
In the __init__ of the model, create a variable: self.old_value =
self.fieldname.
In the save() function, you can check self.fieldname against self.old_value.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users
On Dec 6, 2009, at 11:01 PM, Continuation wrote:
> What do you mean by the __init__ of the model?
>
Every models.Model object has an __init__ function, like any Python class. You
need to override it.
Add this into your model (in your models.py):
def __init__(self, *args, **kwargs):
What exactly are you trying to do? Can you give a little of the data in your
model, and then exactly how you want it to look on the rendered page? I'm
having some trouble understanding what your template and view are intended to
do.
Shawn
--
You received this message because you are subscribe
What kind of information will the database have to store about the ports
themselves?
How will you need to be able to filter querysets by information in the port
fields, if at all?
I'm going to throw this one solution out there, but depending on your needs it
may not fit:
Create a red_ports co
Easy to do:
Just override the save() function of the model.
class MyModel(models.Model):
def save(self, **kwargs):
#add your logic here
super(MyModel, self).save(**kwargs)
--
You received this message because you are subscribed to the Google Groups
"Djang
On Dec 7, 2009, at 7:16 PM, Continuation wrote:
>
> I thought if form.is_valid() returns False, Django would send a list
> of the errors to browser. But that's not what happened here.
Do you have anything like these in your template?
{{ my_form.errors }}
{{ my_form.field_name.errors }}
Shawn
Bear in mind that the admin has a limited scope. This is intentional. It was
meant to be a friendly replacement for having to hit the Postgres/mySQL command
line interface, and that's about it. It's trivial to create your own form for
dealing with your model which can be customized in any way yo
We'll need some more information. What error messages are you getting, if
anything. How do you know the CMS works at all, if it hasn't been run locally?
Have you followed the official tutorial to get a basic understanding of how
Django works? If not, please do:
http://docs.djangoproject.com/en/
If you run 'ifconfig' on the command line, you will get your IP address. Let's
pretend that your IP address is 192.168.1.105. Try this:
python manage.py runserver 192.168.1.105:8000
See if you can visit http://192.168.1.105:8000 instead.
I don't know what the problem is, but maybe it's somethin
Sorry, I should have said 'ipconfig' instead of 'ifconfig' if you're running on
Windows, and you mentioned IE so I guess you are. Unless you're running your
Django server on one machine and trying to access it from another, which would
definitely cause the exact problem you're seeing, but runnin
I don't think they can prevent you from using it locally. The fact that I can
ping the IP address you provided means that it's publicly available. This
either means that your machine has its own direct connection to the Internet,
or ipconfig returned multiple addresses, including the address of
On Dec 8, 2009, at 11:38 AM, Jenn Hughes wrote:
> I checked and no proxy is in place. I tried the other IPs, two
> wouldn't let me assign it and the third went through but gave me the
> same error that I began with. How odd.
>
I suspect there may be some other tiny but very important problem wi
If you assign the output of the save() method, you'll get the created object.
Instead of:
form.save()
do:
current_order = form.save()
Then you can do whatever you like with current_order, which will be an instance
of whatever the class 'meta' is of your OrderForm, assuming that OrderForm is a
There are different ways to do it, depending on how much data you have and how
often you plan to do it.
The fastest way for large files is to use sqlite3's .import command to directly
import a file. However, this will bypass any validation done by your models.
The way I do it is to read the csv
The current best tool for this is South: http://south.aeracode.org/
You can do complicated data and database migrations smoothly, with the ability
to roll-back changes.
I don't know why you mention changing table names, since that should never be
necessary. But anything is possible.
If you're d
Sure, here's a quick & dirty sample I put up on pastebin:
http://pastebin.com/f651cf8de
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send ema
The proper way to do that is to use the subprocess module.
http://docs.python.org/library/subprocess.html
If you don't want to do much reading, you'll just want to look at section
18.1.3.1, which gives the way to call a simple shell command the way you'd do
with backticks in Perl.
However, sin
Look at safestring.
from django.utils import safestring
The docs will explain all, but basically you do this:
the_html = safestring.mark_safe(your_html)
The text in "the_html," if passed in your template, will not be escaped. The
standard warning should be repeated here -- be sure you trust yo
On Dec 11, 2009, at 4:51 PM, tezro wrote:
> Seems like no clues...
>
> On Dec 10, 12:21 am, bruno desthuilliers
> wrote:
>> On 9 déc, 18:58, tezro wrote:
>> (snip)
>>
>>
>>
>>> That throws an error: TypeError: 'slug' is an invalid keyword argument
>>> for this function.
>>
>>> What am I do
Why did you manually add a 'slug' field to your database after modifying the
model? Django's syncdb does a lot more than just create the field; depending on
which database you're using, it does a few other things and overrides some
defaults. I wonder if there's a disconnect there. If this proje
What kind of object are you trying to send? JSON pretty much looks identical to
a Python dictionary, so if your object is a Python dictionary, list, or tuple
you'll have no problem -- just convert the Python object using
simplejson.dumps(). If this doesn't help much, please provide more detail
I feel like a broken record this week -- I've been recommending South in every
other post I've made on this list.
So, at risk of annoying people, check out South: http://south.aeracode.org
It does exactly what you want it to do, and is the dominant (and nearly the
only) solution used in the Dja
You don't need to transfer this to JavaScript once it's in JSON, which is a
JavaScript object.
If you're using AJAX, it's dead easy.
#use this in your view
return HttpResponse(simplejson.dumps(employees), mimetype="application/json")
Then, in your JavaScript, you can use JSON syntax to refer t
On Dec 12, 2009, at 8:08 AM, tezro wrote:
> Nope. Did it again on a clean project with the same models migrated
> then by South.
>
> Same error. Any other clues?
>
> Thanks for replies.
When you say "same error," do you mean this one: "Duplicate key name
'news_element_slug'"?
If so, then it
The fastest way for large files is to use sqlite3's .import command to directly
import a file. However, this will bypass any validation done by your models.
You could end up with "bad" data, in that it doesn't conform to the rules of
your models.
Or, you can just write an external script to rea
It sounds like, for auditing purposes, there should be a model for storing each
"hours worked" entry.
Also, the hours estimated should not be reduced in the database -- there should
be a method of your model which returns the remaining hours by subtracting the
sum of the worked hours from the e
>>> urllib.unquote('%3Cp%3E+hello+world+%3C%2Fp%3E')
'+hello+world+'
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-user
What you're trying to do is simple enough to write out in flowchart form on a
sheet of paper. You should do that, then write some code, then ask for help
with specifics when you get stuck, or are trying to decide between different
approaches. What your e-mail sounds like, whether you intend it o
Okay, here are a few ideas:
1. If you hate pop-ups, but aren't opposed to a little AJAX, then you could do
it that way.
2. You could do it with a multi-screen, 'wizard-like' set of templates.
3. You can keep state using session variables.
4. If you don't want to worry about keeping session va
I added a new ManyToMany field to one of my models. The foreign key is to a
model in a different Django application in our project.
The migration to add the foreign key works perfectly. I did remember to add the
--freeze otherappname.modelname to the command line. I also added the --freeze
othe
Sorry to reply to my own post -- I just realized I left out a useful detail:
I added a foreign key to the Study model to several tables, and a ManyToMany to
Study to two tables.
The data migration works flawlessly for the tables where I'm setting the
foreign key to the Study instance -- it onl
Okay, okay. So I'm still replying to my own post. On the bright side, I figured
it out.
First point of interest:
If I stop referrering to my model with orm.Message, and just use Message
(as imported from my app at the top), everything works fine.
Second point of interest (discovered AFTER
If it's a legacy database, but the tables actually have a field named 'id'
(which is Django's default primary key), maybe the Django ORM is assuming that
that's the primary key.
Does a field in your model have primary_key = True set?
http://docs.djangoproject.com/en/dev/topics/db/models/#automa
You can do it easily with middleware.
Here's what I wrote for this exact purpose:
http://pastebin.com/f52e6ef04
You will have to add it to MIDDLEWARE_CLASSES in your settings.py.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
1 - 100 of 1241 matches
Mail list logo