i have 5 inlines in a model.I want to make all inlines as a
readonly.Is there any solution for this
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us
I am having a model , i want to make that as a readonly during
updation.I am having foregnkey in my model.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
How do I order a queryset of Tags based on the number of entries tagged for
each tag?
That is we have a list of Tags, say tag1, tag2, tag3 etc. There may be
entry1, entry2, entry3 etc.
I am currently using a simple manager method, and calling it.Don't think
that is efficient.
Any ideas suggestio
Hi all,
In my view, I have a variable named 'site' which holds a value of
"www.example.com", when render in template, I use the following
method:
This is an example
However, when check the result, the link becomes "http://
www.mysite.com/www.example.com". while I check for the source code, it
is:
"change fb_settings.py" means that you can/should change the variables
defined there.
e.g., if you are not using a directory named "uploads", you have to
take a look at fb_settings.py and change that directory accordingly
(note: you don´t _have_ to use "uploads", you can use whatever you
want).
a
On May 25, 1:27 pm, Simon Davies wrote:
> I have a choices field called status in my model form which can be set
> to a number of values, however the options available will be based on
> its current state something like this, so it needs to refer to itself:
>
> class ContractForm(ModelForm):
>
>
On May 26, 4:52 pm, Joakim Hove wrote:
> Hello,
>
> I have used ModelForm to create a form for a model class. In the
> template rendering the form I just have:
>
> form.as_table
>
> that is very neat, compared to writing out all the form elements in
> the template manually, but it is of course
Currency Object - http://www.djangosnippets.org/snippets/1525/
Currency Widget - http://www.djangosnippets.org/snippets/1526/
Currency Form Field - http://www.djangosnippets.org/snippets/1527/
Currency DB Field - http://www.djangosnippets.org/snippets/1528/
Admin Integration - http://www.djangosni
Hi all,
is there a way to pass result of a template filter to some tag for
further processing?
{% some_tag content|textile %}
The best I came so far is something like:
{% textile content as content2 %}
{% some_tag content2 %}
With this textile, or any other filter should be rewritten as a tag
2009/5/26 Bojan Mihelac
> is there a way to pass result of a template filter to some tag for
> further processing?
>
> {% some_tag content|textile %}
>
> The best I came so far is something like:
>
> {% textile content as content2 %}
> {% some_tag content2 %}
>
> With this textile, or any other f
On May 26, 11:27 am, Sam Kuper wrote:
> 2009/5/26 Bojan Mihelac
>
> > is there a way to pass result of a template filter to some tag for
> > further processing?
>
> > {% some_tag content|textile %}
>
> > The best I came so far is something like:
>
> > {% textile content as content2 %}
> > {% s
Hi Alex,
Thanks a lot or quick reply. A couple of queries below:
1) How can this be handled when the tables are created dynamically?
Actually the tables will be created dynamically by some other process
and will be deleted after its purpose is over. So is there any other
way or we need to call py
ds99 wrote:
> Hi Alex,
> Thanks a lot or quick reply. A couple of queries below:
>
> 1) How can this be handled when the tables are created dynamically?
> Actually the tables will be created dynamically by some other process
> and will be deleted after its purpose is over. So is there any other
> w
2009/5/26 Alex Gaynor
> It's not even an authorisation issue, it's that I'd be overiding nearly
> every method to make sure the behavior was what I wanted, and then I'd
> replace all the templates since I want everything the user sees to be
> similarly themed, and at this point I've already rewri
On 26 May 2009, at 11:27 , Sam Kuper wrote:
> 2009/5/26 Bojan Mihelac
>> is there a way to pass result of a template filter to some tag for
>> further processing?
>>
>> {% some_tag content|textile %}
>>
>> The best I came so far is something like:
>>
>> {% textile content as content2 %}
>> {% som
Hi Ankit,
I got what you are saying. I'll tell you what I want to do.
For eg: For one request one process creates table called "books_111"
and after its purpose is done, whole table will be dropped. It may
also happen that while this table is being worked upon, another table
with same schema is c
On May 26, 11:05 am, Bojan Mihelac wrote:
> Hi all,
>
> is there a way to pass result of a template filter to some tag for
> further processing?
>
> {% some_tag content|textile %}
>
> The best I came so far is something like:
>
> {% textile content as content2 %}
> {% some_tag content2 %}
>
> Wit
ds99 wrote:
> Hi Ankit,
> I got what you are saying. I'll tell you what I want to do.
>
> For eg: For one request one process creates table called "books_111"
> and after its purpose is done, whole table will be dropped. It may
> also happen that while this table is being worked upon, another table
> Any ideas, suggestions?
>
> Any better ways of doing this?
Hello.
Tried to do it with a Paginator class?
Maybe this link can help You
http://docs.djangoproject.com/en/dev/topics/pagination/
--~--~-~--~~~---~--~~
You received this message because you are subscr
I'm completely around the axle on this.
-
** The log:
[26/May/2009 00:06:43] "GET /polls/1/detail/ HTTP/1.1" 200 333
[26/May/2009 00:06:49] "POST /polls/1/detail/vote/ HTTP/1.1" 404 2314
** The 404:
Using the URLconf defined in m
On 26 May 00:28, Allan wrote:
>
> I'm completely around the axle on this.
> -
> ** The log:
> [26/May/2009 00:06:43] "GET /polls/1/detail/ HTTP/1.1" 200 333
> [26/May/2009 00:06:49] "POST /polls/1/detail/vote/ HTTP/1.1" 404 2314
Does something exist there something along the lines of:
prepopulated_fields = {
"author": ([something to retrieve currently-logged-in user from
authmod.User],)
}
Thanks,
Daniele
--~--~-~--~~~---~--~~
You received this message becau
hi,
I upgraded an app to the latest trunk. In one model I have a filefield called
'slides'. I have a Form for that model and in the view I have this code:
if request.FILES:
newtalk.save_slides_file(request.FILES['slides']['filename'],
req
No that table name will be different every time based on some id. If
table name is same then there is no problem but the issue arises when
table names are different but the schema is same.
On May 26, 3:51 pm, Ankit wrote:
> ds99 wrote:
> > Hi Ankit,
> > I got what you are saying. I'll tell you w
Daniele Procida wrote:
> Does something exist there something along the lines of:
>
> prepopulated_fields = {
> "author": ([something to retrieve currently-logged-in user from
> authmod.User],)
> }
>
> Thanks,
>
> Daniele
>
>
> >
> .
> Hi,
>
In ur admin.py sa
ds99 wrote:
> No that table name will be different every time based on some id. If
> table name is same then there is no problem but the issue arises when
> table names are different but the schema is same.
>
> On May 26, 3:51 pm, Ankit wrote:
>
>> ds99 wrote:
>>
>>> Hi Ankit,
>>> I got wh
Hi,
When I have some validation errors in my forms they automatically get
reloaded after POST with all the fields already filled with what the
user already introduced before POST and she only has to change
whatever was wrong in the first place. But for files or images, the
path disappears and the
Hi,
On 26.05.2009, at 12:17, Sam Kuper wrote:
> 2009/5/26 Alex Gaynor
>> It's not even an authorisation issue, it's that I'd be overiding
>> nearly every method to make sure the behavior was what I wanted,
>> and then I'd replace all the templates since I want everything the
>> user sees
On May 26, 12:30 pm, Bastien wrote:
> Hi,
>
> When I have some validation errors in my forms they automatically get
> reloaded after POST with all the fields already filled with what the
> user already introduced before POST and she only has to change
> whatever was wrong in the first place. But
Thank you Daniel, then the users will just re enter the files and feel
secure :)
On May 26, 1:42 pm, Daniel Roseman
wrote:
> On May 26, 12:30 pm, Bastien wrote:
>
> > Hi,
>
> > When I have some validation errors in my forms they automatically get
> > reloaded after POST with all the fields alre
Hello,
I often find an app consists of one main model and serveral subsidiary
models linked to the main model by a foreign key. The django admin
system by default treats all of these models the same- ie they all
appear in the app's index on the same 'level'. The alternative is to
use inline forms
On Tue, May 26, 2009 at 7:06 AM, Kenneth Gonsalves
wrote:
>
> hi,
>
> I upgraded an app to the latest trunk.
Please, whenever posting something like that, indicate from what you
upgraded. At least approximately. Makes it far easier for responders to
start looking in approximately the right pla
2009/5/26 Sieker Adi Jörg
> In my humble opinion. As soon as you mention users, the admin is the
> wrong tool.
> contrib.admin is for admin's and not for users.
>
> Another take on it is:
> - Anyone that creates an account on your site, doesn't get to ses the
> admin
> - Anyone that you create an
Hi,
how can I define a primary key that consists of multiple columns? How
can I specify this in a model object?
kind regards
robert
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
Well, that sounds reasonable. The traffic to my site should
(hopefully) be growing over the next few months--I'll just wait and
see if it happens more often. I guess if the users aren't getting an
error message (and thus thinking that there's something wrong with the
site, or that they did somet
On May 20, 2:02 pm, Konstantin S wrote:
> Hello!
>
> I have a very strange problem and really don't know where to start in
> hunting it down. My app uses django-registration, all works fine but
> if I been logged in restart django dev. server I immediately get
> TemplateSyntaxError:
>
> Caught an
On 26.05.2009, at 14:28, Sam Kuper wrote:
> 2009/5/26 Sieker Adi Jörg
> In my humble opinion. As soon as you mention users, the admin is the
> wrong tool.
> contrib.admin is for admin's and not for users.
>
> Another take on it is:
> - Anyone that creates an account on your site, doesn't get to
Thanks so much for the comprehensive reply!
All best,
Sam
2009/5/26 Sieker Adi Jörg
>
> On 26.05.2009, at 14:28, Sam Kuper wrote:
>
> > 2009/5/26 Sieker Adi Jörg
> > In my humble opinion. As soon as you mention users, the admin is the
> > wrong tool.
> > contrib.admin is for admin's and not f
On May 26, 3:08 pm, Joshua Partogi wrote:
> Hi all,
>
> I have a very trivial case that somebody might have solved before, but I can
> not get my head around.
>
> I have this two objects that is related to each other:
>
>
> class Product(models.Model):
> name = models.CharField(max_lengt
You could try using the mail_admins function directly.
http://docs.djangoproject.com/en/dev/topics/email/#mail-admins
Maybe it'll raise an informative exception.
On May 25, 2:19 am, Rex wrote:
> Hi,
>
> I am having trouble getting error reporting via email to work (as
> described herehttp://doc
On 26 May 2009, at 15:44 , Sieker Adi Jörg wrote:
> On 26.05.2009, at 14:28, Sam Kuper wrote:
> Also to actually get access to the
> admin views, the user needs be flagged as a superuser (I as far as I
> remember).
>
Staff, actually, superuser is another user class (one that gets all
admin right
I don't want to sound rude, I'm just curious, why do you need multiple
tables with the same schema, but different names, in the first place?
On May 26, 1:17 pm, ds99 wrote:
> No that table name will be different every time based on some id. If
> table name is same then there is no problem but th
Hi all,
I have a very trivial case that somebody might have solved before, but I can
not get my head around.
I have this two objects that is related to each other:
class Product(models.Model):
name = models.CharField(max_length=50)
class Picture(models.Model):
product = models.Fore
> If you intend your form to save changes to an existing object, you
> must pass that object in as 'instance' when creating the form.
Thank you very much. You were right, I forgot to add the instance
object.
--~--~-~--~~~---~--~~
You received this message because
On May 26, 6:43 am, Konstantin S wrote:
> On May 20, 2:02 pm, Konstantin S wrote:
>
> > Hello!
>
> > I have a very strange problem and really don't know where to start in
> > hunting it down. My app uses django-registration, all works fine but
> > if I been logged in restart django dev. server
I'm (still) working on my computer museum site,
I originally set-up Systems and Images in the database like this:
class System(models.Model):
manufacturer = models.ForeignKey('Manufacturer')
name = models.CharField(max_length=80)
slug = models.CharField(max_length=80)
Bret, that was exactly correct. I don't know much about "pretty" but "works" is
good. Many thanks.
Cheers.
From: django-users@googlegroups.com [django-us...@googlegroups.com] On Behalf
Of Brett Parker [idu...@sommitrealweird.co.uk]
Sent: Tuesday, May 26
Hi, I'm looking for some help getting Apache running correctly with
FlatPages, as well running with multiple sites on the same server.
First the FlatPages problem. Everything's fine on my dev box (WinXP), but
on my production box (Debian) the Flatpages only work when running the
django testing se
I've tried both user.first_name and user.last_name, which give no
errors, but display "user" instead of the attribute.
On May 20, 12:05 am, Ayaz Ahmed Khan wrote:
> On 20-May-09, at 12:12 AM, neridaj wrote:
>
>
>
> > On May 19, 1:15 am, Ayaz Ahmed Khan wrote:
> >> On 19-May-09, at 5:12 AM, neri
Hi everybody!
I've got a newby question according django QuerySet API.
I know that a statement:
Entry.objects.filter(pub_date__gt=datetime.date(2005, 1, 3),
headline='Hello')
is equivalent to SQL query:
SELECT ...
WHERE (pub_date > '2005-1-3' AND headline = 'Hello')
My question is how to enforc
On Tue, May 26, 2009 at 2:17 PM, Pavel wrote:
>
> Hi everybody!
>
> I've got a newby question according django QuerySet API.
> I know that a statement:
> Entry.objects.filter(pub_date__gt=datetime.date(2005, 1, 3),
> headline='Hello')
> is equivalent to SQL query:
> SELECT ...
> WHERE (pub_date
It works with user.get_full_name().
Thanks,
J
On May 26, 12:14 pm, neridaj wrote:
> I've tried bothuser.first_name anduser.last_name, which give no
> errors, but display "user" instead of theattribute.
>
> On May 20, 12:05 am, Ayaz Ahmed Khan wrote:
>
> > On 20-May-09, at 12:12 AM, neridaj wr
Is it only possible to access the methods of the associated User
object, and not the attributes? Even though I can access the full name
using get_full_name() I would still like to change the ordering to
last_name i.e., ordering = ['last_name']. Do I need to make a new
method that only only returns
On May 15, 11:42 am, Spk wrote:
> It seems that everytime I restart the web server, I get a new session
> ID which is why it thinks that there is data to be commited. The
> browser still has the cookie for the previous session ID, and it is
> stored in the database, so why is Django generating a
Hi,
I'm implementing some new urls in my ModelAdmin.get_urls method and
I need access to the current models instance or id.
I didn't find anything in the ModelAdmin docs, but maybe I'm just blind.
Any pointers in the right direction would be nice.
Thanks
Adi
--~--~-~--~~---
On Tue, May 26, 2009 at 3:41 PM, Sieker Adi Jörg wrote:
>
> Hi,
>
> I'm implementing some new urls in my ModelAdmin.get_urls method and
> I need access to the current models instance or id.
> I didn't find anything in the ModelAdmin docs, but maybe I'm just blind.
>
> Any pointers in the right di
On May 27, 12:20 am, Daniel Roseman wrote: >
On May 26, 3:08 pm, Joshua Partogi wrote: > > > > >
> > Hi all, > > > I have a very trivial case that somebody might have solved
before, but I can > > not get my head around. > > > I have this two objects
that is related to each other: > > > > > c
This code creates a formset and populates fields with copies of
date and start_time.
The problem is, if num_events is X then it creates X forms but it only
populates X-1 (it leaves the last one uninitialized). My question
is why, and how to fix it? Thanks.
DateTimeFormSet = for
Thanks for your help.
I used the
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.list_display
method who work fine for me.
def url_as_link(self):
return '%s' % (self.url, self.url)
url_as_link.allow_tags = True
And call 'url_as_link' insted of 'u
On Tuesday 26 May 2009 18:04:16 Karen Tracey wrote:
> > I upgraded an app to the latest trunk.
>
> Please, whenever posting something like that, indicate from what you
> upgraded. At least approximately. Makes it far easier for responders to
> start looking in approximately the right place for w
On Tue, May 26, 2009 at 01:28:07AM -0700, antoxa.sido...@gmail.com wrote:
> Tried to do it with a Paginator class?
>
> Maybe this link can help You
> http://docs.djangoproject.com/en/dev/topics/pagination/
Yes, I guess I could do it with paginator, and 1 object per page.
However that would mean
On May 14, 1:17 pm, Sam Chuparkoff wrote:
> On Wed, 2009-05-13 at 05:21 -0700, DaveBrueckwrote:
> > Has anyone in this group implemented any sort of login-as-another-user
> > functionality with Django?
>
> I implemented "sticky superuser logins" about a year ago (the last
> time I worked with dja
OK, so how do I get the fb_settings to appear in the runtime Settings?
On May 26, 12:51 am, patrickk wrote:
> "change fb_settings.py" means that you can/should change the variables
> defined there.
> e.g., if you are not using a directory named "uploads", you have to
> take a look at fb_settings
On Tue, 2009-05-26 at 17:27 -0700, adrian wrote:
> This code creates a formset and populates fields with copies of
> date and start_time.
> The problem is, if num_events is X then it creates X forms but it only
> populates X-1 (it leaves the last one uninitialized). My question
> is why, and h
Part 3 tutorial from django site, suggest the below method of
optimizing urls.
Change from:
urlpatterns = patterns('',
(r'^polls/$', 'mysite.polls.views.index'),
(r'^polls/(?P\d+)/$', 'mysite.polls.views.detail'),
(r'^polls/(?P\d+)/results/$',
'mysite.polls.views.results'),
(r'^po
Hey,
As I was working my way through the tutorial (part 3), I ran into a
little problem.
When creating the HTML file with style descriptions (, ..),
the page doesn't render the styles but rather the actual code, i.e:
What's up?
instead of:
What's up? (in the correct style)
What am I doing wr
On Thu, May 21, 2009 at 10:45:06AM +1000, Brian May wrote:
> A frequent problem people seem to have with Django[1] is the default
> interface for selecting foreign keys is slow and clumsy to use if there
> are lots of selections. To the best of my knowledge there is no solution
> included with Dja
Hi Ankit,
Thanks for your comments.
-ds99
On May 26, 4:23 pm, Ankit wrote:
> ds99 wrote:
> > No that table name will be different every time based on some id. If
> > table name is same then there is no problem but the issue arises when
> > table names are different but the schema is same.
>
> >
As i said, that was one of the requirements.
-ds99
On May 26, 7:38 pm, Reiner wrote:
> I don't want to sound rude, I'm just curious, why do you need multiple
> tables with the same schema, but different names, in the first place?
>
> On May 26, 1:17 pm, ds99 wrote:
>
> > No that table name wil
On Wednesday 27 May 2009 04:22:12 Itai wrote:
> As I was working my way through the tutorial (part 3), I ran into a
> little problem.
>
> When creating the HTML file with style descriptions (, ..),
> the page doesn't render the styles but rather the actual code, i.e:
> What's up?
>
>
>
> instead
Hi,
I've got two fields, in a model object: "from_date" and "to_date". How
can I make the admin controller or model validate if the "from_date"
field has always a lower value than "to_date"? Both are
"django.db.models.DateField", but how can I create a validation between
them?
Thanks!
--~--
Thanks, Graham. So the conclusion is that zero Apache modules should be
necessary.
I suspect that after reading the docs before posting, but mainly I wanted to
confirm that here. And I suppose I should have just been more clear about
that from the start.
So, my working conclusion from reading the
Hi everyone,
I have a function Gquery, it works. But I don't know how to make it
work with form in html with django?
def Gquery(query):
conn=sqlite3.Connection(db)
c=conn.cursor()
out_=[]
query=query.strip().upper()
sql='select ...'
out=c.execute(sql)
out_.extend(out.
Ok sorry about that weird question - I figured it out now.
Thanks Kenneth!
On May 27, 6:54 am, Kenneth Gonsalves wrote:
> On Wednesday 27 May 2009 04:22:12 Itai wrote:
>
> > As I was working my way through the tutorial (part 3), I ran into a
> > little problem.
>
> > When creating the HTML file
Hi Alex,
On 26.05.2009, at 22:52, Alex Gaynor wrote:
>
>
> On Tue, May 26, 2009 at 3:41 PM, Sieker Adi Jörg
> wrote:
>
> Hi,
>
> I'm implementing some new urls in my ModelAdmin.get_urls method and
> I need access to the current models instance or id.
> I didn't find anything in the ModelAdmin
On May 27, 2:33 pm, Ben Welsh wrote:
> Thanks, Graham. So the conclusion is that zero Apache modules should be
> necessary.
>
> I suspect that after reading the docs before posting, but mainly I wanted to
> confirm that here. And I suppose I should have just been more clear about
> that from th
Thanks for your advice. It's much appreciated.
I've been encountering "too many file open" errors through Apache. I have a
thread open on httpd-users discussing the topic.
http://www.nabble.com/-users%40httpd--What-is-the-best-way-to-handle-%22too-many-open-files%22-errors--td23629492.html
To da
On May 26, 10:21 pm, tekion wrote:
> But what if
> you do not have a common prefix, would it still work? Thanks.
Sure, here is the reference:
http://docs.djangoproject.com/en/dev/topics/http/urls/#multiple-view-prefixes
sdc
--~--~-~--~~~---~--~~
You received t
On May 27, 4:17 pm, Ben Welsh wrote:
> Thanks for your advice. It's much appreciated.
>
> I've been encountering "too many file open" errors through Apache. I have a
> thread open on httpd-users discussing the topic.
>
> http://www.nabble.com/-users%40httpd--What-is-the-best-way-to-handle-...
>
The nabble link I provided has a lot of that stuff. The answers are prefork,
mod_python and the following. If you would recommend a switch to mod_wsgi,
could you please recommend the best guides for how and why? I'm always
interested in reading more on this topic that I can educate myself on the
op
Also, sorry to have missed the Q, I'm serving media from a separate machine.
On Tue, May 26, 2009 at 11:54 PM, Ben Welsh wrote:
> The nabble link I provided has a lot of that stuff. The answers are
> prefork, mod_python and the following. If you would recommend a switch to
> mod_wsgi, could you
81 matches
Mail list logo