You might be using joins in one or more of your MongoDB model declarations.
Check with the Meta section of the Mongo models.
Infact, if you are trying to span across collections in your non-relational
database on purpose, then something basic might be going wrong.
On Fri, Feb 10, 2012 at 9:32 AM
09.02.2012 20:01, Rune Kaagaard пишет:
Maybe something like the following untested code:
def submit_if_any(a, b, conditions, submit_func):
has_any = False
for condition in conditions:
if condition(a, b):
Hi all,
I am trying to use two database for my django(Django nonrel 1.3.1)
project. One is Postgres and other is MongoDB.
After filling in details in settings.py :
DATABASES = {
'default': {
'ENGINE': 'django_mongodb_engine', # Add
'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite
I wanted to know if the settings.py will support a generic ODBC
connection and if it could what the syntax would be in the database
section of the , settings.py file
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
On Feb 10, 2:39 am, Олег Корсак
wrote:
> Hello.
> I have a model named MyModel and it has its own table named my_model (as
> an example).
>
> Is it possible to write ORM-way request to be same as this SQL:
> SELECT mo.* FROM (SELECT mi.* FROM my_model mi) AS mo WHERE mi.a=mo.a
> AND mi.b=mo.b;
>
>
Hello.
I have a model named MyModel and it has its own table named my_model (as
an example).
Is it possible to write ORM-way request to be same as this SQL:
SELECT mo.* FROM (SELECT mi.* FROM my_model mi) AS mo WHERE mi.a=mo.a
AND mi.b=mo.b;
There is also an agregation+group by statements in subs
Makes sense. I actually ended up using your example and it worked well
as far as I can tell. And you actually explained the importing too,
which is where I messed up previously.
Also, I made the mistake of putting it in a file that was already
importing a bunch of other things, so I got wrapped up
> Doug, I don't see how the LazyFetch you wrote is much different than
> what akaariai shared? Can you explain to me what the difference is?
> And I'm not saying that in a condescending way, I'm saying I'm just
> not sharp enough on my Python to recognize the difference.
Slightly different impleme
Glad you were able to resolve your problem. I use multi-table
inheritance a lot and so far it always "just works" without me having
to worry about or fiddle with the internal ids that Django uses to
connect the derived class rows to the base class ones.
-- John
On Feb 8, 1:25 pm, Artyom Chernetz
Django docs explain this quite nicely :)
https://docs.djangoproject.com/en/dev/internals/contributing/?from=olddocs
On Fri, Feb 10, 2012 at 12:46 AM, Gath wrote:
> Guys,
>
> What do i need to learn/know before i start contributing to django
> development?
>
> Thanks
>
> Gath
>
> --
> You recei
Guys,
What do i need to learn/know before i start contributing to django
development?
Thanks
Gath
--
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 gro
I tried akaariai's method, but I may have done the importing wrong. It
seemed to make apache struggle mightily to the point where it was
unusable for some reason.
Doug, I don't see how the LazyFetch you wrote is much different than
what akaariai shared? Can you explain to me what the difference is
Thanks Andy, I didn't know you could use a cache by name. That will be
helpful.
On Feb 8, 9:22 pm, Andy McKay wrote:
> You can define multiple caches:
>
> https://docs.djangoproject.com/en/1.3/topics/cache/#django-s-cache-fr...
>
> You could then use a file system cache or your own local memcache
>
> Hi!
>
> I have 2 python version ( Python 2.7 and 3.2 ) in Windows 7. But I use
> Python 3.1 usually. ( I have 2 directories( Python27 and Python32 ))
> I decided to use Django and tried to install it as guideline in
> https://docs.djangoproject.com/en/1.3/topics/install/#installing-official-rel
All,
I have managed to get some code working that passes extra kwargs to the
__init__() function of the member forms of a formset. This is good.
But I have no idea why it works. Here is my basic code:
class MyModel(models.Model):
myField = models.CharField(max_length=10)
class MyForm(
Hi
You need to install the package psycopg2. Google and install the package.
It should work
Best Regards,
Stanwin Siow
On Feb 9, 2012, at 10:10 PM, kalyani ram wrote:
> Hey all,
> Tday is my first day with django and i tried configuring postgresql as
> a backend and got an error like thi
Hey all,
Tday is my first day with django and i tried configuring postgresql as
a backend and got an error like this:
raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading psycopg2
module: No module named psycopg2
Please h
Maybe something like the following untested code:
def submit_if_any(a, b, conditions, submit_func):
has_any = False
for condition in conditions:
if condition(a, b):
has_any = True
On Thursday, 9 February 2012 13:41:31 UTC, anand jeyahar wrote:
>
>
> Hi
>
>
>
>
>> There's no searching going on here. You create a lock instance,
>> passing two positional arguments, which Django interprets as the first
>> fields, ID and name.
>>
>> That's why you should never use positional a
I missed the reply , so apologies for reviving this thread after more
than a week.
On Jan 27, 1:28 am, Bill Freeman wrote:
> I think that depends upon the context the view provides, and upon what
> tag libraries can be loaded.
I think can work with that
> Objects in the context can have their m
> Why are you only saving if you've made a change? (Just make sure you
> aren't optimizing prematurely.)
I have a lot of signals going round, so I wan't to keep saves to a
minimum. But
nothing bad would happen if I always saved in this case. Thus the code
would
look:
resource.user.email = requ
Hi
> There's no searching going on here. You create a lock instance,
> passing two positional arguments, which Django interprets as the first
> fields, ID and name.
>
> That's why you should never use positional arguments when instantiating -
> always do it via keyword arguments:
> lock = Lock(
You can have a look here for Django's docs on these...
https://docs.djangoproject.com/en/dev/ref/settings/
https://docs.djangoproject.com/en/dev/topics/files/
The media stuff are for where files are stored typically after upload.
So for example, there's the ImageField that you can use as a field o
On Thursday, 9 February 2012 11:29:52 UTC, anand jeyahar wrote:
>
> Hi,
>Am rather new to django and this error makes no sense to me..
>
>
> Traceback (most recent call last):
> File "", line 1, in
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/
> base.py", line 460,
You can also use the south application to manage migrations.
pip install south
Then add 'south' to the list of installed apps.
To start off you can do
./manage.py schemamigration --initial appname
./manage.py migrate appname
Then whenever you make a change to your models:
./manage.py schemamigra
Hi,
Am rather new to django and this error makes no sense to me..
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/django/db/models/
base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert,
force_update=force
On Feb 8, 7:01 pm, Tom Lesters wrote:
> > Generally speaking, using virtualenv (no-site-packages) + pip (with a
> > requirement file you keep in your project) is a GoodPractice(tm) when
> > it comes to dependencies.
>
> I'm actually using virtuallenv + pip now, thanks for advice anyways!
GoodBoy(
On Feb 9, 3:39 am, John Yeukhon Wong wrote:
(snip code)
> I just don't understand what each of the options above mean Can
> someone please explain them? Thanks.
https://docs.djangoproject.com/en/1.3/ref/settings/
--
You received this message because you are subscribed to the Google Group
On Feb 9, 9:41 am, Rune Kaagaard wrote:
> Dear django-users
>
> I keep doing patterns like:
>
> has_changed = False
> if resource.user.email != request.POST['email']:
> resource.user.email = request.POST['email']
> has_changed = True
> if resource.us
I have a single django project, deployed on two separate installations
of Apache + python + mod_wsgi.
The first installation has python 2.6 and everything works fine.
The second installation has python 2.7. With this one, a few things
work correctly - namely django's debug 404 pages, the login pa
How python treat some folder as module? You need to add __init__.py into it.
On Thu, Feb 9, 2012 at 11:33 AM, Daniel Roseman wrote:
>
> On Thursday, 9 February 2012 10:21:29 UTC, Alessandro Candini wrote:
>>
>> Hi list.
>> In my project named STO I have the 'jsonopenlayers' app with the
>> follo
On Thursday, 9 February 2012 10:21:29 UTC, Alessandro Candini wrote:
>
> Hi list.
> In my project named STO I have the 'jsonopenlayers' app with the
> following structure:
>
> STO
> ├── __init__.py
> ├── jsonopenlayers
> │ ├── ingestion
> │ │ └── ingestShp.py
> │ ├── __init__.py
> │ ├── models.py
Hi list.
In my project named STO I have the 'jsonopenlayers' app with the
following structure:
STO
├── __init__.py
├── jsonopenlayers
│ ├── ingestion
│ │ └── ingestShp.py
│ ├── __init__.py
│ ├── models.py
│ └── views.py
├── manage.py
└── settings.py
What I would like to do is to import the fun
On Feb 9, 9:41 am, Rune Kaagaard wrote:
> has_changed = False
> if resource.user.email != request.POST['email']:
> resource.user.email = request.POST['email']
> has_changed = True
> if resource.user.is_active != request.POST['is_active']:
>
I hope here's the right place to announce this:
I've just released the [django-digested][1] package to PyPI. It
supports instant notifications, daily and weekly digests, and
individual preferences for different groups of updates.
The package handles the "digest" part of your notifications. For ea
Dear django-users
I keep doing patterns like:
has_changed = False
if resource.user.email != request.POST['email']:
resource.user.email = request.POST['email']
has_changed = True
if resource.user.is_active != request.POST['is_active']:
re
36 matches
Mail list logo