Hi All, still trying to get my head around the multi db stuff in 1.2
release.
Here is my problem that I have hit upon.
I have a model in my default db...
class Set1(models.Model):
create_date = models.DateTimeField(auto_now_add='True')
last_update = models.DateTimeField(auto_now='True',
sync to db_2 - how would I go
about this?
Thanks,
Martin
On Mar 19, 9:11 am, Daniel Roseman wrote:
> On Mar 19, 8:44 am, mbdtsmh wrote:
>
>
>
> > Hi all - I'm trying out the multi database options in django 1.2 beta
> > on a new project. I can connect to
Hi all - I'm trying out the multi database options in django 1.2 beta
on a new project. I can connect to two databases which is great.
However, I'm not sure what to do in my models.py file???
I have a single class in models.py that points to a table on a
different database (existing table of data
Hi all - can someone put me out of my misery on this one please?
I have a piece of code that uses the request.GET keys in the url to
produce the following in my views.py
objects = Issue.objects.all()
objects = objects.filter
(designset__project__RA__RA=request.GET.__getitem__('RA')).distinct()
ob
.
MMMmmm...
On May 29, 12:50 pm, Rama Vadakattu wrote:
> i hope you are encountering the problem as request.GET.subseries is
> string and id is integer and they are not matching.
>
> On May 29, 3:52 pm, mbdtsmh wrote:
>
> > I have the problem below when I use a tup
I have the problem below when I use a tuple to try and match a request
item; i.e., it never matches. I can do the same thing with a list
rather than a tuple value and it works fine? I have tried to convert
the tuple to a string but no joy - is there something obvious I'm
missing???
Hi All - I'm having trouble going from using a mysql database to an
oracle database. The MySQL db settings work fine and I can validate &
syncdb my tables into the database. However, when I change my
settings.py to point to an oracle database then I get the following
error (I have cx_Oracle instal
27;: title,
'concept': concept,
'contributor': contributor,
})
Many thanks,
Martin
On Jul 14, 8:48 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote:
> Hi Martin,
>
> On Jul 14, 12:14 pm,mbdtsmh<[EMAIL
Hi everyone - wondering if someone could point me in the right
direction with this one?
I am trying to populate fields in a form with data from the database
(i.e., a change form rather than an add new form). It works fine for
populating Char/Date Fields but when I do the same for ForeignKey or
m2
How do I get a distinct list of values from a manytomany field
Using a foreign key it is straightforward:
RA_CHOICES = DesignSet.objects.values('project__RA').distinct()
project is a foreignkey field.
but trying the same on a m2m field raises an error:
Designer_CHOICES =
DesignSet.object
I'm also coming up against this problem; i.e., how to get a distinct
list of values from a manytomany field
Using a foreign key it is straightforward:
RA_CHOICES = designsets.values('project__RA').distinct()
project is a many2one field.
but trying the same on a m2m field raises an error:
Hello everyone,
I have a question for you all that has been discussed before but I
cannot figure out the best way to go about implementing.
I have the following model:
class DesignSet(models.Model):
priority=models.ForeignKey(Priority)
status=models.ForeignKey(Status, default=2)
Hi all,
I have a ForeignKey object (designset) as part of a model class and
can get the project value associated with foreignkey object using...
def project(self):
project = self.designset.project
return project
I can then use this created field in the list_display options f
Hi all,
I assume there a way of accessing associated values from a ForeignKey
object in the fieldset.html template that comes with the newforms-
admin branch? I cannot for the life of me figure it out - HELP!
example:
{% if fieldset.name %}{{ fieldset.name }}{% endif %}
{% if fieldset.desc
Hi all,
I'm using the newforms-admin branch and have come across this
annoyance.
When I am trying to add a custom form value to the form text; i.e.,
{{ original.exemplar_text }}
it gives me an Object expected error.
This causes certain javascript elements that are also on the page not
to disp
Figured this one out...
{{ bound_field.original.value_x }}
value_x being a field in your model class
easy when you know how.
On May 12, 3:05 pm, mbdtsmh <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> How would you go about extracting the value from a bound_field object?
>
Hi all,
How would you go about extracting the value from a bound_field object?
(within the admin change_form.html template)
At the moment I am using
{{ bound_field.original|get_value_x }}
{{ bound_field.original|get_value_y }}
this pulls back the values from the model as described in the def
_
Hi All,
Appologies if this is a stupid question but before I go any further
I'm new to Django!
I have modified the field_line.html template (from within the
change_form.html admin template) so it looks like this:
{% load admin_modify %}
{% load designset_extras %}
{% for bound_field in bound_fi
Hi all - In the standard admin page for the latest svn release I'm
having problems rendering html correctly in the table.
Some of my text fields contain html markup: link to google for example.
However, when I render these fields (using the change_list.html admin
template) i get <, > for some o
Hi all - being new to Django I've started to define my first template. The
issue that I am having is when I simply want to get a value from a form
object (rather than the whole string).
I can get around this by passing in extra values in the render_to_response
command in the views.py file i.e.,
20 matches
Mail list logo