I kind of figured this one out... the source spatial relation was in
SRID 3084 format "North_American_Datum_1983". So if i set that in the
model as an attribute then I can use the transform method to tranform
to WGS84 or srid 4326, the default.
poly = models.GeometryField(srid=3084) # 308
Is it possible? Or I need to page my queryset in the wrapper function
and do it there? (it seems not DRY to simply copy-paste the pagination
logic from object_list)
Basically I have several object_list wrappers for a particlar model,
and I want to add logging logic every time a specific instance
Hey,
I'm building a web applications that pulls all of its data from an external
web service rather than from a managed database. The documentation for the
model layer in Django seems to assume you're retrieving application
information from a database. Can anyone point me to a resource that
descri
Hello, I'm playing around with geodjango and this is a GIS question
but I'm starting my quest for an answer by asking here.
So have a shp file I'm using from the city of chicago:
http://egov.cityofchicago.org/webportal/COCWebPortal/COC_ATTACH/CitywideWardsMap2008.zip
There is a wards.shp file b
Hi all,
I'm populating my database manually using a script that create ORM
objects and save them... I have a lot of datas and it's fairly slow.
I'm wondering what is the best way to speed this up.
>From
>http://docs.djangoproject.com/en/dev/howto/initial-data/#howto-initial-data
I see there are
Below is code subclassing the RadioSelect forms widget and associated
renderer, this allows radio button selection at runtime in a view. I
intend to keep some user selections in session data, and this way the
users don't have to keep making the same radio button choices over and
over. For exampl
I want to have a popups in a search form that have an additional item
'Select Any'. Having trawled the internet I can't find any examples
other than using jquery and I'm sure this must be possible in django.
Any pointers very welcome.
MODEL - simplified
===
TRANSMISSION_CHOICES = (
Ah ok :)
Thx!!
On Dec 24, 5:12 pm, Brian Neal wrote:
> On Dec 24, 3:54 pm, kev wrote:
>
> > Hello,
> > Im trying to create a digg type pagination. Is there a decent
> > pagination app already out there that works for 1.0? I tried looking
> > but havent succeeded.
>
> > Thanks,
> > Kev
>
> I'm
On Dec 24, 3:54 pm, kev wrote:
> Hello,
> Im trying to create a digg type pagination. Is there a decent
> pagination app already out there that works for 1.0? I tried looking
> but havent succeeded.
>
> Thanks,
> Kev
I'm using this. Works great!
http://www.djangosnippets.org/snippets/773/
--~--
Well, it's saying it can't find a file named seoappsla/views.py. Does
that file exist?
Based on the example code within the URLconf, I'd guess you might want
to try seoapp_sla.views.index and seoapp_sla.views.detail instead--but
without knowing what files you have in what directories, it's hard t
Hello,
Im trying to create a digg type pagination. Is there a decent
pagination app already out there that works for 1.0? I tried looking
but havent succeeded.
Thanks,
Kev
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
Hi everyone,
i have an application and i'm trying to run it on Apache. I have the
following lines in httpd.conf
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonPath "['/home/sla/'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE seoapp_sla.settings
Pytho
Hi everyone,
i'm having a problem with an application i have migrated from a server
to another. I got the settings right and all, but i get this error:
Exception Type: ViewDoesNotExist
Exception Value:Could not import seoappsla.views. Error was: No
module named seoappsla.views
I
Or, if the issue is at least partly due to buffering for efficiency in
communicating between django and the database engine, is there a way
to choose to have smaller buffers?
On Dec 24, 12:42 pm, garyrob wrote:
> I am getting the impression that when I do a django database query
> that iterate
I have the following form:
class UserInfoForm(forms.ModelForm):
password_field = forms.CharField(label='Password',
widget=forms.PasswordInput(render_value=False)
password_repeat_field = forms.CharField(label='Password(repeat)',
widget=forms.PasswordInput(render_value=False))
#Make th
I am getting the impression that when I do a django database query
that iterates through all the rows of the table, django stores every
model instance in memory.
For instance, just doing
sumValues = 0
for someModel in SomeModel.objects.all():
sumValues += someModel.value
print sumValues
ca
Is there a simple example anywhere for how to save data that is
specific to an individual user, and how to access that data in a view?
For example if each user owns a list of books, what does the BookList
model look like exactly and what are the lines of code in the view
that would set and read a
The naming collision is fixed in Photologue 2.1.
http://code.google.com/p/django-photologue/downloads/list
- Justin
On Dec 21, 3:37 am, Bartek wrote:
> Bartek pisze:> Hi all
> > When I loop over sys.modules in templatetags/pobierz.py there's
> > django.templatetags.photologue, so probably that
Very useful post, thank you :)
--Tirta
--- On Wed, 24/12/08, Matias Surdi wrote:
> From: Matias Surdi
> Subject: Re: Model with 2 foreignkey to User
> To: django-users@googlegroups.com
> Date: Wednesday, 24 December, 2008, 7:26 PM
> Maybe this helps:
>
> http://www.b-list.org/weblog/2008/de
I think you've got a small typo in the code there, that might be
confusing to the OP--shouldn't the get_model() call have quotes around
"tag"? Like so:
model_class = get_model("test", "tag")
-Jeff
On Dec 23, 5:03 pm, bruno desthuilliers
wrote:
> On 23 déc, 20:23, "dick...@gmail.com" wrote:
>
i used this code to send more than one data to url:
http://local/www/app/data/id=1&name=django&phone=23232
but is this the right pattern a url should look like? If not can
anyone tell how can we send them?
--~--~-~--~~~---~--~~
You received th
Maybe this helps:
http://www.b-list.org/weblog/2008/dec/24/admin/
Tirta K. Untario wrote:
> This is a continuation from my last question.
>
> created_by = models.ForeignKey(User)
>
> I want to automatically use current logged in user as value. Can I put the
> code inside def save(self)
Finally I've solved it with smart_str function.
Matias Surdi wrote:
> Hi, I'm trying to save on a FileField some generated data (a text file
> obtained from a template):
>
> The relevant code is:
>
> out = Template(open("/path/to/template").read())
> context = Conte
Turns out it was having a router set-up incorrectly on the system
which was making the retrieval of the images unpleasant.
On Dec 23, 12:05 pm, bmclaughlin wrote:
> Hello,
> I am having slowness issues with my local set-up.
>
> My system was 10.4.x when django was set up and everything was fine.
This is a continuation from my last question.
created_by = models.ForeignKey(User)
I want to automatically use current logged in user as value. Can I put the code
inside def save(self) for this model? I can't find anything about getting
current user value from model.
Thanks in advance.
-
Understood, thanks Paul. I missed this section from documentation :)
--Tirta
-Original Message-
From: Paul van der Linden
Date: Wed, 24 Dec 2008 11:09:25
To:
Subject: Re: Model with 2 foreignkey to User
Hi,
just do as the error is telling you.
created_by = models.ForeignKey(U
Hi,
just do as the error is telling you.
created_by = models.ForeignKey(User, related_name='createdBy')
assigned_to = models.ForeignKey(User, related_name='assignedBy')
or something like that. That works.
Tirta K. Untario wrote:
> Hi all,
>
> I'm developing a simple todo list. I use Dj
On 24 déc, 10:37, "Ramdas S" wrote:
> Stephane,
>
> IMHO it will be better you use dpaste.com for such trivial examples where
> you require feedback. Djangosnippets shold be reserved for coding snippets
> that goes a bit beyond a model
>
My aim isn't to do private sample, I would like publish p
On Wednesday 24 Dec 2008 3:02:10 pm klein.steph...@gmail.com wrote:
> I've write a address model snippet at :
>
> http://www.djangosnippets.org/snippets/1177/
>
> I would like to know if you see some missing fields or mistake/
> misnamed fields ?
why are you putting this in djangosnippets??? Djan
Hi all,
I'm developing a simple todo list. I use Django Auth for handling
authentication. This is my models.py
from django.contrib.auth.models import User
class Item(models.Model):
project = models.ForeignKey(Project)
category= models.ForeignKey(Category)
title = model
Stephane,
IMHO it will be better you use dpaste.com for such trivial examples where
you require feedback. Djangosnippets shold be reserved for coding snippets
that goes a bit beyond a model
Ramdas
On Wed, Dec 24, 2008 at 3:02 PM, klein.steph...@gmail.com <
klein.steph...@gmail.com> wrote:
>
> H
Hi,
I've write a address model snippet at :
http://www.djangosnippets.org/snippets/1177/
I would like to know if you see some missing fields or mistake/
misnamed fields ?
Note : I'm french and I haven't international address system
background.
Thanks for your feedback.
Regards,
Stephane
--~-
Look at the timesince filter in django's source for an example, as it
does almost exactly what you're looking for.
On Dec 23, 8:53 am, Alfonso wrote:
> Hi,
>
> Trying to implement a very simple template tag that will output a
> company's age. So idea being if company was established in 1860 the
33 matches
Mail list logo