Solved.
I used Django's traces to discover that the object wasn't being passed
to the view on POST. Inserting some exceptions in different places in
the source, I found that it was at the point the form was saved that
the model reference was lost. Looking at the form I realized I wasn't
Daniel, if I don't do that, I get the unicode error in the list of
dashboards in the admin section.
On Fri, Jul 30, 2010 at 04:29, Daniel Roseman wrote:
> On Jul 29, 11:27 pm, Eric wrote:
> > I am getting this error in the Django Administration
I am using the generic view
django.views.generic.create_update.update_object to edit a model. The
form is displayed, the model gets updated, but on redirect, I get an
ImproperlyConfigured exception. Django tells me I need to define a
get_absolute_url method, but I already did, it just doesn't
fwiw, the user error in question was that a developer had added a call
to threading outside of any function definition or protected area. as
such the manage.py process finished, but the thread was left hanging.
On Jul 21, 6:16 pm, "psgou...@gmail.com" wrote:
> I've seen a
El 30/07/10 15:41, Ramesh escribió:
> I want to use Flexigrid for my project. I have used it before on
> TurboGears and it's really nice.
>
> Can somebody please help me how can I use flexigrid for my project?
> tutorials link to start for using Flexigrid on django?
>
http://is.gd/dTrPN
--
I understand the need for web pages to denote the 5 HTML special
characters >, &, <, ', and " with alternate representations like
.
(These 5 are the *only* special characters in HTML right?)
What I don't understand is why an HTML page encoded with UTF-8 would
use this
Hi,
I want to use Flexigrid for my project. I have used it before on
TurboGears and it's really nice.
Can somebody please help me how can I use flexigrid for my project?
tutorials link to start for using Flexigrid on django?
Thanks a lot in advance,
RB
--
You received this message because you
I have a model, which has a related model, which then has a related
m2m field (See defs below).
I want to add a method to the m2m model (ie: "Button") which, when
called in a template, will get me the original record that called the
relation. Is this possible? See method attempt below in the
Hi, Thanks for your previous reply. I'm still having problems... now
I'm getting the following error:
NameError: global name 'Session' is not defined
I check up the documentation, I understand that
'django.contrib.sessions.backends.db' makes the Session model
available in the DB router
Thanks Jason! That fixed the issue.
On Fri, Jul 30, 2010 at 10:23 AM, Jason wrote:
> Actually - make that change to the rest of the field options too. The
> word wrap threw me off there at the end.
>
> On Jul 30, 8:16 am, Jason wrote:
> > Looks like
On Jul 30, 4:49 pm, rupert wrote:
> Here's the view template:
>
> def respondant(request):
>
> user = request.user
>
> if set(RESPONDANT_FIELDS).issubset(set([key for key,value in
> request.POST.items()])):
> form =
Here's the view template:
def respondant(request):
user = request.user
if set(RESPONDANT_FIELDS).issubset(set([key for key,value in
request.POST.items()])):
form = RespondantForm(request.POST)
if form.is_valid():
On Jul 30, 4:42 pm, rupert wrote:
> I'm trying to use this line of code in form validation, and it is not
> working:
>
> {{ form.field_name.errors }}
>
> The following lines do output:
> {{ form.filed_name}}
> {{ form.field_name.help_text }}
>
> Any thoughts? Could it be
I'm trying to use this line of code in form validation, and it is not
working:
{{ form.field_name.errors }}
The following lines do output:
{{ form.filed_name}}
{{ form.field_name.help_text }}
Any thoughts? Could it be something in the view?
Here is the index.html page:
Actually - make that change to the rest of the field options too. The
word wrap threw me off there at the end.
On Jul 30, 8:16 am, Jason wrote:
> Looks like you are generating the fields in two different cases.
> Here's the second one:
>
>
On Jul 30, 3:28 am, Phlip wrote:
> > What's the value of `self.url`? One possibility is that it doesn't end
> > with a slash
>
> Ends with a slash. I'm now checking the response goodies, like
> response.status, to see if any other redirections happen!
Yup - a redirect. My
Looks like you are generating the fields in two different cases.
Here's the second one:
self.fields[config.ConfigurationName] =
forms.ChoiceField(
choices=choicelist,
required=False)
Change that to:
You don't need order_by to get distinct values per se, but in this
case you need to put it in to override whatever default ordering you
have on your model (since any order_by fields will be included in the
query and thwart your distinct()).
On Jul 30, 3:52 am, tuxcanfly
You could look here: http://djangopeople.net/us/ny/
Or try posting here: http://djangogigs.com/
or here: http://djangozen.com/jobs/
Hope that helps,
Alex
On Jul 29, 11:27 am, Ken wrote:
> Looking for a django developer in the NYC area!
> I would appreciate any help, if
Based on the urls.py file you are showing us, it seems like /start/
should be a valid url.
Are you running the dev server with automatic reloading? Sometimes you
need to force a reload on it to see changes. (I normally notice that
in the admin, but it could come up anywhere stuff gets cached in
A couple of possible optimizations:
First, because cos is single valued over the range of possible angles
(as measured
from the center of the earth, 0 <= d <= PI) distance is monotonic with
cos distance.
So you can pre-calculate the cos of the distance, and compare the
innder expression
to that:
On 30/07/2010 12:06, Jirka Vejrazka wrote:
>> I still have 2 approaches i can take.
>
> I still believe that there is a 3rd option there - to bypass the
> view / auth / login machinery completely :)
>
>
> If your primary goal is to cache the statistics and the statistics
> does not depend
hi group. I've got filebrowser working great with grappelli. It
uploads images and does the sizes automatically. I have a question
though. How do you choose the size you want to to use from the
filebrowser popup window when you want to insert an image? I don't
see any way to do it. Does
On Thu, Jul 29, 2010 at 1:22 PM, kostia wrote:
> Thanks, I already know about webfraction. Great site.
>
> If anyone can provide cheaper solution, hosted in Europe, please write
> me.
>
> --
http://lmgtfy.com/?q=django+hosting+europe=1
--
You received this message
I need to put a manytomany that points to a list of languages.
I need to create another language model or I can use a django languages one?
--
Alessandro Ronchi
http://www.soasi.com
Hobby & Giochi
http://hobbygiochi.com
http://www.facebook.com/hobbygiochi
--
You received this message because
Hi Derek,
Thanks for your help -- I had tried both of those but couldn't get them
to work with generic views. In the end I just abandoned the generic
view and used the __init__() approach and things worked.
-- Casey
On 07/28/2010 09:35 AM, derek wrote:
On Jul 26, 6:52 pm, "Casey S.
Hi!
When I'm using user as ForeignField in some of my models I get a
box with the username, can I override this with the mail instead the
username?
I've tested making a Proxy class, but I think that the proxy classes isn't
for this. I heard about MonkeyPatch but I don't know how to use it, or
I actually just set this up last weekend. I used this link to
understand how to do it
http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields/
I also found a plugin that takes most of the work off of you from
developing the feature.
On Jul 30, 10:33 am, Samuel Baldwin
wrote:
> Try clearing any server or browser caches first.
>
> --
> Samuel Baldwin - logik.li
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
# model class
class Category(models.Model):
CATEGORY_SEPARATOR = "."
name = models.CharField(_('name'), max_length=255)
idname = models.CharField(_('idname'), max_length=255,
db_index=True, unique=True,)
prio = models.IntegerField(_('prio'), default=0)
description =
On 29 июл, 12:08, Roald de Vries wrote:
> First: list is a very unlucky name for a parameter, since it's the
> type of []
>
> Second: list comprehension rules!
>
> def groupListByRow(list):
> return [lst[start:start+5] for start in range(0, len(lst), 5)]
>
>
Here is my form class
class StationInfo( forms.Form):
def __init__( self, *args, **kwargs):
super( StationInfo, self).__init__( *args, **kwargs)
request = args[1]
selecttuple = "choice0", "--Select One--"
userid = threadlocals.get_current_user()
user
I cover some of the new changes in Django 1.2 in this article:
http://www.tiemonster.info/a/24005/
Most of this information comes straight from the changelist. Others
were things that the core developers must have assumed were common
sense, but that I didn't think about when upgrading. If you run
Try clearing any server or browser caches first.
--
Samuel Baldwin - logik.li
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
> What's the value of `self.url`? One possibility is that it doesn't end
> with a slash
Ends with a slash. I'm now checking the response goodies, like
response.status, to see if any other redirections happen!
--
You received this message because you are subscribed to the Google Groups
"Django
On Jul 29, 11:38 pm, Spoksss wrote:
> Hi,
>
> I try to use raw sql in admin site, it is possible somehow?
>
> I use postresql and have some problem with ordering.
>
> I have in database something like:
> Category(id=1, name='first', parent_category=None,
>
> I still have 2 approaches i can take.
I still believe that there is a 3rd option there - to bypass the
view / auth / login machinery completely :)
If your primary goal is to cache the statistics and the statistics
does not depend on the user that is logged in (you did pass a user
with
On 29/07/2010 18:48, David De La Harpe Golden wrote:
> On 29/07/10 16:58, Benedict Verheyen wrote:
>
>> So calling a thread once from within a view is not safe ?
>
> Depends on what your expectations are...
>
> I haven't managed to dig up the paragraph discussing the issue that I
> recall
On 29/07/2010 21:10, Jirka Vejrazka wrote:
>> That's why i asked on what Django uses as a key to set and entry in the
>> cache.
>> If i generate the page and put it on the cache and then rely on Django to
>> get it,
>> the key i use needs to be the same as Django uses otherwise the page isn't
On Fri, Jul 30, 2010 at 11:14:42AM +0200, Alexandre González wrote:
> If I add:
>
> import settings
> LANGUAGES=settings.LANGUAGES
>
> and return it in the render_to_response it works perfectly, but can I
> automatice this in all views?
Sure, it works for me without passing LANGUAGES
If I add:
import settings
LANGUAGES=settings.LANGUAGES
and return it in the render_to_response it works perfectly, but can I
automatice this in all views?
On Fri, Jul 30, 2010 at 10:55, Baurzhan Ismagulov wrote:
> On Thu, Jul 29, 2010 at 11:52:31PM +0200, Alexandre González
On Thu, Jul 29, 2010 at 11:52:31PM +0200, Alexandre González wrote:
> 42 {% for lang in LANGUAGES %}
...
> It works perfectly in some webs, but in others the var LANGUAGES isn't
> provide automatically, do i need to send it in the views?
I don't know whether it's relevant, but do you
On Jul 30, 1:18 am, Phlip wrote:
> Django aficionados:
>
> Here's my test code:
>
> from django.test.client import Client
> self.client = Client()
> from django.core.files.base import ContentFile
> file_content =
On Jul 29, 11:27 pm, Eric wrote:
> I am getting this error in the Django Administration section when I
> add an entry for a Dashboard object.
>
> When I return to the item in the Admin section, the record has been
> added and it displays correctly in the list of Dashboard
I use .extra(where=[where])
and something like this (measures km, not miles):
( 6378.137 * acos( cos( radians(long) ) * cos( radians( latitude ) ) * cos(
radians( longitude ) - radians(lat) ) + sin( radians(long) ) * sin( radians(
latitude ) ) ) ) < 10
latitude and logitude are db-fields,
Thanks, that works!
But I don't understand why I should order_by to get distinct values.
On Jul 29, 3:59 pm, Subhranath Chunder wrote:
> If you don't want to uniquify yourself, then why not simply do:
> User.objects.values('username').order_by('username').distinct()
>
>
On Friday, July 30, 2010 10:55:13 am barun wrote:
> I've restarted the server, browser. Do I need to do anything else?
browser cache?
--
Regards
Kenneth Gonsalves
Senior Associate
NRC-FOSS at AU-KBC
--
You received this message because you are subscribed to the Google Groups
"Django users"
47 matches
Mail list logo