Hello
I had in mind a system with translations and i was creating my own
translation system, which ran into a problem i dont know how to fix
(http://groups.google.com/group/django-users/browse_thread/thread/
b5d138693a864618/6e6edf7d6227cb50?lnk=gst&q=swamp#6e6edf7d6227cb50).
Then i found these
Yes it is correct: fixtures only load data into the database.
If you want the .save() method to be called, you could use the the
dumpscript management command I wrote in django_extensions:
http://github.com/django-extensions/django-extensions/tree/master
Cheers,
Will
--~--~-~--~~-
I have a model with custom save() method. Does loading fixtures invoke
this method?
class MyModel(models.Model):
def save(self, *args, **kwargs):
doStuffs()
>From my testing, doStuffs() is not called when loading fixtures. It is
called when I do:
instance = MyModel
/opt is the typical linux location, my mac has a few things there now.
J
On Apr 13, 4:12 pm, Shannon wrote:
> Hi -- I am working on a django-powered site on Leopard server. Where
> is the recommended/conventional deployment directory? Every example I
> see uses a particular user's home direct
You might want to think about using the direct_to_template function
instead, it uses the Request Context values, which allows you to take
advantage of the login system, where as the render_to_response does
not (by default).
J
On Apr 13, 7:16 pm, jason wrote:
> using the common view function(ren
using the common view function(render_to_response) would solve the
problems. i should have checked the django documentation more
carefully.
On Apr 13, 7:48 pm, jason wrote:
> hi guys,
>
> i want to create a page includes several querysets to display several
> boards of different staffs. i used t
I'm sorry Malcolm,
I'm from Java background where I usually put messages on its own
stack. If the way django do it is to put it in context, then I'm gonna
use it that way.
Thanks for clearing this up. :-)
Cheers,
On Apr 13, 10:35 am, Malcolm Tredinnick
wrote:
> On Sun, 2009-04-12 at 17:22 -07
Thanks Margie,
Let me try that first.
Cheers,
On Apr 14, 2:12 am, Margie wrote:
> Not sure if this is what you are looking for, but I use the
> notifications app to add some extra info to my html, to alert the user
> that there are errors in the form below or to let them know that there
> was
Hi -- I am working on a django-powered site on Leopard server. Where
is the recommended/conventional deployment directory? Every example I
see uses a particular user's home directory, but that does not seem
appropriate for a production-level site. I'm fairly new to the
Leopard environment and a
hmm, i think that governs how, for example, Persons are ordered in the
Person's admin list.
what I wanted to do was change the ordering of Persons that show up in
the ManyToMany field in the Group admin page.
also, is there any general way to affect the default ordering of
related items on ManyT
Russell,
I am working through something similar and I think that the basic
structure would be to have project folders for each site plus a folder
for your shared applications (whose models use the 'Site' object and
'CurrentSiteManager'. Something like this:
/home/django/sharedapps/
/home/django/sh
Yes you can use ext-js with django for this.
On Apr 14, 6:23 am, Eduardo Aragón Montes wrote:
> Hi everyone..I'm new in django and I'm developing and app that have virtual
> storage for users...so i would like to do a treepanel for every user where
> they can see what files they have uploaded an
On Mon, Apr 13, 2009 at 2:11 PM, Bastien wrote:
> ... So my question is how could the
> view know which POST data belongs to which form or how can I change
> the form fields name like the profile tags and post tags would become
> tags_profile and tags_post respectively?
I think you want to spec
ok I'll try it,
thanks
drakkan1000
On 13 Apr, 22:39, Alex Gaynor wrote:
> On Mon, Apr 13, 2009 at 4:37 PM, drakkan wrote:
>
> > I'm using ugettext, I have to use the lazy variant?
>
> > On 13 Apr, 21:53, Ramiro Morales wrote:
> > > On Mon, Apr 13, 2009 at 4:30 PM, drakkan wrote:
>
> > > > I
Thanks, will do that tomorrow.
Kirill.
On 14 апр, 00:14, Adi Sieker wrote:
> On 13.04.2009, at 21:43, Kirill Zaborski wrote:
>
> > So no answers were given and I tried to fix FormWizard class.
> > The patch is attached and the only thing changed is that the
> > revalidation is made with forms
On Mon, Apr 13, 2009 at 4:37 PM, drakkan wrote:
>
> I'm using ugettext, I have to use the lazy variant?
>
> On 13 Apr, 21:53, Ramiro Morales wrote:
> > On Mon, Apr 13, 2009 at 4:30 PM, drakkan wrote:
> >
> > > I found a workaround I have to do:
> >
> > > 'status':_(u.get_status_display())
> >
>
On Apr 13, 7:25 pm, gordyt wrote:
> Howdy Folks,
>
> I have been testing model inheritance using models that have UUIDField
> primary keys. It appears that when you save a new instance of a child
> model, the framework is not calling get_db_prep_value() to convert the
> UUIDField to a proper for
I'm using ugettext, I have to use the lazy variant?
On 13 Apr, 21:53, Ramiro Morales wrote:
> On Mon, Apr 13, 2009 at 4:30 PM, drakkan wrote:
>
> > I found a workaround I have to do:
>
> > 'status':_(u.get_status_display())
>
> > even if I have already marked the string for translation in model
On Apr 13, 5:57 am, Praveen wrote:
> How the current user logging-in first while registration.. you mean to
> say after successfully registration the user must login automatically.
Well, you haven't explained the user flow at all here. But I assume
that it's the RegistrationForm that's doing the
Hi everyone..I'm new in django and I'm developing and app that have virtual
storage for users...so i would like to do a treepanel for every user where
they can see what files they have uploaded and if they want create folders
and organize their files...I know i can use ext-js but i would like to kn
On 13.04.2009, at 21:43, Kirill Zaborski wrote:
> So no answers were given and I tried to fix FormWizard class.
> The patch is attached and the only thing changed is that the
> revalidation is made with forms which were before the last one (I
> do not see any reason for the second validation
On Mon, Apr 13, 2009 at 4:30 PM, drakkan wrote:
>
> I found a workaround I have to do:
>
> 'status':_(u.get_status_display())
>
> even if I have already marked the string for translation in models:
>
> STATUS=(
> (1,_('Active')),
> (0,_('Inactive')),
> )
>
> this is a really strange behavio
On Mon, Apr 13, 2009 at 3:07 PM, drakkan wrote:
>
> The string that doesn't works are defined in models.py:
>
> STATUS=(
>(1,_('Active')),
>(0,_('Inactive')),
> )
>
> class TestModel(models.Model):
>status=models.IntegerField("Status",choices=STATUS,default=1)
>
> in my view I have:
>
So no answers were given and I tried to fix FormWizard class.
The patch is attached and the only thing changed is that the revalidation is
made with forms which were before the last one (I do not see any reason for
the second validation of it).
Is there any chance to get it into the trunk?
Do I ne
I found a workaround I have to do:
'status':_(u.get_status_display())
even if I have already marked the string for translation in models:
STATUS=(
(1,_('Active')),
(0,_('Inactive')),
)
this is a really strange behaviour ...
On 13 Apr, 21:07, drakkan wrote:
> The string that doesn't w
On 13 Kwi, 21:10, Alex Gaynor wrote:
> Provide a custom form to the ModelAdmin using the form
> option:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#form
>
> Alex
>
Oh, it's so simple.. :-)
Thank You Alex
regards.
--~--~-~--~~~---~--~~
You received th
The string that doesn't works are defined in models.py:
STATUS=(
(1,_('Active')),
(0,_('Inactive')),
)
class TestModel(models.Model):
status=models.IntegerField("Status",choices=STATUS,default=1)
in my view I have:
'status':u.get_status_display()
ant this is not transalted, why?
On Mon, Apr 13, 2009 at 2:52 PM, eli wrote:
>
> Hi,
>
> How can I to validate data from form in Django Admin Panel? (like:
> clena_fieldname in form.ModelForm) ?
>
> regards.
> >
>
Provide a custom form to the ModelAdmin using the form option:
http://docs.djangoproject.com/en/dev/ref/contrib/admi
On Mon, Apr 13, 2009 at 12:53 PM, khomutets...@gmail.com <
khomutets...@gmail.com> wrote:
>
> Hi!
>
> I want to map some compex objects, like lists or dictionaries, but in
> Django I don't find Field type for this. Please help me or say how to
> map this data structures. (I'll try to use Hibernate
Hi,
How can I to validate data from form in Django Admin Panel? (like:
clena_fieldname in form.ModelForm) ?
regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Also,
I had to go use the admin interface, go to Sites and change the 'site name'
from 'example.com' to mine. A little required edit that I missed.
On Sun, Apr 12, 2009 at 10:00 PM, Praveen wrote:
>
> You should change the site domain name example.com to 127.0.0.1:8000
> check in your django-sit
On Apr 11, 11:10 pm, codecowboy wrote:
> Thank you Daniel. I got it working. That link that you gave me
> helped me to figure it out. I'm curious though, is there ever a
> reason in Django to define a method in a model class or would I always
> use a custom manager method?
It's frequently use
Forgot to add that I'm using the latest revision from subversion
(10558)...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To u
Howdy Folks,
I have been testing model inheritance using models that have UUIDField
primary keys. It appears that when you save a new instance of a child
model, the framework is not calling get_db_prep_value() to convert the
UUIDField to a proper format before querying the parent entry.
Let's s
Hi,
I know it's not possible to easily override the submit_line.html
template on model/app by model/app basis but I'm wondering if anyone
has discovered a workaround for adding custom submit_line
functionality?
Basically within one app I'd like to hide everything but 'Delete' and
'Save'. At the
I have a classic user profile page where the user fills a form with
various field about her profile (name, address, about me...). On the
same page I have another form that is very similar to a blog post
entry (title, body...) that represents a message that the user can
optionaly fill if she wants
This can be helpful
http://code.djangoproject.com/wiki/AuditTrail
Mohammad Tayseer
http://spellcoder.com/blogs/tayseer
From: Brazilian Joe
To: Django users
Sent: Monday, April 13, 2009 6:48:13 PM
Subject: Django full-history?
Dear all,
I have been workin
hi thanks ,
well got the point about url-conf the url pattern you have given does not
raise the error but i have still not been able to get my css working
my urls.py has an entry
(r'^sitemedia/?P.*$', 'django.views.static.serve',
{'document_root': '/home/amit/analytics/sitemedia', 'show_ind
Well, I'm not sure what the matter was, maybe some bad cache or
something, but the problem seems to have corrected itself. Weird!
On Apr 13, 12:06 pm, Brian Neal wrote:
> On Apr 13, 11:47 am, Brandon Taylor wrote:
>
>
>
> > Hi everyone,
>
> > I need a sanity check here. I'm using a jQueryUI Dat
On Mon, Apr 13, 2009 at 1:48 PM, Brazilian Joe wrote:
>
> Dear all,
>
> I have been working on a system where we need full-history for our
> data. We need features like a 'live time machine', to be able to look
> at information as it was at a certain point of time in the past, in
> real time (incl
Hi Brian,
Yes, I've also made certain that the value returned for effective date
from form.cleaned_data['effective_date'] is a valid Python datetime
object.
Something seems to be amiss. The exception is happening in: django/db/
models/fields/__init__.py in to_python, line 473
If I put a print s
Hi, I'm trying to use i18n with django. I followed the docs and
created my transalations for english,italian and spanish
in settings I have:
ugettext = lambda s: s
LANGUAGES = (
('en', ugettext('English')),
('it', ugettext('Italian')),
('es', ugettext('Spanish')),
)
and I installed
On Apr 13, 11:47 am, Brandon Taylor wrote:
> Hi everyone,
>
> I need a sanity check here. I'm using a jQueryUI DatePicker, with the
> dateFormat option set to 'yy-mm-dd', which is returning a date in -
> MM-DD format, if I check my request.POST values.
>
> I have a DateField - "effective_from
Hi!
I want to map some compex objects, like lists or dictionaries, but in
Django I don't find Field type for this. Please help me or say how to
map this data structures. (I'll try to use Hibernate ORM and he have
List, Map and Set mapping types).
Mikhail Khomutetskiy.
--~--~-~--~~--
Dear all,
I have been working on a system where we need full-history for our
data. We need features like a 'live time machine', to be able to look
at information as it was at a certain point of time in the past, in
real time (including seeing deleted items). For that, we currently use
a compound
Hi everyone,
I need a sanity check here. I'm using a jQueryUI DatePicker, with the
dateFormat option set to 'yy-mm-dd', which is returning a date in -
MM-DD format, if I check my request.POST values.
I have a DateField - "effective_from", on my model, and am using a
corresponding ModelForm.
Hi,
Has anyone had the experience to deploy django apps to multiple
servers to increase serving capacity? Is there any references or best
practice documents we could refer to?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to th
figured it out!
class ModelForm(forms.ModelForm):
'''
Define our own model forms so we can use the form to render a
read-only detail page.
'''
def __init__(self, *args, **kwargs):
readonly = kwargs.get('readonly', False)
if readonly:
del kwargs['rea
Not sure if this is what you are looking for, but I use the
notifications app to add some extra info to my html, to alert the user
that there are errors in the form below or to let them know that there
was no error and the form was submitted successfully.
In view.py:
request.not
Hello,
Seeking to add to an existing webapp over the next few weeks, built on
a MySQL database currently have a multi-part form and hierarchal user
system based on MPTT with several custom reports for stored
submissions and their user relationships.
I'm seeking an individual who has experience
On Apr 13, 9:44 am, Tonne wrote:
> It's the calendar with the unusual form/structure that I'm
> struggling to implement with the stock Django tools.
>
> I'll take a step back and give it another shot with logic in view and
> parsing in the template.
I'm not sure what you mean by "parsing"...I a
We're looking for a developer with Django and CSS skills to come work
on Chartbeat.com. Chartbeat is a Betaworks company, the people behind
Bit.ly, Summize, Tweetdeck and a whole hos of other companies. Email
me at tony at betaworks.com. Job description below:
Chartbeat provides real-time analyti
django-admin.py --version from the command line should work as well.
On Apr 12, 1:39 am, Alex Gaynor wrote:
> On Sun, Apr 12, 2009 at 2:38 AM, ydjango wrote:
>
> > How do I find which version of django I have on my server?
>
> import django; print django.VERSION
>
> That should have a tup
Thanks for you input. Okay, I clearly need to do a bit of revision on
nesting loops in templates then, if you think it might be possible to
do that. 3 nested 'while' loops with incrementing variables sound
doable in a template?
>Well, what does the updating of the dict consist of?
It will need t
I'm going to be running django from either the threaded or preforked
runfcgi mode.
I'm wondering which one is more efficient for a deployment targeted
for now on an x64 linode/slice .
I dont really see any docs describing the different options, when to
use them, or anything like that, so I'm ask
I wrote up a blog post the other day on how I go about deleting
multiple related objects from cache based on tags. It allows you to
tag objects as you add them to cache that way you can delete a bunch
with one call.
http://stepsandnumbers.com/archive/2009/04/11/setting-and-delete-cache-in-django-
Okay, so I should probably be dealing with the field in my ModelForm
class (the one that subclasses ModelForm).
This code is where the display values are found before creating the
ReadOnlyWidget. In the case of my stains field (a ManyToMany field),
there isn't a get_stains_display function, so t
Hi.
You misunderstood the docs a bit, I c/p'ed the url-conf bit here:
(r'^site_media/(?P.*)$', 'django.views.static.serve',
{'document_root': '/path/to/media'}),
The problem here that is also causing the error is that the file name
should be
a variable and not hardcoded for every file,
Hi , i am new to django and i am trying to serve my css file .
I followed the instruction to serve static files in development server and
made a seperate /media directory
I copied my css file into it
and changed the url pattern to include:
(r'^site_media/default.css$', 'django.views.static.serve'
Tim,
Thanks for the helpful answers.
As for specific details about my app, right now I'm still in the
design phase. It will start small, but hopefully it will get popular
quickly. So I don't know how big the Db will be or how many users will
there be.
What I'm trying to do is to make sure there
hi guys,
i want to create a page includes several querysets to display several
boards of different staffs. i used the generic.list_detail to do this,
but the object_list seemed to accept only one dictionary argument to
go. so how can i use several querysets in the single template to
display diffe
On Mon, Apr 13, 2009 at 11:17 AM, Tonne wrote:
> In my case I need to firstly update a 3 dimensional dict/list (i.e.
> nested 3 levels deep - not sure if 3 dimensional is an appropriate
> description), then iterate over it and put those results into an html
> page. I'm probably not looking hard e
> Recently I found out Django doesn't support multiple databases. That's
> quite surprising.
>
> Given that limitation, how do you scale out a Django app?
Depends on where your bottleneck(s) is/are. It also depends
heavily on your read/write usage pattern. If you're truly
experiencing a sten
Continuation wrote:
> Is there any way to bypass django's ORM and have direct access to a
> database?
http://docs.djangoproject.com/en/dev/topics/db/sql/
Yep.
-tim
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Is there any way to bypass django's ORM and have direct access to a
database?
This would be useful for accessing features not supported by django
ORM - multi-db access, composite primary key, etc.
If it is possible to do so under django, can anyone point me to
tutorials or code samples?
Thanks.
Recently I found out Django doesn't support multiple databases. That's
quite surprising.
Given that limitation, how do you scale out a Django app?
Without multi-DB support, most of the usual techniques for scaling out
such as:
- DB sharding
- functional partitioning - eg. separate DB serve
Thanks for you reply, Jakob.
I'd prefer to solve the problem the Django way. The problem for me is
that what I'm trying to do is not the usual scenario of passing the
results of query through a view to a template. I haven't found a
precedent in the docs or a tutorial elsewhere that covers this.
Thanks Alex and matehat,
Concerning this issue of mine, I've decided to remove the images and
save the objects without the ImagingCore in them, which fixed the
whole thing.
On a different note, other than actively testing data which we want to
put into sessions before we design the application f
Hi all,
I want to add my site an app so that enables users to invite their
friends from MSN, Gmail etc. to join in my site. Is there any solution
or apps for this.
Thank you very much.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Thank you for your answers, I came to the same decision (that url
cannot define mimetype), but have not thought about decorators.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
70 matches
Mail list logo