On Sat, Jun 30, 2012 at 8:31 PM, Odagi wrote:
> It's working! Thanks a lot.
> Is There a problem with mixing regular models fields with geomodels ones?
>
No, there's no problem, as long as you remember to use a GeoManager on
every model that ever does geospatial queries
On Sat, Jun 30, 2012 at 8:19 PM, Nikolas Stevenson-Molnar <
nik.mol...@consbio.org> wrote:
> Try a double underscore between distance and lte.
>
The single underscore is correct:
https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#distance-lte
But, you need to use a `objects =
On Mon, Feb 27, 2012 at 11:42 PM, DF wrote:
> I'm on a Mac. The Django GeoDjango installation instructions are
> somewhat obtuse and there aren't alternative sites I've found with
> more straightforward instructions. It's lame that these are confusing
> but, well, they
On Sat, Feb 25, 2012 at 7:50 PM, DF wrote:
> GeoDjango though, to be honest, sounds frightening and extremely
> advanced. I've been reviewing the installation requirements and, at
> least according to how these were written, is intense and ripe for
> many errors.
What
Whoops, quick correction:
On Sat, Feb 25, 2012 at 5:03 PM, Ethan Jucovy <ethan.juc...@gmail.com>wrote:
> * You'll want to add a line ``objects = GeoManager`` on each model that
> you will want to perform geospatial queries against.
>
That should be ``objects = GeoManager()``
Others have answered your other questions well, so just addressing this one:
On Thu, Feb 23, 2012 at 8:13 PM, DF wrote:
> Essentially, I'm looking to see what benefits GeoDjango would give
> this project over using just the Google Maps API. If I've already
> started a
On Tue, Jun 21, 2011 at 5:09 PM, Thomas Weholt wrote:
> Proof of concept. Need comments. Released under a modified BSD-license.
>
> http://pypi.python.org/pypi/Kolibri/0.1.0a
>
> or better
>
> https://bitbucket.org/weholt/django-kolibri
>
> There's a blogpost with two
On Sat, Jun 18, 2011 at 10:01 AM, Masklinn <maskl...@masklinn.net> wrote:
> On 2011-06-18, at 15:05 , Ethan Jucovy wrote:
> > I tend to avoid @property -- it adds conceptual overhead for code
> > readers (hiding the fact that a function call is taking place) for littl
On Thu, Jun 16, 2011 at 2:07 PM, Micky Hulse wrote:
> Hello,
>
> Just curious what the rule-of-thumb is for when it comes to using
> model methods vs. properties. For example:
>
> [code]
>
> @property
> def is_modified(self):
>if self.modified > self.created:
>
This is really excellent - thanks for releasing it.
-Ethan
On Tue, Jun 7, 2011 at 10:51 PM, Ryan Kelly wrote:
>
> Hi All,
>
>
> I've just released a little experiment in combining the process
> management awesomeness of supervisord with the convenience of Django's
> management
Is your CF base class an abstract base class[1]? If it's not, then your
database actually has separate tables for CF, CFI and CFT .. and when you
access a `doc.cf` you're really getting the CF model instance, *not* the
derived class instance.
IIRC if you make CF an abstract base class then this
On Wed, May 4, 2011 at 7:19 PM, Ethan Jucovy <ethan.juc...@gmail.com> wrote:
> This also feels a little hacky, but IMHO cleaner than messing with
>> builtins.
>
>
Looking at django/template/__init__.py -- it does seem like INSTALLED_APPS
and django.template.builtins ar
On Wed, May 4, 2011 at 6:41 PM, Up2L8 wrote:
> I'm trying to use the Template library outside of a normal Django
> webapp and am having difficulty figuring out the right way to register
> a custom filter.
> The current implementation works, but I don't like accessing the
Thanks Shawn, this is very helpful. It's good to hear Orbited is being
actively developed again.
I'm not already using RabbitMQ for anything, so I'm going to take the
opposite approach: start out doing some test projects with Hookbox, and then
try porting them to Orbited. I'm completely new to
On Fri, Jan 14, 2011 at 6:28 AM, Shawn Milochik wrote:
> I asked about this back in October but nobody replied. I think it's been
> long enough for a bump. ;o)
>
> I searched the list online and haven't seen any recent discussions about
> this, so I figured I'd check in. Last
On Fri, Feb 26, 2010 at 12:11 PM, Phlip wrote:
> Djangoids:
>
> Consider this pattern:
>
> product.brand = brand
> product.in_stock = True
> product.save()
>
> Because business-layer code does that all the time, can we DRY the
> code up a little?
>
> def up(model,
My instinct is that you may be trying to be too generic. Without knowing
more details, a "generic Entry" sounds a lot like .. a database record. :)
Django's model.Model base class already does a great job at being easily
extensible.
Is there a specific minimal-but-interesting set of database
I think the easiest thing to do write two templates and use the {% include
%} tag like so:
# templates/number_of_comments.html
There are {{paragraph.comment_set.all.count}} comments.
# templates/display_all_paragraphs.html
{% for paragraph in paragraph_set %}
Paragraph: {{paragraph.name}}
{%
Lately I have really liked using custom template tags for these sorts of
queries.
Once you get the hang of writing them, it's very quick to build a little
library of queries in custom tags for your application. These are *very*
convenient to use because you don't have to modify views.py -- or
On Thu, Nov 5, 2009 at 2:30 PM, David wrote:
> Is it possible to redirect upon successful comment submission to the
> previous page when using Djangos built in render_comment_form ?
>
I'm not sure if there's a more direct way, but you can override the
"comment_done"
I haven't tried this, but it looks like you can use
`django.core.urlresolvers.resolve(path_string)` to figure out if a view
exists with a given path.
http://docs.djangoproject.com/en/dev/topics/http/urls/#django.core.urlresolvers.resolve
Hey,
I actually just did 5-star ratings for a project I'm working on, and have
been trying to figure out if I have anything reusable worth releasing as a
package (and trying to find the time to figure that out..) I'll outline
what I did and what I used to do it.
I used django-ratings[1,2] for
I don't know what the error means, but this looks like the sort of
thing you might want to put on a custom Manager instead -- then you
could say `Settore.objects.get_default()`.
http://docs.djangoproject.com/en/dev/topics/db/managers/#topics-db-managers
(I have a feeling the error wouldn't
Look in django-registration's registration/urls.py to find the names.
IIRC it's like "auth_login" and "registration_register" (both with no
parameters).
egj
On Sun, Oct 25, 2009 at 8:09 PM, Sławek Tuleja wrote:
>
> Hi
> I am using django-registration. In my base.html
On Sat, Oct 24, 2009 at 10:00 AM, Mark (Nosrednakram) <
nosrednak...@gmail.com> wrote:
> def using_reversion():
>try:
>import reversion
>return True
>except ImportError:
>return False
>except:
>pass
>
I'd still leave out the `bare except` entirely so
On Fri, Oct 23, 2009 at 1:09 PM, Mark (Nosrednakram) wrote:
>
> Hello Django Users,
>
> I sometimes have reversion installed and sometimes have a
> CACHE_BACKEND defined and came up with the following solution for
> determining if I should register a model or use cache
Do you need one-time previews ("are you sure you want to save this?") or
real drafts that can be viewed more than once? If you just need an
intermediate preview step for the user who's submitting the data, you can do
it without saving any data on the backend --
write a "preview" view that
On Thu, Oct 15, 2009 at 12:24 PM, Shawn Milochik wrote:
>
> 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
On Thu, Sep 24, 2009 at 9:37 AM, Chris Withers wrote:
>
> Hi All,
>
> I tried this:
>
> from django.db import models
>
> signins = models.IntegerField(
> default=0,
> db_index=True,
> verbose_name='Total Signins'
> )
>
> class User(models.Model):
>
29 matches
Mail list logo