Hi everyone,
I'm using Django 1.0 and I'm attempting to add comments to a blog,
following along in the "Practical Django Projects" book.
The error is:
Reverse for '' with arguments '()'
and keyword arguments '{}' not found.
when {% comment_form_target %} is present in the template.
'django.con
Hi everyone,
I'm using Django 1.0 and I'm attempting to add comments to a blog,
following along in the "Practical Django Projects" book.
The error is:
Reverse for '' with arguments '()'
and keyword arguments '{}' not found.
when {% comment_form_target %} is present in the template.
'django.con
svn because of .pyc files.
After deleting the folder, comments are working correctly again.
Hope this helps someone out!
Kind regards,
Brandon
On Oct 22, 6:10 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On Wed, Oct 22, 2008 at 12:30 PM, Brandon Taylor
>
> <[
Hi Dmitry,
After some digging, I found that folder as well. Now everything's
working correctly again.
Cпасибо,
Brandon
On Oct 22, 7:08 am, Dmitry Dzhus <[EMAIL PROTECTED]> wrote:
> Brandon Taylor wrote:
> > I see there is an closed ticket:http://code.djangoproject.com/tic
Hi everyone,
I'm using 1.0 and have added contrib.comments to my project which has
a blog. I can preview a comment just fine, but I would like to provide
a way for the user to get back to the original blog entry once they've
posted their comment.
Out of the box, comments get redirected after bei
Found the solution.
I can pass in: request.GET, which contains a QueryDict object
containing the 'c' variable for the comment.
Hope this helps someone!
Brandon
On Oct 23, 8:50 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm using 1.0 and hav
Hi everyone,
I'm using Django 1.0, and attempting to do some comment moderation
with Akismet. When I try to wire up a pre_save signal, I'm getting an
error saying 'instance' is not defined. Here is my code:
def moderate_comment(sender, **kwargs):
if not instance.id: # <-- instance is not de
Hi everyone,
I'm needing to do some internationalization, but can't run
makemessages because I don't have xgettext. I'm running Mac OS X 10.5,
and can't seem to find an installer anywhere for this. I have found
gettext, but not xgettext.
Any help appreciated!
Brandon
--~--~-~--~~
I was not able to successfully compile the latest version of the GNU
gettext tools (0.17) on OS X 10.5, but I was able to grab version
0.14.5-3 using Fink and now I can successfully run django-admin.py
makemessages.
Hope this helps someone!
On Nov 5, 11:43 pm, Brandon Taylor <[EMAIL PROTEC
Hi everyone,
I'm tasked with translating a mostly database-driven site into
Spanish. I'm familiar with how to use Django's internationalization on
static strings in templates, but not with text coming from a database,
so I'm looking for some best practices advice...
Should I:
1. Make a separate
Hi Everyone,
I'm having a hard time getting django-multilingual to work the way I
expect.
#settings.py
LANGUAGES = (
('en', 'English'),
('es', 'Spanish'),
)
TEMPLATE_CONTEXT_PROCESSORS = (
...
'multilingual.context_processors.multilingual',
)
MIDDLEWARE_CLASSES = (
..
%}
On Nov 9, 12:01 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote:
> Please show complete template code
>
> On Sun, Nov 9, 2008 at 20:55, Brandon
Hi everyone,
I'm leveraging auth and have a login form that uses contrib.auth.forms
AuthenticationForm.
When displaying non-field-specific errors, I get interesting results:
#template.html
# if form.errors
__all__
Please enter a correct username and password. Note that both
fields are case
s` just holds all form errors as a dict.
>
> On Mon, Nov 10, 2008 at 00:52, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
>
>
> > Here you go:
>
> > > method="post">
Hi everyone,
So I have a question/problem with a named URL pattern...
#urls.py
url(r'^resources/conversions/(?P[-\w]+)/$',
'my_site.views.conversions', name='conversions'),
This is a mostly static site, but I would like to be able to pass the
"conversion_template" parameter to do a dynamic incl
<[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-11-12 at 22:39 -0500, Karen Tracey wrote:
> > On Wed, Nov 12, 2008 at 10:27 PM, Brandon Taylor
> > <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
>
> > So I have a question/problem with a na
gt; On Thu, Nov 13, 2008 at 02:56:26PM +1100, Malcolm Tredinnick wrote:
> > On Wed, 2008-11-12 at 22:39 -0500, Karen Tracey wrote:
> > > On Wed, Nov 12, 2008 at 10:27 PM, Brandon Taylor
> > > <[EMAIL PROTECTED]> wrote:
>
> > > Hi everyone,
>
> >
Hi everyone,
Gerard's suggestion worked. Moving the pattern into a separate
definition fixed it. But, I couldn't explain why :)
Many thanks!
Brandon
On Nov 13, 6:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-11-14 at 01:20 +0300, Alex Koshelev wrote:
> > Hmm... Why in temp
Hi everyone,
I'm doing an internationalization project and have a form with fields
that need to be localized. I would like to have one form, pass in the
language code and exclude the appropriate fields.
How would I go about passing in the variable to the form? I know I
have to pick it up in the
ECTED]>
wrote:
> On Thu, 2008-11-13 at 18:06 -0800, Brandon Taylor wrote:
> > Hi everyone,
>
> > I'm doing an internationalization project and have a form with fields
> > that need to be localized. I would like to have one form, pass in the
> > language code a
Thanks Malcom, I'll give that a shot.
Cheers,
Brandon
On Nov 13, 10:47 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-11-13 at 20:36 -0800, Brandon Taylor wrote:
> > Hi Malcom,
>
> > This is what I have so far, but is not working
problem I have now is accessing that parameter in the Meta
subclass:
class Meta:
self.language_code#returns: self is not defined.
Do you know how I can access that self.language_code parameter in the
Meta subclass?
TIA,
Brandon
On Nov 13, 11:11 pm, Brandon Taylor <[EMAIL PROTEC
__.
Thanks for your help, I really appreciate it.
b
On Nov 14, 7:34 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Fri, 2008-11-14 at 10:44 -0800, Brandon Taylor wrote:
> > Hi Malcom,
>
> > So, I manged to pass in the language_code parameter successfully:
>
Hi everyone,
I'm using 1.0.2 final. I have a form for a model and am passing in an
instance of my model object to the form, but the form is not being
populated.
#views.py example
def my_view(request, id):
if request.method == 'POST':
pass
else:
model_instance = my_model.
Hi David,
Stupid error on my part. Problem has been resolved.
On Dec 5, 1:34 am, "David Zhou" <[EMAIL PROTECTED]> wrote:
> On Fri, Dec 5, 2008 at 1:44 AM, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > But, the form fields aren't being populated. What am
Hi everyone,
I want to allow users to change their username in a non-admin form. I
have a login form already working, and I can successfully show user
information. I have granted the change user permission to the user
that is logged in.
When I pull in the UserChangeForm from contrib.auth.forms a
Hi Karen,
I did finally get this figured out, but decided not to implement the
functionality after all :)
Thanks,
Brandon
On Dec 5, 7:47 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Dec 5, 2008 at 3:18 AM, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
>
Hi everyone,
My client needs some batch processing capabilities that I haven't
coded in Python/Django yet, and I need advice on the best way to read
images contained in a .zip file. I'm pretty comfortable extending
Django admin, just not working with files this way.
I will need to:
1. Read and
I've been looking at the methods from those libs. Glad to know I'm on
the right track.
Thanks,
b
On Dec 19, 7:27 pm, Masklinn wrote:
> On 19 déc. 08, at 23:50, Brandon Taylor
> wrote:
>
> > Hi everyone,
>
> > My client needs some batch processing capabi
Hi,
You can do validation on images by using a custom form for your admin
Model. This example validates that a thumbnail image is a specific
dimension, file type and file size,
from django.core.files.images import get_image_dimensions
class MyModelAdminForm(forms.ModelForm):
model = MyModel
Hi everyone,
I'm unpacking files in a .zip and need to save each file into a
particular directory, but I can't seem to find a way to set the
directory to save into. Here is part of my code where I'm opening
the .zip and iterating over the files:
thumb_zip_file = zipfile.ZipFile(obj.thumbnail_ima
solved:
os.chdir(path)
Hope that helps someone!
On Dec 20, 10:13 pm, Brandon Taylor wrote:
> Hi everyone,
>
> I'm unpacking files in a .zip and need to save each file into a
> particular directory, but I can't seem to find a way to set the
> directory to save into
Hi everyone,
I have a login form on every page and want to leverage the
AuthenticationForm from contrib.auth. So, I thought I would have a
middleware tier to process the request and check for a GET or POST and
create the appropriate form, either bound or un-bound. Here is my
middleware:
from dja
into pickling errors.
On Jan 13, 11:43 am, Brandon Taylor wrote:
> Hi everyone,
>
> I have a login form on every page and want to leverage the
> AuthenticationForm from contrib.auth. So, I thought I would have a
> middleware tier to process the request and check for a GET or POST and
>
Hi everyone,
I'm following this tutorial for specifying a dynamic "upload_to"
attribute:
http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic-path-with-django/
But, it doesn't seem to want to work with Django admin. Does anyone
have any experience tweeking this custom class to
Hi everyone,
I'm trying to enforce a customer permission on Add/Update. In my
model, I have defined the permission:
permissions = (
('can_approve_stories','Can Approve Stories'),
)
in my model.ModelAdmin I have:
def change_view(self, request, obj_id):
i
g where I should try to disable the
field? In the model, or in the change_form? I'm not very experienced
in customizing the admin, but am very eager to learn.
Kind regards,
Brandon
On Jul 21, 5:50 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Mon, 2008-07-21 at 15:46 -0700,
Hi everyone,
I have a column, 'position', which is a PositiveIntegerField, to allow
my end-user to order records with. I would like to pre-populate the
field when creating a new record, with the count of the model objects
+ 1.
The models documentation says 'default' can be a value or a callable,
Hi Daniel,
Thanks for the reply. I'll just go with overriding the save.
Cheers,
Brandon
On Aug 21, 11:29 am, Daniel Roseman <[EMAIL PROTECTED]>
wrote:
> On Aug 21, 4:42 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone,
>
> > I
Hello everyone,
Is anyone else missing USStateField? None of my models that use this
field are validating. I've tried trunk and the 1.0 official release I
get the same error on both versions.
If you look in django > db > models > fields > __init__.py
You will not find USStateField, although it'
My bad. I see it's not in the latest version of the documentation :
http://docs.djangoproject.com/en/dev/ref/models/fields/#model-field-types
I guess we can just make a list of static choices using the states
list in localflavor.us
On Sep 4, 8:23 pm, Brandon Taylor <[EMAIL PROTECTED
Thanks everyone. I guess I just overlooked the localflavor
documentation.
Kind regards,
Brandon
On Sep 4, 8:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-09-04 at 18:23 -0700, Brandon Taylor wrote:
> > Hello everyone,
>
> > Is anyone else missing
ep 4, 8:34 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Thanks everyone. I guess I just overlooked the localflavor
> documentation.
>
> Kind regards,
> Brandon
>
> On Sep 4, 8:30 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>
> > On Thu, 2008-
Thanks Malcom, I apperciate it!
On Sep 4, 8:49 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Thu, 2008-09-04 at 18:46 -0700, Brandon Taylor wrote:
> > So, next stupid question :)
>
> > These fields all derive from forms, not models.
>
&g
Hi everyone,
I'm using 1.0 Final, MySQL 5, and I'm getting this lovely error for
the first time. Here is my model:
from django.db import models
from django.contrib import admin
from crider_law.sidebar_modules.models import SidebarModule
class Page(models.Model):
name = models.CharField(max_
Well, after validating, syncing, re-validating and re-syncing, I ended
up just dropping the entire database and now it works fine.
On Sep 14, 10:10 am, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm using 1.0 Final, MySQL 5, and I'm getting this lov
Hello everyone,
I'm using named paths as such:
url(r'^[-\w]+/(?P[-\w]+)/$', 'render_page',
name='nested_page_link'),
url(r'^(?P[-\w]+)/$', 'render_page', name='page_link'),
The only difference between these two urls is that some pages in this
site can be nested under another page. So, I would l
PROTECTED]> wrote:
> Brandon Taylor wrote:
> > Hello everyone,
>
> > I'm using named paths as such:
>
> > url(r'^[-\w]+/(?P[-\w]+)/$', 'render_page',
> > name='nested_page_link'),
> > url(r'^(?P[-\w]+)/$', 'render_
Hi everyone,
I have a search form where I have multi-selects that contain foreign
key values. When I post to my results page, I get a QueryDict object
and can get the data out of the post into lists.
My question is, what's the best way to go about filtering objects
where the foreign keys are arr
Hi everyone,
I have a search results page and need to be able to go to a detail
page for any result. I would like to provide the user a way to return
to their search results and not clutter the querystring with search
parameters.
What's the best approach for this using Django? Should I stuff the
Hi everyone,
I have a view to do some re-ordering of a list via ajax:
@staff_member_required
def reorder(request):
collections = Collection.objects.all()
if request.method == 'POST':
pk_ids = request.POST['pk_ids'].split(',')
length = len(pk_ids)
for collection
Thanks guys, I appreciate it.
On Oct 2, 3:29 am, bruno desthuilliers <[EMAIL PROTECTED]>
wrote:
> On 2 oct, 07:33, Travis Parker <[EMAIL PROTECTED]> wrote:
>
> > Instead of calling render_to_response on an empty template file you
> > could simply return an empty django.http.HttpResponse and avoid
Hi everyone,
On a recent project, I was tasked with adding a workflow around a
model, which required some customization in the admin. I found that
when I did and override of a view, I no longer had access to the "cl",
or ChangeList object containing all of the objects for the view.
Filters and o
WebFaction definitely gets my vote.
Setting up a Django app with their control panel couldn't be easier,
and their customer service is excellent.
Brandon Taylor
bTaylor Design
www.btaylordesign.com
On Oct 6, 12:30 pm, Jeff <[EMAIL PROTECTED]> wrote:
> I am about to begin a new
Hi everyone,
I'm following along with the Blog example in the Practical Django
Projects book. Here are my URLs:
entry_info_dict = {
'queryset' : Entry.live.all(),
'date_field' : 'pub_date'
}
urlpatterns = patterns('django.views.generic.date_based',
url(r'^blog/$', 'archive_index', e
Thanks Karen!
On Oct 7, 4:43 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Tue, Oct 7, 2008 at 2:43 PM, Brandon Taylor <[EMAIL PROTECTED]>wrote:
>
>
>
>
>
> > Hi everyone,
>
> > On a recent project, I was tasked with adding a workflow a
Hi everyone,
Here is my code:
entry_info_dict = {
'queryset' : Entry.live.all(),
'date_field' : 'pub_date',
'allow_future' : True
}
urlpatterns = patterns('django.views.generic.date_based',
url(r'^blog/(?P)\d{4}/$', 'archive_year', entry_info_dict,
name='archive_year'),
)
So, w
nce it hits this function, year = u''
I'm using 1.0 Final, MySQL 5. Help!
On Oct 7, 6:01 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> Here is my code:
>
> entry_info_dict = {
> 'queryset' : Entry.live.all(),
>
Oh for $hit's sake - how can I be so blind?!
Thanks Malcom,
Brandon
On Oct 7, 7:48 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-10-07 at 16:01 -0700, Brandon Taylor wrote:
> > Hi everyone,
>
> > Here is my code:
>
> > entry_info_dict =
Hi everyone,
I'm using the generic date-based views.
Here's a snippet of my "Entry" model for a blog:
#models.py
pub_date = models.DateTimeField(auto_now_add=True)
@models.permalink
def get_month_entries(self):
return ('archive_month', (), {
'year' : self.pub_date.s
Using the following template tag resolved the issue:
{% url archive_month obj.year obj|date:"b" %}
On Oct 7, 9:04 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm using the generic date-based views.
>
> Here's a snippet of my
Hi,
Unfortunately the source code isn't available from the Apress site
yet, and there's no mention of when it might be available either. I've
been through all of the samples in that book, and they work, with a
few tweeks for 1.0.
You can download Coltrane from DjangoPlugables.com, but there are
Hi everyone,
I'm using 1.0 final. I have the following models:
Page
SidebarModule
PageSidebarModule (the intermediary table)
When I have SidebarModule defined as a simple ManyToMany in Page, the
admin is quite happy to display the list of choices.
When I define:
class Page(models.Model):
It truly is the best web
framework I've used in 12 years of development.
Kind regards,
Brandon
On Oct 15, 11:25 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Wed, Oct 15, 2008 at 11:21 PM, Brandon Taylor
>
> <[EMAIL PROTECTED]> wrote:
> > The admin n
t;[EMAIL PROTECTED]> wrote:
> On Wed, 2008-10-15 at 21:21 -0700, Brandon Taylor wrote:
> > Hi everyone,
>
> Hi Brandon
>
> > I'm using 1.0 final. I have the following models:
>
> > Page
> > SidebarModule
> > PageSidebarModule (the intermediary table)
Hi everyone,
I need to do some table sorting and paging. To reduce trips to the DB,
I'm storing my initial queryset in a session using the file system
backend for local development.
I was thinking I might be able to use the dictsort filter and just
pass in the column as a variable to do the colu
...and do vehicles.reverse() to toggle ascending or descending.
Thanks for getting me on the right track, I appreciate it!
Brandon
On Jan 22, 2:19 am, Malcolm Tredinnick
wrote:
> On Wed, 2009-01-21 at 21:40 -0800, Brandon Taylor wrote:
> > Hi everyone,
>
> > I need to do some
Hello,
You can use the sorted() function in Python to order any iterable. It
asks for a key to order by, which can be a lambda, or you could use
the operator module to get attributes of the object(s) in your
QuerySet object to provide the key.
My $0.02,
Brandon
On Jan 29, 12:38 pm, lollerikken
Hi everyone,
I need to return a queryset using the "in" statement. My IDs are in an
array of int values.
vehicle_ids = [1, 2, 3]
If I do: vehicles = VehiclePhoto.objects.filter(vehicle__id__in=
[vehicle_ids])
I get a type error: sequence item 0, expected string, int found. I've
tried just abou
FWIW, I have been able to successfully integrate Django Admin Uploads
http://code.google.com/p/django-admin-uploads/ with jQuery. I'm not
certain as to how difficult this would be to port to YUI. There are a
couple of JS issues that I've had to fix with this, but otherwise, it
works very well.
Re
Hi everyone,
I know how to modify a response header value, but not a request header
value. I need to integrate with an external system that is injecting a
value in the request header that I need to check for.
Is it possible to mock this behavior in Django? I'm not very familiar
with how these va
Hi everyone,
I'm having a hell of a time getting connected to Oracle...
We're running Intel MacBooks, OS X 10.5.6, Python 2.6.1, Django Trunk,
Oracle InstantClient 10_2.
We have tried using cx_Oracle-5.0 and 4.4.1. cx_Oracle seems to
compile and install successfully, but, when we attempt to run
Hi Malcom,
Thanks for the response. I thought the same about the request headers
being read only, and hadn't heard of something modifying the request
header, only the response.
b
On Feb 18, 5:02 pm, Malcolm Tredinnick
wrote:
> On Wed, 2009-02-18 at 07:16 -0800, Brandon Taylor wrote
Hi everyone,
I'm using Oracle instantclient_10_2 (Intel), cx_Oracle-5.0.1, OS X
10.5.6 (Intel), Python 2.6.1 and Django trunk.
My built-in server will start up correct, but, when I attempt to get
objects for a model, I receive the following error:
InterfaceError: Unable to acquire Oracle enviro
ng "manage.py shell" and
> looking at what's in os.environ--if you don't see ORACLE_HOME set to
> the correct location there, try fixing that first.
>
> Matt
>
> On Fri, Feb 20, 2009 at 9:41 AM, Brandon Taylor
> wrote:
>
> > Hi everyone,
>
> &
_NAME
setting.
If I set my DATABASE_NAME to my SID, and try to retrieve objects, I
get:
DatabaseError: ORA-00942: table or view does not exist
? ? ?
b
On Feb 20, 1:21 pm, Brandon Taylor wrote:
> Hi Matt,
>
> Ok, I modified manage.py to add two environ variables:
>
> import os
>
se credentials. If the tables live in a
> different schema, you may need to create private synonyms to them in
> the Django user's schema--we nearly always end up with that structure
> in our Django/Oracle apps.
>
> Hope this helps,
>
> Matt
>
> On Fri, Feb 20, 200
;test.html', {'categories' ;
categories})
I get: DatabaseError: ORA-00942: table or view does not exist
? ? ?
On Feb 20, 2:53 pm, Brandon Taylor wrote:
> Hi Matt,
>
> Thanks for the reply. Well, I can get connected via sqlplus and I can:
> desc activities... not sure what'
Ok, now I am absolutely confounded...
I ran: manage.py inspectdb > models.py
Then I tried to get objects from the models THAT IT CREATED FOR ME -
same friggin' error!
What in the world is up with this thing? I'm at a loss.
b
On Feb 20, 3:08 pm, Brandon Taylor wrote:
> Hi
ROM
"CATEGORIES") "_SUB" WHERE ROWNUM <= 21) WHERE "_RN" > 0'}, {'time':
'0.004', 'sql': u'SELECT "CATEGORIES"."ID", "CATEGORIES"."NAME",
"CATEGORIES"."CREATED_AT",
activity_code.categories;
> And repeat for the relevant tables, views, or sequences.
>
> This is particularly problematic for Oracle, which nearly always uses
> multiple schemas and specific permission grants in Real World (tm)
> schemas. We tried a couple quick, Oracle-specific fixes
:
categories})
On Feb 20, 3:34 pm, Ian Kelly wrote:
> On Feb 20, 2:25 pm, Brandon Taylor wrote:
>
> > however attempting to retrieve the Category objects from a view
> > results in:
> > DatabaseError: ORA-00942: table or view does not exist
>
> > Thoughts?
&
value in the connection: USER=root
When I start up my dev server, I usually override port 80 on my Mac,
so I can just run at : localhost/
Shouldn't the USER parameter be the DATABASE_USER from settings.py? or
am I smoking crack?
b
On Feb 20, 4:01 pm, Brandon Taylor wrote:
> Actually I
ld be nice if I could just use the built-in server though.
On Feb 20, 4:20 pm, Ian Kelly wrote:
> On Feb 20, 3:01 pm, Brandon Taylor wrote:
>
> > Actually I was referring to my action in views.py to get the Category
> > objects:
>
> > from activity_codes.models import *
come up with a solution.
Many thanks to everyone for their help!
b
On Feb 20, 4:37 pm, Ian Kelly wrote:
> On Feb 20, 3:26 pm, Brandon Taylor wrote:
>
> > Yes, I'm just using the built-in server for local development. I've
> > restarted it dozens of times, cleared m
Hi everyone,
Still fighting with Oracle :(
Quick recap...my setup is:
OS X 10.5.6 (Intel), cx_Oracle-5.0.1 (Intel), instantclient_10_2,
Django Trunk, Python 2.6.1
If I run Django in shell, I am able to connect to Oracle, retrieve
objects via the ORM, etc. However, when I executing a view acti
20 Feb 14:43, Brandon Taylor wrote:
>
>
>
> > No proxy server configured in FireFox 3. I'm stumped as well. Guess I
> > need to have the Oracle people in my office get in touch with their
> > support people. There is one other Django person here at the
> &
Hi everyone,
What's the trick to getting a ModelChoiceField to use the first object
in a QuerySet as the initial value to get rid of -?
If I do:
qs = Model.objects.all()
my_field = forms.ModelChoiceField(queryset=qs, initial=qs[0])
I still get -- as the first choice.
TIA,
Bran
Solved: ModelChoiceField(empty_label=None)
On Feb 23, 9:14 pm, Brandon Taylor wrote:
> Hi everyone,
>
> What's the trick to getting a ModelChoiceField to use the first object
> in a QuerySet as the initial value to get rid of -?
>
> If I do:
> qs = Mode
Hi Karen,
Yes, that is exactly what I'm seeing.
On Feb 23, 6:02 pm, Karen Tracey wrote:
> On Mon, Feb 23, 2009 at 10:15 AM, Brandon Taylor
> wrote:
>
>
>
>
>
> > Hi everyone,
>
> > Still fighting with Oracle :(
>
> > Quick recap...my setup is:
Hi everyone,
Still battling with Oracle, but found something interesting...
When connecting to Oracle with Django through a shell, everything
works as expected. However, when I use Aptana/PyDev to debug and I set
a breakpoint on my view action, I get an error:
InterfaceError: Unable to acquire
Matt Boersma wrote:
> On Tue, Feb 24, 2009 at 12:44 PM, Brandon Taylor
>
> wrote:
> > When connecting to Oracle with Django through a shell, everything
> > works as expected. However, when I use Aptana/PyDev to debug...
>
> It sounds likely that debugging environmen
Hi Karen,
5.0.1 just came out a few days ago. Upgrading solved the issue and now
I can get connected to Oracle. Woohoo.
b
On Feb 20, 11:44 am, Karen Tracey wrote:
> On Fri, Feb 20, 2009 at 10:52 AM, Brandon Taylor
> wrote:
>
>
>
>
>
> > Hi everyone,
>
> >
Hi everyone,
I've had pretty good success with TinyMCE/django-admin-uploads so far,
but FCKEditor is boasting Python integration. Sure would be nice to
get built-in file handling support for Images, Flash, etc without
having to integrate any other 3rd party apps.
Has anyone been able to integrat
Hi everyone,
Not sure what's up here, the same code works on another site.
Basically what I'm doing is adding an inline model form to the User
change form...
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.auth.admin i
Hi Alex,
Actually, the 'user_profile' app is the last one in my list. I can't
explain why it works on a previously developed site using Django trunk
and not this one.
Brandon
On Mar 3, 11:54 am, Alex Gaynor wrote:
> On Tue, Mar 3, 2009 at 12:41 PM, Brandon Taylor
> wr
Hi everyone,
I'm working on some code to scrub an images directory of anything not
currently stored in the database, and would like to de-couple some
things. I'm using signals, passing in an instance of a model that I
would like to be able to grab some data from, namely, the 'upload_to'
parameter
Wonderful! Thank you so much for the help.
Brandon
On Mar 6, 3:24 pm, Rajesh D wrote:
> > I'm working on some code to scrub an images directory of anything not
> > currently stored in the database, and would like to de-couple some
> > things. I'm using signals, passing in an instance of a model
Hi everyone,
Syntax trouble. My post_save signal is defined as:
def scrub_directory(sender, instance, **kwargs):
pass
When I attempt to pass a keyword arg to it:
models.signals.post_save.connect(scrub_directory, sender=TheModel,
{'my_kwarg' : 'some_value'})
I get a syntax error: keyword
7, 10:26 pm, Jacob Kaplan-Moss
wrote:
> On Sat, Mar 7, 2009 at 11:14 PM, Brandon Taylor
> wrote:
> > When I attempt to pass a keyword arg to it:
>
> > models.signals.post_save.connect(scrub_directory, sender=TheModel,
> > {'my_kwarg' : 'some_value'
1 - 100 of 298 matches
Mail list logo