На Fri, 09 Sep 2011 22:18:50 +0100
Tim Sawyer написа:
> Hi Folks,
>
> I have a django site which is against a postgres database which is
> UTF8. I have a large droplist with international names in, and it
> doesn't appear to be sorting correctly.
>
> The list
The problem is very clear. Add a related_name argument to those fields
in your model. If you are not sure how to do this, search the
documentation for "related_name"
On 9/10/11, Danny Gale wrote:
> Hi, I'm learning Django (albeit slowly) and I'm trying to set up a really
Hi nara,
This error is normally thrown when the sites app is being used in a
django project. I think it can also occur if the sites tables in the
database is not properly created during django-admin startproject.
Someone else reported that he was able to solve the problem by using a
user name
Hi, I'm learning Django (albeit slowly) and I'm trying to set up a really
simple database. I want to have Artists, Albums, and Tracks. I want to be
able to navigate both ways in the db. So you should be able to go from
artist -> album or from album -> artist. Same thing with album and track. I
yes, admin is in INSTALLED_APPS. BTW, the basic site works fine if I
turn
off all admin. admin is not strictly necessary, it is just a nicety.
One strange thing though: I have had to set PYTHONPATH and
explicitly set it to ~/mblog:~/mblog/apps:~/mblog/apps/myblog,
even though __init__.py files
Today we've released Django 1.3.1 and Django 1.2.6 to deal with
several security issues reported to us. Details of these issues and
the releases, along with several important advisory notes, are
available in the blog post on djangoproject.com:
You can find it in django.forms.forms.BaseForm._clean_fields
(django/forms/forms.py line 271, the line you'll want to look at is 286).
To solve your specific problem, you'll want to do something like:
for field in self.model._meta.fields:
if hasattr(self, "process_%s" % field.name):
Is admin in INSTALLED_APPS?
https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-INSTALLED_APPS
Casey
On 09/09/2011 07:04 PM, nara wrote:
Hi,
I am a newbie, and I am trying a very basic blog site to get familiar
with the latest development release. I followed the directions in the
Hi,
I am a newbie, and I am trying a very basic blog site to get familiar
with the latest development release. I followed the directions in the
tutorial (part 2) to try and get the automatic admin going. However,
here is what I get on the url localhost:8000/admin/
DoesNotExist at /admin/
Site
As a norwegian myself this is very interesting. I have no clue how to
help you, but please post information about any solution you might
encounter on your quest.
Regards,
Thomas
On Fri, Sep 9, 2011 at 11:18 PM, Tim Sawyer wrote:
> Hi Folks,
>
> I have a django site
Hi Folks,
I have a django site which is against a postgres database which is UTF8.
I have a large droplist with international names in, and it doesn't
appear to be sorting correctly.
The list contains Ingvar Mæland and Børre Børresen. I'm told that the
Norwegian sort order should be X Y Z
But I cannot set the SITE_ID in the settings.py right?
Because if one user set the SITE_ID = 1, then parallel another user
can set the SITE_ID = 2.
Because we only have one instance.
On the other hand I still want to use SITE_ID from the settings.py,
because using this I can call the models
Hello,
I'm creating a tool that will automate the downloading, processing and
repackaging of data.
The scripting for each data set is composed of two main parts: a
fairly standard models.py file, and a loaders.py file that will
contain all the instructions on how to turn the raw data into what
Hi,
I have been going in circles for hours and couldnt find help on stack overflow.
Here is my question
http://stackoverflow.com/questions/7365359/complex-query-in-django-where-subquery-exists
Regards,
Mo
--
You received this message because you are subscribed to the Google Groups
"Django
On Sep 9, 2011, at 9:44 AM, Pewpewarrows wrote:
> I don't understand the 10-15 limit either. I've done giant "in" queries in
> the past that perform fine with large data sets and proper indexing.
You can set the rule of thumb whereever you like; eventually, the curves
between an IN and a join
On Sep 9, 2011, at 8:41 AM, Simon Riggs wrote:
> Not sure I understand the limitation to 10-15 entries.
That's my rule of thumb as to when I prefer to re-express a query as a join
rather than an IN. Larger values can work just fine, but __in in Django tends
to be abused with gigantic
Indeed :) . I'd never have guessed that. Thanks,
Axel.
Am 08.09.2011 um 17:47 schrieb Shawn Milochik:
> I think your order by needs to be "-start" instead of "start," then
> take [0] instead of [:1]. That will get the newest entry that matches
> your query.
>
> --
> You received this message
you could write a middleware that looks at the request.META and
inserts the correct id into the request?
you won't be able to access it like you would with the
settings.SITE_ID, but it should be a start
On Sep 9, 5:02 am, sjtirtha wrote:
> Hi,
>
> I'm looking for the best
>From what I understand, MediaTemple's (dv) server is just a normal VPS that
you would get from any other hosting company. Setup your environment and
website how you would on any other production server.
If you're asking about how to setup Django on a *nix server in general: look
into
Hi everyone,
I am having quite a bit of trouble finding current documentation on
how to deploy Django to a 4.0 MediaTemple Dedicated server. The wiki
page is frighteningly short and I'm not sure where to go from there to
make it actually work:
The best way I can see to do this straight with the Django ORM is:
>>
>> prop_dates =
>> Target.objects.annotate(latest_property=Max('property__export_date')).values_list('latest_property',
>>
>> flat=True)
>> properties = Property.objects.filter(export_date__in=prop_dates)
>>
>
> Let say I
I don't understand the 10-15 limit either. I've done giant "in" queries in
the past that perform fine with large data sets and proper indexing.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
On 09.09.2011 17:36, Daniel Gagnon wrote:
On Fri, Sep 9, 2011 at 9:28 AM, Pewpewarrows > wrote:
Tim Shaffer's response would have you doing N+1 queries, and
having to loop through all of your Target objects in-memory.
You need to add it to the registration_form.html as well.
Make sure you have 'django.middleware.csrf.CsrfViewMiddleware', in the
MIDDLEWARE_CLASSES tuple in the settings.py file.
Cheers, Brett
On 9 Sep 2011, at 16:47, nicolas HERSOG wrote:
> Hi All !
>
> Do any of you use this app
>
Thanks for both responses; I have what I need now.
On Fri, Sep 9, 2011 at 9:09 AM, Leonardo Giordani <
giordani.leona...@gmail.com> wrote:
> Hi Christos,
>
> if you put
>
> {% extends "somefile.html" %}
>
> in your template, Django expects to find it in one of the directories
> specified in your
Hi All !
Do any of you use this app
https://bitbucket.org/ubernostrum/django-registration/overview with the csrf
middleware ?
Instead of re-write myself the registar, check via email, lost password,
login and co i tried to use this app, but it don't work and i have this
message :
Forbidden (403)
On Fri, Sep 9, 2011 at 4:33 PM, Christophe Pettus wrote:
>
> On Sep 9, 2011, at 6:28 AM, Pewpewarrows wrote:
>
>> prop_dates =
>> Target.objects.annotate(latest_property=Max('property__export_date')).values_list('latest_property',
>> flat=True)
>> properties =
On Fri, Sep 9, 2011 at 9:28 AM, Pewpewarrows wrote:
> Tim Shaffer's response would have you doing N+1 queries, and having to loop
> through all of your Target objects in-memory. Technically it would work, but
> as soon as you have a decently sized amount of data in there
On Sep 9, 2011, at 6:28 AM, Pewpewarrows wrote:
> prop_dates =
> Target.objects.annotate(latest_property=Max('property__export_date')).values_list('latest_property',
> flat=True)
> properties = Property.objects.filter(export_date__in=prop_dates)
Note that if prop_dates has more than 10-15
It sounds like you want to specify a custom many-to-many relationship
table using the manytomany.through option. Check out
https://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany
for an example.
On Sep 9, 12:10 am, jollyroger wrote:
> Hi.
>
>
Hi Christos,
if you put
{% extends "somefile.html" %}
in your template, Django expects to find it in one of the directories
specified in your TEMPLATE_DIRS variable in settings.py.
They are considered in the order they are written, so the base.html you are
extending is the first you find in
Tim Shaffer's response would have you doing N+1 queries, and having to loop
through all of your Target objects in-memory. Technically it would work, but
as soon as you have a decently sized amount of data in there it'd slow to a
crawl.
The best way I can see to do this straight with the Django
Hi,
I'm looking for the best solution to have a multitenant in django.
Site Framework is often mentioned support multitenant.
But site framework is developed for websites which have several static sites.
What I' looking for now is multitenant and not multi site.
So I want to have the
Django itself doesn't ship any templates.
In order to understand where all your templates are, and how the {%
extends 'template.html' %} functionality works, it's best to read the
docs.
https://docs.djangoproject.com/en/1.3/topics/templates/#id1 is a good
starting point in this case.
On Sep 9,
"site_base.html", directly under the templates folder, extends a
"base.html".
Where is the base.html? I see several under the project heirarchy somewhere,
and I'd like to know which one of them site_base.html extends (if it does
so), or else where I can go to edit site_base.html.
--
[image:
I get it now.. Then go with the hackier solution I proposed!
On Thu, Sep 8, 2011 at 6:18 PM, Rami wrote:
> Thanks.
> But note that I'm not looking for the dict value in MyList, rather: I
> loop on MyList and (trying to) retrieve the dict value from (another
> var) BOOK_PHONE
Maybe something like this...
for target in Target.objects.all():
property = target.property_set.latest("export_date")
print target.name, target.t1, target.t2, property.export_date,
property.p1, property.p2
--
You received this message because you are subscribed to the Google Groups
37 matches
Mail list logo