How can one accomplish class-based default value in following scheme? I mean, I would like to inherited classes set default value for "number" differently:
class OrderDocumentBase(PdfPrintable):
number = models.PositiveIntegerField(default=self.create_number())
@classmethod
def create_number(cls):
raise NotImplement...
Hi
I have a project which needs an Excel GUI (client's request) with a backend mysql db/table requiring almost 90 fields.
(almost 60 fields are duplications of 6 fields.)
After giving it some thought, I ended up creating a table with 11 fields: 10 searcheable fields, and one big field which can contain up to 60 fields "together", separ...
Hi,
I am trying to group my data based on age. I use the following database select:
select * from (
select 0 range_start, 11 range_end, '0-10 days' date_description from dual union
select 11, 21, '11-20 days' from dual union
select 21, 31, '21-30 days' from dual union
select 31, 99999, '31+ days' from dual) date_helper
left outer jo...
I am using PictureScrollField in my BlackBerry application to create a carousel-like feature. I'm also adding indicators at the bottom (circles) which shows which image out of the 5 in the carousel is being shown.
I update my indicator when I recieve a touchEvent (i.e as I'm dragging the scroll field) by grabbing the selectedImageIndex(...
Hi, This is my first post here, and I'd like to describe what I want to do as specific as possible.
I'd like to make a model that is 'selectable.'
for example,
class SimpleModel(models.Model):
property = models.CharField(max_length=255)
value = GeneralField()
GeneralField can be "CharField", "URLField", "TextField" so that ...
Hello:
I have a "main" window with a table containing a series of form text fields with ids that increment (e.g., field_1, field_2 ... field_n). I need to populate the value of these fields from selections a user makes from a child window that has a list of about 1400 choices. This is done via an "Add" button with an onclick that passe...
Simple question from an absolute n00b.
I'm trying to create an edit content screen based on the code given in the Blog Tutorial on the Cake site.
Here's my edit function in the controller (it's named Contents):
function edit( $id = null ) {
$this->Content->id = $id;
Debugger::dump( $this->Content->id );
if( empty( $this->...
Maybe my question is little childish. A django model is typically defined like this:
class DummyModel(models.Model):
field1 = models.CharField()
field2 = models.CharField()
As per my understanding, field1 and field2 are defined on the class level instead of instance level. So different instances will share the same field value...
Hi,
I want to get only the rows with a unique value for a certain field (2 actually).
My table is like this:
id senderID receiverID ... ... ...
_________________________________________________
0 0 1 ... ... ...
1 2 1 ... ... ...
2 1 0 ...
It seams I should use tinyin(); but I dont know how to implement it?
The question is what is your recommendation if I need to have a boolean field in MySQL DB and modify it´s value with PHP.
Thanks in advance!
Trufa
...
I have created new fields for a CCK content type. They were showing up before just fine. Now nothing. The only thing I did differently was delete some fields before adding the new ones.
I can see the columns in the content type table. They are just not showing up in the Create Content form. Any help on this would be greatly appreciated.
...
Hello,
I'm having a strange issue when I put lazy true inside a hibernate xml.
In my class I have a property like this "Name" and a field like this "name".
When I retrive a single record against the database the I receive a classe like this:
Property: "john doe" ; field: "null".
Explaining, the property and fields are not equals.
How t...
Lets say I have a cck field called foo. It is a text field with php input. Say the php code in foo field results in the value of 1,256 when computed. I need cck field called bar to pick up/obtain/have the VALUE (1,256) of cck field foo.
Node XYZ
Foo:*some php code* ===>results in value of 1,256
Bar:1,256
If I just have cck fi...
Hi!
I want to do a 'select' in MySQL using the operator 'LIKE'.
But I do not want to use text as a comparison factor. I want to compare text between two fields in same table, like this:
SELECT field1,field2 FROM table WHERE field2 LIKE %field1% ;
Is it possible?
...
Does anyone know how to customize the shopping cart page for ubercart (Drupal 6.x)? I would like to add the SKU field in the 'desc' column under the product title and some other things.. like Shipping Time: 2 Weeks.
So the 'desc' column should look like this:
Product Title
SKU: Model1
Shipping Time: 2 Weeks
Much appreciated for any ...
I have an existing project with models (Users and Books). I would like to add a ManyToMany(M2M) field to the existing model Books, but the syncbb command does not do this.
Details: Books already has a FK field that maps to User, and I want to add a new M2M field (readers) that also maps to User. As you know, Django's syncdb only cares...
I have a django model with a field Reminder_End_Date = models.DateField().
I have to filter all records of the model which have reminder date greater than todays date.
However when I try to use the following statement, it does not work:
now=datetime.date.today()
reminderlist=Reminder.objects.filter(Reminder_End_Date>now )
Can anyone ...
I am using the Event Subscription Tool, which sits on top of the bissubscribe.exe tool to create some custom alerts. I need to query against some custom work item fields, but I'm not sure how to reference them in the code.
Here is how you reference a system field (this works):
CoreFields/StringFields/Field[ReferenceName='System.Assign...
I have a model, called Book, that has the fields title and filename (and other fields but they are unrelated). I'd like that the filename field was automatically created using the title, thus in my Book.rb:
class Book < ActiveRecord::Base
# ...
def title=(title)
self.filename = sanitize_filename(title)
self.title = title
...
Hi,
I'm using extjs in codeigniter(php framework)
I want to store Value field of combobox in data base
i gave displayField:'name', valueFiled:'id' for the combobox but when i used
$this->input->post(combofield name);
but its returning displayFiled;
How to get vlueField in post
...