Either use model inheritance or one by one relationships with the Site model.
The other solution which doesnt require changing django's code
would be monkeypatching (changing the class in runtime from the models.py
file of one of your apps), not a great idea.
On Sun, Mar 21, 2010 at 4:43 AM, ej
On Sunday 21 March 2010 05:43:44 ejm wrote:
> Hi,
>
> My app uses a model called Site which is essentially the same as in
> the django.contrib.sites framework (domain and name), except that my
> model needs an extra field and is related through a foreign key to
> another model. (It is related to a
can anyone help me out here? I'm stuck and cannot get the text areas
to work using ckeditor.
On Mar 17, 12:13 pm, Bobby Roberts wrote:
> hey i've uploaded theckeditorfolder to my /static/admin/js
> directory. I'm trying to get the text areas to use it but i'm not
> having any luck so I don't t
is there some way to view results of i18n formats.py after
modification for some language?
maybe a single page with everything in formats.py or a management
command?
Aljosa Mohorovic
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
Hi,
I just installed a fresh development Django from SVN. I wanted access
to the capability to dynamically add child rows when there is a parent-
child foreign key relationship between two model tables.
E.g. My Version table has a ForeignKey to a Project table. I would
like to be able to add mu
hi.
I have a ModelForm based on an Model like this:
class MyModel(models.Model):
attr1 = models.CharField()
attr2 = models.CharField()
attr3 = models.CharField()
createdby = models.ForeignKey(User, related_name='createdby',
db_column='createdbyid')
calculatedfield = models.CharField()
Hi,
I am designing a portal that uses Hindi language using Django.
When I pass a hindi word from client side to server, *in Unicode format*, it
gets converted to
*कर्मचारी*type of
string on server side.
I want to process this string as unicode too.
what can be done?
Thanx
Ruturaj
--
[Geekru2]
Probably a non-issue. I just force-cleaned Firefox's cache and it
looks much better. I don't know if updating from 1.2 to the latest
SVN code helped, because that alone didn't fix it. The problem was
quite stubborn and repeatable until the cache was flushed.
For some reason I'm finding Firefox'
You probably want to change the attributes of the model object
directly.
"If you call save() with commit=False, then it will return an object
that hasn't yet been saved to the database."
Source:
http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#the-save-method
So I would do something
On Mar 21, 7:49 am, Bobby Roberts wrote:
> can anyone help me out here? I'm stuck and cannot get the text areas
> to work using ckeditor.
Does any static media work? How are you deploying? mod_python,
mod_wsgi? What is the configuration? Can you access the javascript in
your browser at the URL y
Hi
I use djangoflash http://djangoflash.destaquenet.com/
and after add message to flash
request.flash.add('message', 'test')
and redirect
i receive
['test']
instead
test
code which display this:
{% if flash %}
{% for key, value in flash.items %}
{{ value }}
I'm trying to download Django on my Mac OS X 10.4.11. I have download
Python 2.6.4. And then the online Tutorial says this:
tar xzvf Django-1.1.1.tar.gz
cd Django-1.1.1
sudo python setup.py install
I wonder where should I run this? By Python Shell or what? Sorry if
this seems to be a stupid quest
It's not a matter of stripping the brackets, the problem is you are getting
a list.
I suppose you would get the result you want with the following code:
{% if flash %}
{% for key, value in flash.items %}
{% for v in value %}
{{ v }}
{% endfor%}
You should run that on the Terminal (not Python, just regular shell), in the
folder where you downloaded Django-1.1.1.tar.gz .
- Paulo
On Sun, Mar 21, 2010 at 10:39 PM, yangyang wrote:
> I'm trying to download Django on my Mac OS X 10.4.11. I have download
> Python 2.6.4. And then the online Tu
I apologize for my newbness, but I have spent hours searching and
experimenting and have yet to find a solution to my problem. Under
the development server my admin-site worked well. However, when I
tried to deploy it using recommended procedures under Apache and WSGI,
I encountered problems.
Fi
heya,
I have a small Django app we're writing to hold reviews of newspaper
articles.
With each article, there's an arbitrary number of companies or
keywords associated with those articles. And for each of those
companies/keywords, there's either a rating (out of 10), or possibly
no rating (i.e. N
A possible solution would be to create a Many To Many relationship between
articles and companies, with an intermediary model holding the ratings:
http://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships
- Paulo
On Mon, Mar 22, 2010 at 2:41 AM, Victor Hoo
Paolo,
Thanks for the quick reply =).
I did think of that, just using a M2M, however, that means I lose all
of the inherent features of django-tagging. For our case, that would
probably be things like helpers to do auto-complete for tags,
automatically parsing form inputs with commas into tags, t
I implement read-only fields by using widgets that render html that
does not include any . For example, if I have a field called
hobby in a Customer model, in my form I have something like this:
self.fields["hobby"] = CharField(widget=DisplayHobbyField(customer),
required=False)
DisplayHobbyFie
But does this all amount to an expectation that it will restrict the
upload to an image??
I've got this in my model:
class Photo(models.Model):
image = models.ImageField(upload_to='photos')
and this in my view:
try:
p = Photo()
p.image = request.FILES['Filedata']
20 matches
Mail list logo