show the sql you're trying to ...
Em terça-feira, 16 de fevereiro de 2021 às 10:58:44 UTC-3,
anilse...@gmail.com escreveu:
>
> How to pass multiple query sets in Django?
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
AttributeError when attempting to get a value for field
`project_number` on serializer `ProjectListSerializer`
please help me how to resolve this.
Regards,
Anil Sebastin
On Tue, Feb 16, 2021 at 7:58 PM Omkar Parab wrote:
> pass your multiple query sets using the get_context_data"
pass your multiple query sets using the get_context_data" method.
https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/
On Tue, Feb 16, 2021, 7:28 PM Anil s wrote:
>
> Hello Everyone:
>
> Can somebody please tell me how to pass multiple que
Hello Everyone:
Can somebody please tell me how to pass multiple query sets in Django.
Thank you for your help.
--
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, sen
How to pass multiple query sets in Django?
--
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
to django-users+unsubscr...@googlegroups.com.
To view this
Hi.
You should rename the "id" field in your model to something else. You can edit
your models.py and put another name, like "dbid" or something.
Django models reserve the "id" field for primary key; your table has another
field as primary key.
--
You received this message because you are
G'day,
Very new to Django, I'm trying to connect to an existing MySQL database
that I am not familiar with. I used inspectDB to load up the database
models.py file, and am seeing these errors for some of the tables :
'id' can only be used as a field name if the field also sets
'primary_key
I have to build an app that has many (~15) interdependent selection
fields that come from large datasets across multiple different types
of databases.
For example, field A might have 10 values in a drop down, and when the
user selects "FOO", then field B's drop down gets populated with 30
choices
hi
I have updated and using All Auth now. I also liked it that i can do the
social logins and the linkedin login seems to be working so far :)
Can you point me to documentation on how to ovveride the methods ? I dont
know so much about this part of django and am a bit at a loss in my
Thanks for the pointer. Will check out all auth.
V.
On Tue, Sep 24, 2013 at 4:03 AM, Kamil Gałuszka wrote:
>
> Of course.
>
> First of all I would recommend you using of django-allauth. They are
> having great docs and they support custom user model. django-registration
>
Of course.
First of all I would recommend you using of django-allauth. They are having
great docs and they support custom user model. django-registration is
little less maintained and maybe less suitable for your needs.
First you define your custom form in settings.py:
SIGNUP_FORM_CLASS
Then
Hi,
I have 2 types of users with different views of the same page . Using
django-registration, I have been able to setup all the signup/password
change etc for one level of users - say students.
Now I want to have another set of registrations for Teachers. Is there a
way to achieve that ?
Vibhu
Hi,
My Django application was ported from a legacy application. This legacy
application has some MySQL user defined functions that are frequently used
in the WHERE clause of queries. Is it possible to use these stored
functions and still return query sets? I want to do something like
you just give the user object to the form object in you view handler.
some like:
form = HeatingUserForm(user=request.user)
or if have request POST data, you could do it like this:
form = HeatingUserForm(request.POST, user=request.user)
then:
self.user = kwargs.pop('user')
with the line
self.user = kwargs.pop('user')
do I need to import anything to access that the value 'user' ?
On Wednesday, 29 May 2013 15:16:32 UTC, Tom Evans wrote:
>
> On Wed, May 29, 2013 at 3:29 PM, tony gair
> wrote:
> >
> >
> > I've done a basic django app
Not knowing the specifics of your UserAccount model I will assume it has an
organization = ForeignKeyField(Organization)
In that case in your view you can just do:
user_organization = request.user.organization
and use that to filter the query
On Wednesday, May 29, 2013 10:45:54 AM UTC-5, tony
I think my first post was a bit messy and I left some information out
I have an organisation as a foreign key contained in my abstact user object
which is Heating_User. The premises also contains the organisation as a
foreign key. What I am looking to do on my premises view is to filter the
On Wed, May 29, 2013 at 3:29 PM, tony gair wrote:
>
>
> I've done a basic django app with a user which contains an organisation and
> premises foreign key inside the user model which has been inherited using
> the features of django 1.5.
>
> I use the organisation id and
I've done a basic django app with a user which contains an organisation and
premises foreign key inside the user model which has been inherited using
the features of django 1.5.
I use the organisation id and premises id inside other models which I would
like to present themselves providing
I apologize in advance if there is an obvious answer this. I'm totally new
to Django and still trying to figure things out.
We have a large set of data that will come in through Django - error
reports from our product.
What I'd like to have in the admin is that rather than showing all the
Cheers bill!
Figured it out already.
However i'm stuck on the database problem which i wrote in a separate email.
Stan
Best Regards,
Stanwin Siow
On Feb 19, 2012, at 9:34 PM, Bill Freeman wrote:
> Yes, you can, as part of the extra context, by whatever name doesn't
> collide. Then you
>
Yes, you can, as part of the extra context, by whatever name doesn't
collide. Then you
could use it in your template, in a "for" tag.
You could also pass another one, by a name other than "queryset" at
the same level as
the first one, but that becomes an argument to the view, so don't
expect it
Hi Stanwn,
try this:
def get_keyword():
return Keyword.objects.all()
UserProfile_info = {
"queryset" : UserProfile.objects.all(),
"extra_context" : {"keyword_list" : get_keyword }
}
Now you can use the variable {{ keyword_list }} to populate the template.
Alfredo
2012/2/19
Hi,
I'm not sure that I've understand your question:
url(r'^profile/(?P\d+)/(?P\d+)$', ..)
and now you can use the variable var_1 and var_2 in your function.
Alfredo
2012/2/18 Stanwin Siow
> Hello,
>
> I want to find out if there is anyway to pass two
Hello,
I want to find out if there is anyway to pass two querysets into a url pattern.
i have this url pattern at the moment.
UserProfile_info = {
"queryset" : UserProfile.objects.all(),
"extra_context" : {"keyword_list" : Keyword.objects.all}
}
url(r'^profile/$',
s that contain only a
> > certain set of Categories?
>
> > The 'in' operator doesn't do me any good. Excludes look like they are
> > needed...
>
> > I'm in a situation where quickly sorting by SETS of categories is
> > needed and I'm having a tough time. My databa
wo models:
>
> Article
> Category
>
>
> Articles can have multiple categories.
>
> How would you go about finding the Articles that contain only a
> certain set of Categories?
>
> The 'in' operator doesn't do me any good. Excludes look like they are
> needed...
>
>
quickly sorting by SETS of categories is
needed and I'm having a tough time. My database programming skills are
pretty weak.
I'm thinking of making an intermediate model called CategorySets.
Articles would then have a relationship to a CategorySet and I can
sort very easily on this.
(note my
I've found the best way to solve these problems is to use a
values_list queryset and inject the result of the into the outer
query. Django is smart and doesn't actually evaluate the values_list
query and instead injects that as a sub query in the SQL.
However in this case can't you simply do:
I believe you're confused. Your reply is to Tomasz, not to me. Also,
my solution requires no model changes. Go back and look at it again.
Cheers,
Cliff
On Mon, 2010-05-24 at 06:58 -0700, omat wrote:
> @cliff: you are right, but i am writing an extension to an existing
> app. i want to use
On Mon, May 24, 2010 at 3:36 PM, Tom Evans wrote:
> On Mon, May 24, 2010 at 3:23 PM, omat wrote:
>> ops, this doesn't work, because the the Quiz model is pointing to the
>> User model, and i want to filter on the quiz model and get the
>> matching User
On Mon, May 24, 2010 at 3:23 PM, omat wrote:
> ops, this doesn't work, because the the Quiz model is pointing to the
> User model, and i want to filter on the quiz model and get the
> matching User instances. but in the example in the docs, the query is
> on the parent model.
>
>
ops, this doesn't work, because the the Quiz model is pointing to the
User model, and i want to filter on the quiz model and get the
matching User instances. but in the example in the docs, the query is
on the parent model.
quiz_qs = Quiz.objects.filter(score__gt=90)
@cliff: you are right, but i am writing an extension to an existing
app. i want to use the models as-is if possible.
i found the part in the docs:
inner_qs = Blog.objects.filter(name__contains='Cheddar')
entries = Entry.objects.filter(blog__in=inner_qs)
thanks.
On May 24, 4:22 pm, Tomasz
On 24 Maj, 08:58, Daniel Roseman wrote:
>
> User.objects.filter(id__in=Quiz.objects.filter(score__gt=90))
>
Nice thing, is it documented somewhere (I think I haven't this
before) ?
--
Tomasz Zielinski
http://pyconsultant.eu
--
You received this message because you are
On May 24, 1:12 pm, omat wrote:
> Hi All,
>
> I have a Quiz model, which is related to the User model by a
> ForeignKey. I want to get a queryset of users that have a certain
> score.
>
> I want to avoid:
>
> User.objects.filter(id__in=[u.id for u in
>
What you are doing is querying the database once for each user to get
their ID, because of your q.user.id. This means a million separate
queries. You will be better off getting the id directly off the quiz
table:
User.objects.filter(id__in=[q.user_id for q in
Quiz.objects.filter(score__gt=90)])
ops, a small correction. i meant:
User.objects.filter(id__in=[q.user.id for q in
Quiz.objects.filter(score__gt=90)])
--
oMat
On May 24, 3:12 pm, omat wrote:
> Hi All,
>
> I have a Quiz model, which is related to the User model by a
> ForeignKey. I want to get a queryset of
Hi All,
I have a Quiz model, which is related to the User model by a
ForeignKey. I want to get a queryset of users that have a certain
score.
I want to avoid:
User.objects.filter(id__in=[u.id for u in
Quiz.objects.filter(score__gt=90)])
As there are about 1 million users, this is deadly slow.
On ma, 2010-02-15 at 18:22 -0800, ydjango wrote:
> I have two query sets with two different where clause on same table
> and same columns. Is it possible to have their union.
>
> I tried qryset = qryset1 + qryset2 - It gave me - "+ unsupported
> argument"
On
I have two query sets with two different where clause on same table
and same columns. Is it possible to have their union.
I tried qryset = qryset1 + qryset2 - It gave me - "+ unsupported
argument"
--
You received this message because you are subscribed to the Google Groups
"Djan
On Dec 10, 8:41 am, Adonis <achrysoch...@hotmail.com> wrote:
> Hi,
>
> I am trying to figure out the best way to do this.
> I have built a django application where users are members in projects.
> Thus, i need to assign users different permission sets that correspond
&g
Hi,
I am trying to figure out the best way to do this.
I have built a django application where users are members in projects.
Thus, i need to assign users different permission sets that correspond
to different projects. The django core permission system cannot solve
this by itself. I took a look
n the syncdb command, I get this error:
> >
> > > > ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
> > > > /var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
> > > > DeprecationWarning: the sets module is deprecated
> > > >
c...@pointy-stick.com>
> wrote:
>
> > On Fri, 2009-05-01 at 14:59 -0700, nbv4 wrote:
> > > Whenever I run the syncdb command, I get this error:
>
> > > ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
> > > /var/lib/python-support/python2.6/MySQ
r/lib/python-support/python2.6/MySQLdb/__init__.py:34:
> > DeprecationWarning: the sets module is deprecated
> > from sets import ImmutableSet
>
> > I'm using Python 2.6 on Ununtu 9.04. I see this page:
> >http://code.djangoproject.com/ticket/8078says the bug is fixed, but
On Fri, 2009-05-01 at 14:59 -0700, nbv4 wrote:
> Whenever I run the syncdb command, I get this error:
>
> ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
> /var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
> DeprecationWarning: the sets module is deprecate
tes/jobmap$ python manage.py syncdb
> /var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
> DeprecationWarning: the sets module is deprecated
> from sets import ImmutableSet
>
> I'm using Python 2.6 on Ununtu 9.04. I see this page:
> http://code.djangoproject.com/ticket/8078
Whenever I run the syncdb command, I get this error:
ch...@chris-desktop:~/Websites/jobmap$ python manage.py syncdb
/var/lib/python-support/python2.6/MySQLdb/__init__.py:34:
DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
I'm using Python 2.6 on Ununtu 9.04. I
principles above, we have developed more complicated wrapper
methods to handle multi-row return sets (using generators), as well as
a grouping wrapper that returns multi-tiered objects.
We welcome any feedback or comments on this approach. It would also be
interesting to know why you would prefer to use a
Thank you Daniel and Florian (Merci beaucoup. Je parle francais un
petit).
I think that I will be able to use both templates and custom model
methods to accomplish what I am trying.
On Apr 5, 4:18 pm, Daniel Roseman
wrote:
> On Apr 5, 8:49 pm, codecowboy
On Apr 5, 8:49 pm, codecowboy wrote:
> I posted a question earlier today about circular imports (http://
> groups.google.com/group/django-users/t/6119e979131c8c25). I now have
> a follow question to that. I've got the following view logic.
>
> def portal(request):
>
Did you try to look at Inclusion Tag ?
http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags
In template you are not allowed to use some python code... but with an
inclusion tag, you will be able to write this :
{% load related_conferences %}
{% related_conferences
I posted a question earlier today about circular imports (http://
groups.google.com/group/django-users/t/6119e979131c8c25). I now have
a follow question to that. I've got the following view logic.
def portal(request):
scientist_id = 1
s = get_object_or_404(Scientist, pk=scientist_id)
to
> cope with large data sets.
>
> We need to deal with 500K plus records - and the loading times are
> just too slow.
>
> Is it possible to show a limited number of recently added records ffor
> a model, but then use the search facility in athe dmin to look for any
> record in
On Tue, Feb 17, 2009 at 12:15 PM, mermer <merme...@googlemail.com> wrote:
> Does anybody have any advise on how best to customize the Admin to
> cope with large data sets.
>
> We need to deal with 500K plus records - and the loading times are
> just too slow.
You might want
Does anybody have any advise on how best to customize the Admin to
cope with large data sets.
We need to deal with 500K plus records - and the loading times are
just too slow.
Is it possible to show a limited number of recently added records ffor
a model, but then use the search facility
I have the following class:
class QuoteForm( ModelForm ):
class Meta:
fields = [ 'user', 'photo', 'created', 'usage', 'complete', ]
model = Quote
def __init__(self, *args, **kwargs ):
import pdb; pdb.set_trace()
super( QuoteForm, self ).__init__( *args,
I have the following model (http://dpaste.com/89869/). The model is
for a status report application I'm trying to create at work (so I
don't have to do powerpoints). So each report, has several tasks /
milestones associated with it.
My problem is when I use a related set, the custom manager
>> On Sat, Jul 19, 2008 at 11:50 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
>> >
>> Oops - sorry, I wasn't very clear in my original request. I'm looking
>> for a set type in the Django model hierarchy. Does this make more
>> sense?
>
> A set is just an unordered collection of objects. In
On Sat, Jul 19, 2008 at 11:50 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
>
> 'set' is a Python standard object [1], since version 2.4. In version
> 2.3 you need to import the 'Set' package first.
> So, if you care about backward compatibility in Python, the most
> secure way to import it is:
On Sun, 2008-07-20 at 10:05 -0400, Cole Tuininga wrote:
> On Sat, Jul 19, 2008 at 11:50 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
> >
> > 'set' is a Python standard object [1], since version 2.4. In version
> > 2.3 you need to import the 'Set' package first.
> > So, if you care about backward
On Sun, Jul 20, 2008 at 10:05 AM, Cole Tuininga <[EMAIL PROTECTED]>
wrote:
>
> On Sat, Jul 19, 2008 at 11:50 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
> >
> > 'set' is a Python standard object [1], since version 2.4. In version
> > 2.3 you need to import the 'Set' package first.
> > So, if you
'set' is a Python standard object [1], since version 2.4. In version
2.3 you need to import the 'Set' package first.
So, if you care about backward compatibility in Python, the most
secure way to import it is:
try:
set
except NameError:
from sets import Set as set # Python 2.3 fallback
Quick question for you folks - is there a native "set" type in the
Django model system? I'm currently on 0.96.1. Thanks!
--
Cole Tuininga
http://www.tuininga.org/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
This may be kind of hard to explain but what I am trying to accomplish
in Django is this:
I have 2 possible sets of data (It can also be one, depending on
what's easiest)
#1 is Reviews where FOO = X
#2 is Reviews where FOO = Y
Each Review contains several category type fileds. Summary, Value
tests BEFORE
writing my Django project.
Tks !
Tkm
On 9/25/07, Tim Chase <[EMAIL PROTECTED]> wrote:
>
>
> > I'm developing a Django project that's going to handle with
> > big sets of data and want you to advise me. I have 10 internal
> > bureaus and each of th
> I'm developing a Django project that's going to handle with
> big sets of data and want you to advise me. I have 10 internal
> bureaus and each of then has a 1.5 million registers database
> and it really looks to keep growwing on size on and on. I
> intend to use Postgres.
&g
ful in getting large amounts of data from the server to the client in
> > small efficient chunks, if the network transfer issue is high on your list.
> > -richard
> >
> >
> > On 9/25/07, Bruno Tikami < [EMAIL PROTECTED]> wrote:
> > >
> > > Hi fellows
t; -richard
>
>
> On 9/25/07, Bruno Tikami <[EMAIL PROTECTED]> wrote:
> >
> > Hi fellows,
> >
> > I'm developing a Django project that's going to handle with big sets of
> > data and want you to advise me. I have 10 internal bureaus and each of then
&g
to the client in
small efficient chunks, if the network transfer issue is high on your list.
-richard
On 9/25/07, Bruno Tikami <[EMAIL PROTECTED]> wrote:
>
> Hi fellows,
>
> I'm developing a Django project that's going to handle with big sets of
> data and want you to advise me. I hav
Hi fellows,
I'm developing a Django project that's going to handle with big sets of data
and want you to advise me. I have 10 internal bureaus and each of then has a
1.5 million registers database and it really looks to keep growwing on size
on and on. I intend to use Postgres.
The question
Correct. I over looked a few basics.
On 19 יולי, 04:58, "Ben Ford" <[EMAIL PROTECTED]> wrote:
> This error message is to do with a syntax error... It doesn't have anything
> to do with django specifically. If you've cut and pasted verbatim, then you
> need a colon ( : ) at the end of your if
This error message is to do with a syntax error... It doesn't have anything
to do with django specifically. If you've cut and pasted verbatim, then you
need a colon ( : ) at the end of your if > 0 line. This is what python
is flagging as an error as far as i can see.
Ben
On 18/07/07, Ilan
You're correct I did have a extra space, but the original problem was
syntax error on the following line :
if self.segment_set.count() > 0
so my question is : can I acess to FK queryset as described in
http://www.djangoproject.com/documentation/db-api/#Backward in a model
method
thanks
On 18
> Can someone point me to the problem?
>
> class Base(models.Model):
> User = models.CharField(maxlength=200)
> Notes = models.CharField(maxlength=200) # free text
>
> def _first_date(self):
>""" Return the first date """
> if self.segment_set.count() > 0
>
Hi,
My name is Ilan, and I kind of new working with Django.
I have a question about model methods.
I trying to write a model method which access ForeignKey FOO_set
functionality
Whoever it does not seems to pass the "syncdb" validation, because of
invalid syntax
Can someone point me to the
On 3/30/07, drackett <[EMAIL PROTECTED]> wrote:
> I see.. if there were more than one item in there, the last comma
> isn't necessary anymore, correct?
Correct. The comma is needed on a single-element tuple so that Python
can distinguish between something that's in parentheses for grouping
I see.. if there were more than one item in there, the last comma
isn't necessary anymore, correct?
('more', { 'classes': 'collapse', 'fields' : ('entry_date',
'entry_something') }),
On Mar 30, 2:50 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 3/30/07, drackett <[EMAIL PROTECTED]>
On 3/30/07, drackett <[EMAIL PROTECTED]> wrote:
> ('more', { 'classes': 'collapse', 'fields' :
> ('entry_date') }),
This line is the culprit; change it to
('more', { 'classes': 'collapse', 'fields' : ('entry_date',) }),
Take note of the comma after 'entry_date'.
The
I am trying to setup field sets on my first project, however, when I
add the admin section below, I get the error "My_blog has no field
named 'e' " This error goes away if I remove the "fields=" from below.
I got the code straight from the documentation, what am I doing
wrong
I am trying to setup field sets on my first project, however, when I
add the admin section below, I get the error "My_blog has no field
named 'e' " This error goes away if I remove the "fields=" from below.
I got the code straight from the documentation, what am I doing
wrong
On Mar 27, 2:10 pm, "Nathan Harmston" <[EMAIL PROTECTED]>
wrote:
> HI,
>
> Currently I am trying to store a "tree" in a database and want to use Nested
> Sets in order to do this. I was wondering if this exists within Django atm
> or if there are pla
Nathan Harmston wrote on 03/27/07 14:10:
> HI,
>
> Currently I am trying to store a "tree" in a database and want to use Nested
> Sets in order to do this. I was wondering if this exists within Django atm
> or if there are plans to add it in the future or has someone d
> Currently I am trying to store a "tree" in a database and want to use Nested
> Sets in order to do this. I was wondering if this exists within Django atm
> or if there are plans to add it in the future or has someone developed it on
> the side? If the ans
HI,
Currently I am trying to store a "tree" in a database and want to use Nested
Sets in order to do this. I was wondering if this exists within Django atm
or if there are plans to add it in the future or has someone developed it on
the side? If the answer to these
John Matthew wrote:
> Thank you for the reply.
No problem. :)
--~--~-~--~~~---~--~~
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
Thank you for the reply.
On 1/10/07, Brian Beck <[EMAIL PROTECTED]> wrote:
>
>
> Hi,
>
> object_list takes an allow_empty argument, try settings it to True.
> >From the docs:
>
> allow_empty: A boolean specifying whether to display the page if no
> objects are available. If this is False and no
Yup, that did it!
Thanks again Brian!
--~--~-~--~~~---~--~~
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
Brian Beck wrote:
> Hi,
>
> object_list takes an allow_empty argument, try settings it to True.
> >From the docs:
>
> allow_empty: A boolean specifying whether to display the page if no
> objects are available. If this is False and no objects are available,
> the view will raise a 404 instead of
Hi,
object_list takes an allow_empty argument, try settings it to True.
>From the docs:
allow_empty: A boolean specifying whether to display the page if no
objects are available. If this is False and no objects are available,
the view will raise a 404 instead of displaying an empty page. By
OK, again I'm stumpped.
I have the following models:
class Portfolio(models.Model):
user= models.ForeignKey(User)
description = models.CharField(maxlength=50)
notes = models.CharField(maxlength=200)
class Holding(models.Model):
porfolio =
On 10/30/06, Ceph <[EMAIL PROTECTED]> wrote:
>
> What I need to pull is a list of Items using the data from the Render
> model that represents the latest Revision of an Item. I am currently
> doing this easily with raw SQL, but this seems like something that
> Django should be able to do for me.
I followed the tutorials and have gone through the manual (all nicely
written, by the way), but I'm having trouble trying to wrap my head
around using Query Sets to get myself through this.
I have the following (abbreviated) models:
class Item( models.Model ):
pass
class Render
Ivan Sagalaev wrote:
> Gary Wilson wrote:
> > Why can't objects be used in python sets? Example:
> >
> >>>> [u.username for u in User.objects.all()]
> > ['bar', 'foo', 'foobar']
> >>>> a = User.objects.filter(username__contains='foo')
>
Gary Wilson wrote:
> Why can't objects be used in python sets? Example:
>
>>>> [u.username for u in User.objects.all()]
> ['bar', 'foo', 'foobar']
>>>> a = User.objects.filter(username__contains='foo')
>>>> b = User.objects.filter(username__contai
Why can't objects be used in python sets? Example:
>>> [u.username for u in User.objects.all()]
['bar', 'foo', 'foobar']
>>> a = User.objects.filter(username__contains='foo')
>>> b = User.objects.filter(username__contains='bar')
>>>
i am still not following this..
here is the output from my show variables..
mysql> SHOW VARIABLES LIKE 'char%';
+--++
| Variable_name| Value |
+--++
|
the
> admin site?
When connecting to MySQL you need to specify which encoding you are
going to use to get results and send data.
Right now, Django's MySQL backend sets this to UTF8 when the server
is MySQL 4.1 or higher. There are talks/posts which discuss to make
this configurable. I think
[EMAIL PROTECTED] wrote:
>
> what character set and collation does django expect when setting up the
> admin site?
I use MySQL's defaults: charset is "latin1", collation is
"latin1_swedish_ci". Everything works properly. But I never tried
non-English admin. Maybe i18n users can provide more
1 - 100 of 101 matches
Mail list logo