http://pastebin.com/f40a3bde9
I found this little snippet on this group and am trying to get it to
work on my model, but no luck. I'm using the code pretty much as-is
except for two small changes, which are noted by a code comment. I can
create new instances of my model using this formset, bit I
I modified the above _cached_menu method to just create a new object
every time (shown below). It only seems to get the links right, a
ManyToMay field, after I save it _twice_? Hmmm...how I get the updated
many2many table?
def _cache_menu(self, menu, xhtml):
"""
Stores xhtml into
Hello,
I am trying to implement a cache system using the post_save signal.
The problem is the code below, a Thread subclass that ends up calling
run(), the cache database never runs. It's driving me crazy!!! Is
there something going on with the way Django cache's queries which is
what I expect? C
I use netbeans and there is a UML plugin that you can download and use
for free.
On Jul 10, 10:43 pm, dartdog wrote:
> Starting to noodle out some system design stuff for Django
> implementation does anyone have good ideas suggestions for useful
> tools to encompass db (model) business logic an
dartdog wrote:
>
> Starting to noodle out some system design stuff for Django
> implementation does anyone have good ideas suggestions for useful
> tools to encompass db (model) business logic and presentation
> components, flow and how to tie them together. It seems that the most
> obvious solu
Starting to noodle out some system design stuff for Django
implementation does anyone have good ideas suggestions for useful
tools to encompass db (model) business logic and presentation
components, flow and how to tie them together. It seems that the most
obvious solution in freeware is dia? It
Very cool, Rajesh D. Thanks.
Mike
On Jul 11, 12:31 am, Rajesh D wrote:
> On Jul 10, 11:06 am, adelaide_mike
> wrote:
>
>
>
> > I suspect this is a question more for a PostgreSQL list, but please
> > bear with me.
>
> > In Django 1.0.2 working with PostgreSQL 8.3 I have a model with an
> > imp
According to the jsonrpc 1.1 working draft, the request type and
response should be application/json not application/javascript. Even
if you handle requests that are in other types for compatibility, you
probably want your responses to be the correct type.
http://json-rpc.org/wd/JSON-RPC-1-1-WD-2
Hello,
I have some records in MySQL database. Each record has
id: Primary Key, autoincrement
Type: varchar
Price: float
Date: dateTime
Type can be a "car" or a "truck". There are many records whose Type
is "car" or whose Type is "truck".
Date has a format of "2009-07-07 20:00:00". This values
Yes, how many times have you followed the practice of:
1. write some new code
2. (re)start dev server and/or update dev database
3. tab over to your browser and click away
4. tab back to terminal to see the traceback when you hit an error
With a functional test suite, it becomes sooo much
On Fri, Jul 10, 2009 at 6:08 PM, Michael wrote:
> On Fri, Jul 10, 2009 at 5:54 PM, sjtirtha wrote:
>
>> Hi,
>>
>> I have a problem calling manage.py syncdb for my models.
>> Here is my models:
>> from django.db import models
>> from django.contrib.auth.models import User
>>
>> # Create your mode
Problem solved!!!
On Jul 10, 5:41 pm, nixon66 wrote:
> Getting errors when I try to render a template. Django indicates that
> it is a problem in the template and tells me that there is no such
> column as "aid.id". There is no column called ID in either my
> template, view or model. Any suggest
On Fri, Jul 10, 2009 at 5:54 PM, sjtirtha wrote:
> Hi,
>
> I have a problem calling manage.py syncdb for my models.
> Here is my models:
> from django.db import models
> from django.contrib.auth.models import User
>
> # Create your models here.
> class DocumentType(models.Model):
> name
Hi,
I have a problem calling manage.py syncdb for my models.
Here is my models:
from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class DocumentType(models.Model):
name = models.CharField(max_length=20, unique=True)
description =
Getting errors when I try to render a template. Django indicates that
it is a problem in the template and tells me that there is no such
column as "aid.id". There is no column called ID in either my
template, view or model. Any suggestions. I've included the error,
template, my view and model belo
I'm using Django 1.0.2 and having some problems with Related Object
queries.
For example I have a model called Project with a ForeignKey to a
Django User.
class Project(models.Model):
...
owner = models.ForeignKey(User)
...
by the documentation I would expect the following to give me a
On Thursday 09 July 2009 05:47:48 am Dids wrote:
> > Why not to add dots to your regexp? For example, [\w\d\-\.]+ ?
>
> I guess my question should have been: How come \. doesn't appear to be
> matched in url.py?
> That's the problem, it doesn't work.
It should. Are you using raw strings?
Post t
Thanks, that worked.
On Jul 10, 1:44 pm, Jonathan Buchanan
wrote:
> > I'm making a small app which is kind of like a blog. I have an Entry
> > class which has "ForeignKey(User)" as one of its members. I'm using
> > ModelForm to generate the form and I'm excluding the User ForeignKey
> > because
On Jul 10, 12:37 pm, Ben Kreeger wrote:
> How do I go about accessing that data from P2's database? Do I need to
> create a model in P1 and bind it to a certain table in P2's database?
> If that's the case, how do I specify access credentials for that
> database? Is that in settings.py?
If the t
Hi,
Using the example at
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets
, I am able to _edit_ objects belonging a particular model (using
modelforms). I have been trying to follow the same pattern for
_creating_ new objects using inline formsets, but have been unab
Here's the situation: I've got two projects, both Django. One is a
simple, public-facing website that renders a library of
reStructuredText files, as well as a couple of simple forms using the
Forms API. The other is a back-end that requires a login from a member
of our staff, and contains databas
> I'm making a small app which is kind of like a blog. I have an Entry
> class which has "ForeignKey(User)" as one of its members. I'm using
> ModelForm to generate the form and I'm excluding the User ForeignKey
> because it will just ask for you to pick a user from a drop-down
> list.
>
> Where d
I'm making a small app which is kind of like a blog. I have an Entry
class which has "ForeignKey(User)" as one of its members. I'm using
ModelForm to generate the form and I'm excluding the User ForeignKey
because it will just ask for you to pick a user from a drop-down
list.
Where do I tell it t
I fixed the above problem with URL reversing by refactoring the
JSONRPCService.__call__ method to grab it from the request object.
def __call__(self, request, extra=None):
if request.method == "POST":
return HttpResponse(self.process(request),
mimetype="ap
Hi Adam,
> I'm presuming I will use the sites app. However, I don't see how I
> can create and set the SITE_ID through the admin (which is necessary
> for number 2).
>
> Would people suggest that I use the RequestSite class from the sites
> app which uses the HttpRequest variables? If so, does
My app is used in an office with multiple users logged in and using it
simultaneously. Sometimes they may log in as the same user. Is
there any reason this should cause interaction between their sessions?
I have looked through the session code and see nothing that should
prevent these from op
On Jul 10, 11:06 am, adelaide_mike
wrote:
> I suspect this is a question more for a PostgreSQL list, but please
> bear with me.
>
> In Django 1.0.2 working with PostgreSQL 8.3 I have a model with an
> implied pkey. PostgreSQL syas this:
>
> CREATE TABLE wha_property
> (
> id serial NOT NULL,
On Fri, Jul 10, 2009 at 10:33 PM, huw_at1 wrote:
>
> So I switched from mod_python to mod_wsgi since I don;t really know
> what is going on and I realise mod_wsgi is recommended for 1.1 now.
> Anyway the rest of my site works fine now. The only part still not
> working is the admin section which f
On Jul 10, 8:39 am, bruno wrote:
> Hi,
>
> I'm new in django and I have problem with importing models
>
> I have two class : Job and Event
>
> The Job class defines a method run_job() wich do something and log the
> result by creating a new Event so I need to import the Event class
> from file
I suspect this is a question more for a PostgreSQL list, but please
bear with me.
In Django 1.0.2 working with PostgreSQL 8.3 I have a model with an
implied pkey. PostgreSQL syas this:
CREATE TABLE wha_property
(
id serial NOT NULL,
propnum character varying(16) NOT NULL,
beds integer,
I'm creating a new project with pretty simple requirements:
1. A core set of methods for validating data which I will build.
2. The ability for a person with minimal skills to drop HTML form
pages (2 or 3) for a given hostname (www.example1.com, www.example2.com,
www.example3.com) that accept the
On Fri, Jul 10, 2009 at 10:41 AM, Eric Brian wrote:
>
> Ok, so I finally got Django's unit tests to run and when I did, there
> was one failure. I checked the FAQ to see if this should be reported
> or not. There was no mention, so I wonder, should I report any test
> that doesn't pass?
>
Hard t
Ok, so I finally got Django's unit tests to run and when I did, there
was one failure. I checked the FAQ to see if this should be reported
or not. There was no mention, so I wonder, should I report any test
that doesn't pass?
--~--~-~--~~~---~--~~
You received this
So I switched from mod_python to mod_wsgi since I don;t really know
what is going on and I realise mod_wsgi is recommended for 1.1 now.
Anyway the rest of my site works fine now. The only part still not
working is the admin section which fails with this "No module named
urls" error as can be seen
Hi
I have that choice field:
RATES = (
('1', '1'),
('2', '2'),
('3', '3'),
('4', '4'),
('5', '5'),
)
rating = forms.ChoiceField(widget=forms.RadioSelect(), required=True,
choices=RATES)
Now - how to assign attrs for all choices(for example apply css cl
On Fri, Jul 10, 2009 at 9:39 AM, bruno wrote:
>
> Hi,
>
> I'm new in django and I have problem with importing models
>
> I have two class : Job and Event
>
> The Job class defines a method run_job() wich do something and log the
> result by creating a new Event so I need to import the Event class
Hi,
I'm new in django and I have problem with importing models
I have two class : Job and Event
The Job class defines a method run_job() wich do something and log the
result by creating a new Event so I need to import the Event class
from file app/events/models.py
The Event class reference the
Hi,
I would like to add a custom field to an existing admin model, namely LogEntry.
The goal is to add a comment field, where custom change comments can be added
in the admin whenever a model is saved.
Is it even possible to add such a field without changing the existing admin
codebase? Or wo
On Fri, Jul 10, 2009 at 7:30 AM, Michael Stevens wrote:
>
> Hi.
>
> I'm using a ModelFormset created with lineformset_factory.
>
> When I click delete on one of the records and save the formset, it
> successfully removes the associated db record, but if I redisplay the
> formset after the save, it
Hi Friends...
I am new to Django.I Just learning the django now.
http://in.pycon.org/2009/ . That website uses django
and the code is here - http://bitbucket.org/lawgon/fossconf/downloads/
In this Source code I din't find the models.py to run the Local
Server.In what way can i run this pac
Hi.
I'm using a ModelFormset created with lineformset_factory.
When I click delete on one of the records and save the formset, it
successfully removes the associated db record, but if I redisplay the
formset after the save, it's still showing the now removed form.
I've modified my code to recre
On Thu, 2009-07-09 at 13:19 -0700, Fluoborate wrote:
> Hello All,
>
> I am afraid that I might have to write my own middleware to do this. I
> really want to do something like the following:
>
> #In views.py:
>
> def welcome( request ):
> return HttpResponse( "Welcome to my website" )
>
Kicking off threads could be a solution, if you want your time-
consuming_function to run in the same process(es) as django.
Otherwise, you'll need to either create new processes or use some
inter process communication solution (socket, http, message
queue, ...)
In the first situation, make sure
I worked it out in the end - I had two formsets in the same form, and
hadn't realised the need for the prefix option to separate them.
2009/7/10 Karen Tracey :
> On Thu, Jul 9, 2009 at 12:01 PM, Michael Stevens
> wrote:
>>
>> Hi.
>>
>> I'm trying to use a model formset.
>>
>> I've successfully g
Thanks for your reply, Ryan, but it would be equivalent to simply
calling the self.parent.some_method() from the round save.
And my purpose is to have the signal (or other way of tracking) for
the point when _all_ objects (rounds) related to the specific object
(game) are saved.
Something like ad
45 matches
Mail list logo