I am currently working through the django book and I've got to the
fifth chapter where I would like to replace the __str__() methods with
__unicode__() methods instead. The reason is that my database will
hold a great deal of Japanese text, UTF-8 encoded. After declaring the
UTF-8 encoding at the
I am currently working through the django book and I've got to the
fifth chapter where I would like to replace the __str__() methods with
__unicode__() methods instead. The reason is that my database will
hold a great deal of Japanese text, UTF-8 encoded. After declaring the
UTF-8 encoding at the
>
> Are you declaring the encoding of your source file?
>
> Try putting
>
> # -*- coding: UTF-8 -*-
>
> at the top of your file.
>
> regards
> Steve
Hi Steve, thanks for the reply. Exceptions are raised if you input
Japanese characters into a file and fail to declare the coding. That
was the fir
> I do not know if this will work for Japanese Windows, but for the English
> version, the two things I have found that need to be done to ensure a
> command prompt properly displays utf-8
> are first:
>
> chcp 65001
>
> in the command prompt to change the active code page to the one that works
>
Just released a how-to and some code on our blog:
http://blog.fluther.com/blog/2008/09/04/mogilefs-for-django/
Praise can be sent directly to me, scathing criticism of the code can
be directed to my partner.
See you at djangoCon!
--~--~-~--~~~---~--~~
You receiv
I'm upgrading to 1.0 from .97. Previously I had retrieved the cleaned
data from my form, and called mymodel.save_FIELD_file() with the
cleaned data, but that doesn't work anymore in 1.0.
Without resorting to a modelform (since I need to do custom
validation, like specific filetype, size and files
Hi, all ,
CODE:
view.py
-
def user_login(request):
if request.method == 'POST':
form = UserLoginForm(request.POST)# get the form from POST
if form.cleaned_name(): #
Hi, Roseman
Thank you very much for the explaination, problem solved! Applause &
Cheers!
On Feb 27, 10:10 pm, Daniel Roseman
wrote:
> On Feb 27, 12:37 pm, andrew wrote:
>
>
>
> > Hi, all ,
>
Hi , Dear all:
I had searched this forum but with limit information about dynamic
forms .
Model:
-
class Product(models.Model):
name = models.CharField(max_length=30) # Product Name
type = models.IntegerField(max_length=3
What do you want to buy?
Product A [radio button]
Product B [radio button]
Product E [radio button]
Could you guys pls kindly help? I am Newbie :(
On Mar 5, 5:29 pm, Malcolm Tredinnick
wrote:
> On Thu, 2009-03-05 at 00:13 -0800, andrew wrote:
> > Hi , Dear all:
>
> > I
amic
> forms. Those forms where generated from data entered by the user in a
> previous step.
>
> It can be a bit "messy" if you don't take care, but works.
>
> andrew wrote:
> > Hi , Dear all:
>
> > I had searched this
Hi ,all
I encounter a issue lasting 3 days, any help will be highly
appreciate.
view:
market_volumn={}
for m in marketTypeList:
market_volumn[m]=MarketVolumn.objects.filter
(marketType=m).order_by('week')
print market_volumn
in the console ,the print result like this:
Thanks you for your detailed solution.
I just didn't know the existence of market_volumn.ITEMS so I didn't
know how to output the "volumn", shame on me of poor python
knowledge .
Anyway ,problem solved! applauds!
On Mar 21, 5:22 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-03-20 at 23:53 -0700,
Hi,
I run Django light web server with command line "python manage.py
runserver".
I must redirect to another stream web server output messages, the ones
like "[17/Jul/2009 12:35:58] "GET /home/foo/ HTTP/1.1" 200 1061
We get these incredibly bizarre errors every once and a while where a
single character of python gets transformed. The code itself isn't
changing, and the area where it pops up changes each time. Any ideas?
MOD_PYTHON ERROR
ProcessId: 28165
Interpreter:''
ServerName: '*'
Do
We know that power MTV of Django.
Here is my question.
I have 3 list of "Thing", fruit,bread,wine, but they share a same
structure of template,I want to render them to on template like this:
view:
fruitList = thing.objects.filter(type='1')
breadList = thing.objects.filter(type='2')
wineList =
Hi, guys all:
Django powered by a fancy admin backend with secured control.
In my app, there needs to be an other backend which responsible
for more complex functions(views) .To do this on my own ,I had to
create auth,view,url etc. Is there a way that I could CREAET A NEW
Template NOT OVE
Hi,all
I'm designing a series of admin pages that only one admin can
logon ,I think there is no need to setup a single table to store only
one entry which contain "name""password" .
So , I think ,is this way safe enough to ensure secure my admin
access?
def login_admin(request):
i
I recommand used "print [modal]" in the views and see what happend in
the terminal.
PS: you'd better try replace :
def __str__(self):
return self.SampleID
with:
def __unicode__(self):
return self.SampleID
On May 22, 11:55 pm, Herta wrote:
> hi, everyo
Hi,
I want to launch web server process in release mode.
But executing from shell "python -O manage.py runserver" doesn't
affect web server process, that
is launched in debug mode. Also setting settings.DEBUG = True doesn't
affect launch mode, but
this was expected.
Any sugg
Hello,
is there any way to use custom template tag inside {if} or ifequal
tag?
I have custom tag "getpreference" which accepts one parameter and
returns string value or empty "" string.
I want to check if value is not empty inside {if} or maybe {ifequal}
tag, how do I do that?
{% if getpreferen
Anyway, I thound that's not possible, so I will need to create
specific custom tag for this.
On Oct 3, 2:07 pm, Andrew wrote:
> Hello,
>
> is there any way to use custom template tag inside {if} or ifequal
> tag?
>
> I have custom tag "getpreference" which ac
tion')
Product.price = getattr(self, 'price')
if getattr(self, 'image'):
Product.image = images.resize(getattr(self, 'image'),
settings.THW2, settings.THT2)
#strange, why does it update record without calling save() ???
#super(Product, self).s
have tried everyting initially thinking it was my Ubuntu dev
environment but I ran it on debian etch with django version 1.0.3 and
got the same thing. Any help greatly appreciated.
Thanks
Andrew
Here is the scenario
I am doing a simple registration form...
I have a form... as you can see I have &quo
.html_error_list }}
{% endif %}
Password (again):
On Nov 2, 12:55 pm, Andrew wrote:
> Hi,
> I am well used to working with Django, however I am stuck on a basic
> issue at present if anyone can spread some light. Note I have no
> compile errors and
Thanks Guys,
I understand about the form issues...I was just tinkering...
However yes it was the comma's I had at the end of the fields in my
form. They didn't throw errors for the face its a sequence as you said
Karen.
Thanks Karen and David for such a quick response...
Andrew
On Nov
piler ?
Thanks
Andrew
( desperate to get my ...eeek...days back )
--
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
Thanks guys for all the commentsIm on ubuntu on eclipse and there
was no local history alas
Thems the breaks when you omit to submit ;-) ... to source control...
I used UnPyc to disassemble the .pyc and I am now rewriting the python
using the assembly as a guide. Good think I did mainfram
cing 'store' with 'store.name' and 'store__name' to no
avail -- how can I get the XML serializer to return a data member of
the 'store' object instead of just a pointer to that object?
If it's not possible with serializer, what's the best way to do it?
Tha
Go to:
http://groups.google.com/group/satchmo-users
On 15 мар, 20:10, Jonathan Hayward
wrote:
> I'm trying to get satchmo up and running from the instructions
> athttp://bitbucket.org/chris1610/satchmo/downloads/Satchmo.pdf, and when I
> get to 2.1.3 (installing PIL manually as a workaround), th
ime discussion, questions filtered for you, and IM
integration.
Now that we have finally completed it we're climbing out from our cave
and wondering if the site can fly, and how we help attract people to
it.
Any comments or advice?
Andrew McClain
--~--~-~--~~~---~--
Thanks for the compliments, Leif!
We're running a LAMP VPS (currently with ServerAxis). We use memcache
(right now our traffic doesn't warrant mutliple servers or squid). We
use the built-in django default user paired with a custom userprofile
as detailed in the b-list article.
Thanks for lookin
milar).
Does that answer your questions? Should we make the privacy policy
more explicit?
Best,
Andrew
On Jun 29, 4:42 pm, "David M. Besonen" <[EMAIL PROTECTED]> wrote:
> the interface looks good and appears to function well.
>
> On Wed, June 27, 2007 4:03 pm, Andrew w
erent thread because initiating a connection to
the SMTP server from a web request takes a LONG time -- it looks like
the page hangs.
Again, happy to help.
Andrew McClain
On Aug 8, 10:38 am, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On 8/8/07, James Tauber <[EMA
We're looking into this as well! 10K session rows in one day. Have you
noticed the records being in multiples of seven?
Also, in our slow query log we've noticed django performing a
selection on the entire session table with no WHERE clause.
Clues in the puzzle...
On Jan 4, 11:51 pm, SmileyChri
I'm seeing some very strange behavior on my development box...
If I have the current site (the one returned by
Site.get_current_site()) set to the same address as my development
server, the server will hang. The server with run, but stalls when I
try to make a request -- it doesn't even print out
There are a bunch of articles about versioning your CSS/JS so you can
set an infinite expires header; most of them revolve around some PHP
code that takes either an SVN revision or unix timecode and munges the
include header, like:
So. I'm not thrilled about throwing some PHP into the mix; sur
This also may be a good time to consider a distributed version control
system (Like bazaar or mercurial)... we're just about to finish
porting to bazaar after running up to several situations just like
yours.
One benefit of DVCS is that branching is easier than SVN...making
feature-level branches
Here's the situation:
I'm creating an RESTful internal API as an app in our project. Our
'main' app (we'll call it main) is a client of the API app. Since
we're building the API piece by piece as we use it, the emphasis on
all of this is simple simple simple -- with our eye on eventually
opening
Anyone know? We were working off the django SVN 0.96pre, but we've
made some patches and would rather just do an SVN update to 0.96.
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
2007.
andrew
On May 29, 1:01 pm, "Joseph Heck" <[EMAIL PROTECTED]> wrote:
> Is the question "What's the URL for the 0.96 release?"
>
> browse:http://code.djangoproject.com/browser/django/tags/releases/0.96
>
> checkout:
> svn cohttp://code.djangoproje
ad_to path,
correct?
many thanks,
andrew
--~--~-~--~~~---~--~~
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
ImageField(upload_to="/static/images/") caused django to write files
to /static/images (ignoring MEDIA_ROOT, silly me)
ImageField(upload_to="images/") works.
On Jun 1, 3:20 am, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> Am Freitag, 1. Juni 2007 01:35 schrieb Andrew:
>
rk.
Relatedly, what is everyone using to load test their ajax apps? We've
been using JMeter to limited success... any other thoughts are
appreciated.
Annecdotes, links to articles, or informed guesses are all
appreciated. We're not trying to get an answer, just data to make
27;d stock if full of
RAM, but we're evaluating VPS right now, so we're just trying to see
what's feasible.
On Jun 4, 3:03 am, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 6/4/07, Andrew <[EMAIL PROTECTED]> wrote:
>
> > What are some ballpark memory
According to http://www.djangoproject.com/documentation/templates/#spaceless,
{% spaceless %} should remove _all_ whitespace between tags, not
insert a single space between them...
So why does http://dpaste.com/22430/ turn into http://dpaste.com/22431/
?
--~--~-~--~~~---
So much of models are generated on the fly, I usually count it as luck
if I get any code completion at all. I don't think any other IDE will
help you here.
On Oct 14, 8:03 am, lmierzej <[EMAIL PROTECTED]> wrote:
> hi,
> I need advise...
> i've started using pydev for django development
> but it h
Ah! Perfect! Good ol' .96!
On Oct 14, 1:00 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-10-14 at 19:38 +, Andrew wrote:
> > According tohttp://www.djangoproject.com/documentation/templates/#spaceless,
> > {% spaceless %} should remove _all_ wh
I've implemented a generic "change" model for some of my models.
Ideally what I'd like is to be able to either mark or subclass a
model, and when changes are made to a specific field, a copy is saved
in the related "change" object stack -- such that when the post_save
signal is sent out from my ba
That's a good thought, but unfortunately that's not the way multiple
inheritance works... only the first method in the chain gets called.
On Dec 15, 6:54 am, Michael Elsdörfer <[EMAIL PROTECTED]> wrote:
> > class Description(ChangeImplementor, models.Model):
>
> I might have a flaw in my logic,
This is code that was working until sometime circa rev 6500...
Assuming we have a newform object named form with errors in it:
import django.utils.simplejson as json
json.dumps(form.errors)
gives:
: is not JSON serializable
In the shell, and fails silently in view code.
If we do:
json.dumps
EDIT: json.dumps(force_unicode(form.errors)) works but triggers the
dictionary-to-html conversion.
On Dec 19, 3:41 pm, Andrew <[EMAIL PROTECTED]> wrote:
> This is code that was working until sometime circa rev 6500...
>
> Assuming we have a newform object named form wi
We're using Django + AJAX + Mochikit. Works like a charm.
a
--~--~-~--~~~---~--~~
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 fr
We use mochikit exclusively after playing with Dojo (it slowed our page
loads way down for some reason). Mochikit doesn't give you components
like Dojo does, nor does it give you any of the object-oriented scope
tools that Dojo has, but the documentation is top notch. Mochikit also
gives you bette
I've had this working in raw SQL, but I'm refactoring and trying to
django-ify things a little bit. I thought it would be simple, but I'm
stuck.
I have a Post model and a Rating model.
The Rating model has a one-to-many relationship with Post, a
one-to-many relationship with User, and a score. (
Sorry, that was a mistype in the original post.
Should read:
Post.objects.exclude(rating__user = user) mostly works, but it *also*
excludes
all Posts that have not been rated by *any* users yet (don't have rows
in
the Rating table).
So I need a way to word the exclusion in a way that works, or
Say I have a file structure like this:
mysite
myapp
__init__.py
models.py
views.py
testdir
foo.py
import mysite.myapp.testdir.foo doesn't work. Why?
Is testdir not in my pythonpath?
Am I missing something?
Thanks in advance.
--~--~-~
I started a simple little app to display a Graphviz diagram based off
the Django models.
It's simple and not so purty, but it's a start. It also requires
graphviz to be installed and in the path.
http://www.exit66.com/diagram.zip
Install to to your Django server like any other app and the url
Here's how I did it for a similar situation I had.
class MyCategory(models.Model):
category = models.CharField(maxlength=50)
parent_category = models.ForeignKey('self', blank=True,
null=True, related_name='sub_categories')
def all_items(self):
data = list(self.ite
Sorry if there is an obvious answer to this, but I couldn't find it.
Based off of the following:
class ObjectA(models.model):
name = models.CharField(length=20)
class ObjectB(models.model):
name = models.CharField(length=20)
a = models.ForeignKey(ObjectA, related_name="bs")
In the
Not sure what I was smoking but accessing the object from the all()
method doesn't work either. Is it possible to change an object through
the ForeignKey?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django use
I ended up saving the object, but I was trying to update the tree of
objects without saving so I could offer a preview type of functionality
(there are some background calculations done on the objects).
--~--~-~--~~~---~--~~
You received this message because you a
Is there any more in-depth documentation about how the include tag
works?
I'm developing a site which has a few different modules that I want to
plug into an aggregate "main" page.
Each of the modules I've written into its own template; I now want to
combine them into the main page.
My first th
Hi,
I adopted nice SelectFilter2.js for single item selecting with search
in change forms
in case of relatively large lists.
Here is my changes against current sources (0.96-pre).
It's seems work for me.
# add file SelectFilter3.js to ..\admin\media\js (adaptation of
SelectFilter2.js)
---
nse was executed
6. the RegexURLResolver initiation question is observed by Eclipse debugger
Thanks,
Andrew
--
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
/', urlconf)" in
WSGIHandler.get_response was executed
6. the described question will be observed in Eclipse debugger
Thanks,
Andrew
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
,
Andrew
On Aug 6, 11:38 am, Hayyan Rafiq wrote:
> are you referring to the models.py which is present in every app created by
> python manage.py startapp books ??
>
> # Create your models here.
> from django.db import models
>
> class Publisher(models.Model):
> name = mod
. You could process the post and redirect
back to the page containing the form if you want to.
Regards,
Andrew
On Aug 14, 5:52 pm, doniyor wrote:
> Hey Guys,
>
> i need a litle help in working with forms. i have a button and i want
> to output a success text above the button if the
in
> the service layer.
>
> Extending a little bit and talking about pythonic code,
> `IPInfo.get_result()` should not exist. Simply use the `result`
> attribute or convert it to a read only property. Or, if this class
> came to life just because the `get_result()` method, convert it to a
&g
ewear?
If this hasn't been done, someone should make it happen... If enough
attention comes by for a better idea, I'd love to help collaborate!
My GitHub page: https://github.com/Andrew-Chen-Wang
--
You received this message because you are subscribed to the Google Groups
"Django user
Hi everyone,
Very much a Django newbie here, I'm trying to evaluate a few things
before diving right in.
I was all set to write something in Ruby Rails, but the reason for
looking at Django is because I also need python access to all the same
data that the web app is dealing with. The Django
Russell Keith-Magee wrote:
> On Sat, Oct 25, 2008 at 3:55 AM, Andrew Chapman <[EMAIL PROTECTED]> wrote:
>
>> My question is how to package up and deploy the Django python code for
>> external tools to access the database? I'm hoping to have the Django app
>>
James Bennett wrote:
On Sun, Oct 26, 2008 at 9:19 PM, Steve Holden <[EMAIL PROTECTED]> wrote:
Here's a specific example of a piece of code that uses a web app's
models. It should get you started - just dive in and write some code!
The tricky bit is providing the settings without u
Trying to get the example from
http://docs.djangoproject.com/en/dev/topics/forms/
to work. I copied and pasted:
from django import forms
class ContactForm(forms.Form):
subject = forms.CharField(max_length=100)
message = forms.CharField()
sender = forms.EmailField()
cc_myself =
last request I made before it crashed, but without any
exceptions or errors, it's very hard to debug. Does anyone have any
tips on getting some more useful output out of a crash?
-- Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
> I am using django tagging and have problems adding tags to an object.
>
> There are 2 methods that enable adding a tag:
> - add_tag()
> - update_tags()
>
> --
> for tag in parse_inputs(form.cleaned_data['tags']):
> Tag.objects.add_tag(tag)
>
I'm using MySQLdb, cmemcache, PIL, and the django.contrib.gis stuff.
On Dec 8, 2:58 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Dec 9, 8:50 am, Andrew Fong <[EMAIL PROTECTED]> wrote:
>
> > When I'm poking around in my Django app, my development ser
I'm looking for the Django equivalent of the following:
SELECT * FROM table WHERE table.x1 = table.x2
Pretty sure someone has asked this before but I had a hard time
finding anything. I don't really want to write raw SQL if it can be
avoided.
--~--~-~--~~~---~--~-
that page, as I have no idea
whether you're in a dev or prod environment.
Cheers,
Andrew
2009/1/12 pyramid...@gmail.com
>
> Im trying to get the template to load the CSS, but it does not load,
> the server output shows a 404.
>
> in templates directory i have
>
>
James Bennett wrote:
> On Sun, Jul 20, 2008 at 6:57 AM, Hussein B <[EMAIL PROTECTED]> wrote:
>
>> I got that illusion due the slow official releases cycle...
>>
>
> Be careful with this logic, because it is misleading. For example:
> Britain has not had a new Prime Minister since June 2007
If you've created a project using django-admin.py, when you run
'python manage.py runserver',
make sure you're actually in the directory where manage.py script is.
.
- Andrew Kou
On Aug 27, 3:42 pm, Sonny <[EMAIL PROTECTED]> wrote:
> When I type ' python manage.
and I want
to define the foreign key models inline rather than referencing the
primary key.
Any insight would be greatly appreciated.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
ere in an earlier draft, but there just wasn't room.
They're not too hard to remember, though, hopefully? Off the top of
my head: counter, counter0, revcounter, revcounter0, parentloop,
first, last.
You could write them all on a single post-it note and stick them to
y
In the done() method you are provided with a list of the validated
forms so you can just do:
for form in form_list:
form.save()
before returning your response
2008/9/17 Martin <[EMAIL PROTECTED]>:
>
> Greetings,
>
> i'm playing with FormWizard and i'm having some problem saving each
> step
On Sep 21, 8:23 am, "Nikos Delibaltadakis" <[EMAIL PROTECTED]>
wrote:
> Shouldn't ForeignKeyField to be just ForeignKey?
> Am I missing something?
No, you're absolutely correct -- thanks for spotting the error! We'll
get a correct
out).
Grab it from http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/
Andrew
--~--~-~--~~~---~--~~
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@google
oesn't seem to be breaking anything in the app, but it
is really annoying.
-- Andrew
P.S. This seems to be the same problem as here, except with GeoDjango
instead of wxPython:
http://mail.python.org/pipermail/python-list/2003-March/192239.html
--~--~-~--~~~---~--
Issue 4 is out with a correction to the arguments for DecimalField in
the Form Fields section.
Thanks to Doug Van Horn for pointing out the error.
Download it from http://www.mercurytide.co.uk/whitepapers/django-cheat-sheet/
Andrew
--~--~-~--~~~---~--~~
You
when you delete B. However, model A itself is still removed from the
database.
Any opinions about adding such a deletion signal for A?
-- Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&
use a django-served template for your JS file.
2008/10/8 Johnny <[EMAIL PROTECTED]>:
> Hi everyone,
>
> I'm writting a Web App using Django and I got problems to make appear or
> deasappear some content.
>
> Here is the code I was using to write a part of the windows:
>
>
>
of objects with respect to the list of Ids. I know
Django templates have reorder functionality, but that just sorts by a
property, what I'm looking for is a bit more complex. Is there anything
at the Python level I should be using?
Thanks,
- Andrew Ingram
--~--~-~--~~---
Malcolm Tredinnick wrote
> Here's one way that comes to mind: When you do the selection based on
> the id's, use the in_bulk() queryset method. That returns you a
> dictionary mapping each id value to the object with that id (see below
> for how to do this without in_bulk() if that's not convenien
On 15-Jan-09, at 9:35 AM, Peter Bailey wrote:
> Anyway, I have created a Form for a Survey object that I use. If I go
> to my edit page for a Survey, everything works perfectly. If I go to
> do a simple add new (like right out of the docs), I always receive an
> error "NoneType' object is not cal
On 15-Jan-09, at 8:49 AM, JonUK wrote:
> how do iterate the LightboxPhotograph objects for a given instance of
> LightBox?
lightbox.lightboxes
should work
http://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward
Cheers
--
Andy McKay
ClearWind Consulting:
On 15-Jan-09, at 10:09 AM, JonUK wrote:
> Thanks, but that gives me:
>
> AttributeError: "'Lightbox' object has no attribute 'lightboxes'"
Doh' sorry, reading it again, you've already got the relationship from
LightboxPhotograph to Lightbox, so thats
lightbox.lightboxphotograph_set
http://do
for the first
request won't be returned until the session data has been written
successfully - which means there are no sync issues. Is the same true of
the memcached-based backend? i.e is the response delayed until there is
some confirmation that the cache has been written to?
Regards,
A
I'm using contrib.contenttypes and have added the following to my
model:
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericForeignKey()
When examining the DB (I'm using MySQL), I find that content_type is
indexed but object_id
rders(user_id,number):
return Order.objects.filter(user_id=user_id).limit(number)
like this:
{% latest_orders request.user.id 5 as orders %}
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
there's a nice elegant way of doing this in
Django because the only approach I can think of is very unappealing.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
7;).resolve(context), but I'm not so sure about how
to tackle the strings and numbers. I guess some regexps could be used to
do some basic branching.
Any thoughts would be appreciated.
Regards,
Andrew Ingram
--~--~-~--~~~---~--~~
You received this message be
1 - 100 of 974 matches
Mail list logo