Hi All,
Others have experiemented with using the zope component architecture
in Django, with great results:
http://www.stereoplex.com/two-voices/adapters-in-django-and-the-revenge-of-zope
I'd really like to make use of it too, but I'm finding whenever I say
one of my Django models implements
> It seems like I need to reference the session_key variable before I
> can use it. Can anybody explain why?
Well, I'll try. I spent sometime looking at
django.contrib.session.backends.*
The session is created in a 'lazy' fashion. In particular, db.py's
load() method creates the record (and
I usually refrain from posting this kind of information to this list,
but I thought that this has enough general interest to be something
that people might want to be aware of.
Each week we have a podcast called This Week in Django that discusses
the weekly events within the Django community. We
Hi All,
I'm sure I'm missing something obvious here, but I'm relatively new to
Python programming and to Django, so I'd appreciate any help that you
all have to offer.
I'm writing a function that takes in a username and password via a
SOAP method (this all works well), authenticates the user,
Thats not particularly a concern for me, or most users, but I guess if
you or your users use opera, that would be a deal-breaker. Since Opera
is used by a very very small percentage of web users, I don't think it
would be a major problem in most use cases. Just my .02
p.s. FCKeditor's connector
> I have the main page
> that will display multiple sections that are each individuals apps.
My first question is: do they update anything after the initial data
fetch? If not, why not just build the page on the first GET (using
template includes, etc.) and be done with it.
> One obvious
You interested in answering the first part of my post? I can't really help
you with information like this...
2008/4/21 jeffself <[EMAIL PROTECTED]>:
>
> I don't think thats it because if I reverse the order of the url's in
> the root urls.py file and put precincts before elections, then
>
On 22-Apr-08, at 4:00 AM, jmDesktop wrote:
> (r'^contact/thanks/(.)/$','mysite.books.views.thanks'
(r'^contact/thanks/(?P.)/$','mysite.books.views.thanks'),
will direct to the thanks function which you call as:
def thanks(request,sender)
and this thanks function loads the thanks template
On Apr 22, 2008, at 01:30 , jmDesktop wrote:
>
> What I have in my urls.py file is:
>
> (r'^contact/thanks/(.)/$','mysite.books.views.thanks'),
try this:
(r'^contact/thanks/(?P.*)/$','mysite.books.views.thanks'),
The idea is to capture the sender part of the URL and pass it on as
the
On 22-Apr-08, at 2:44 AM, Jon Lesser wrote:
> I tried to open a trac ticket on this, but it thinks I'm a spammer.
fill in your profile or register at the site and it will accept you
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/code/
Berco Beute wrote:
Is there something like a 'CommaSeparatedEmailField'? I know there is
a CommaSeparatedIntegerField, which is rather handy...
I don't believe that there is a multiple e-mail field, but I imagine it
would be super easy to write one.
Jeff Anderson
signature.asc
I don't think thats it because if I reverse the order of the url's in
the root urls.py file and put precincts before elections, then
precincts items work correctly but the election items point to
precincts rather than elections.
On Apr 21, 3:52 pm, Michael <[EMAIL PROTECTED]> wrote:
> How are
YES!
This is exactly what I was looking for. Thank you very very much!
As an aside, I managed to do this differently, although of course, is
not elegant and introduces a lot of clutter. What I did was inside my
app folder, I created folders for every model that I was gonna CRUD,
then a views.py
Hi, I am trying to understand how URLconf works and why I am failing
at a simple task. I have this in one my .py files (larger snippet is
an email responder from djangobook chap7):
return HttpResponseRedirect('/contact/thanks/%s' % sender )
What I have in my urls.py file is:
There is absolutely no reason that you have to use views to serve your
views. For example I have an app that has both brands and products. For that
I have brandviews.py and productviews.py. I do the same for my urls.py
files. It makes life easier when everything is separate. Then you can have
your
Not sure, but I think WordPress versions are named with jazz players.
Greets.
Juanjo
--
mi blog: http://www.juanjoconti.com.ar
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
James,
have a look here:
http://www.djangoproject.com/documentation/model-api/#list-display
//Thomas
Am 22.04.2008 um 00:07 schrieb jwwest:
>
> Wow, awesome. Thank you!
>
> On the same subject, is there a way to display more information on the
> record in the listing rather than just one
Is there something like a 'CommaSeparatedEmailField'? I know there is
a CommaSeparatedIntegerField, which is rather handy...
2B
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Actually, NVM. Right after I asked this I found the answer in the
Django Book.
Thank you.
- James
On Apr 21, 5:07 pm, jwwest <[EMAIL PROTECTED]> wrote:
> Wow, awesome. Thank you!
>
> On the same subject, is there a way to display more information on the
> record in the listing rather than just
Wow, awesome. Thank you!
On the same subject, is there a way to display more information on the
record in the listing rather than just one column ? For instance, say
I have a 'sales table' and I want to list the sales number as the
first column, then the customer name and so forth. Do I need to
Hi James
define a __str__ or better __unicode__ method within your model which
returns the correct string.
i.e.
def __unicode__(self):
return self.name
//Thomas
Am 21.04.2008 um 23:55 schrieb jwwest:
>
> Hey all,
>
> I'm not sure what I'm doing wrong in my models file, but when I add
Hey all,
I'm not sure what I'm doing wrong in my models file, but when I add a
record in admin, all records are titled [name of model] object. This
is a problem especially in related tables since there's no way to tell
them apart.
What do I need to add and where?
Thanks
-James
That was the problem. I misunderstood the documentation when it said to
change projectname.settings to the name of my settings file.
I appreciate the help!
Thanks.
On Mon, Apr 21, 2008 at 5:41 PM, Thomas Kerpe <[EMAIL PROTECTED]>
wrote:
>
> >
> Hi khayman,
>
> Replace:
> SetEnv
>
Hi khayman,
Replace:
SetEnv DJANGO_SETTINGS_MODULE settings.py
With:
SetEnv DJANGO_SETTINGS_MODULE projectname.settings
//Thomas
Am 21.04.2008 um 23:06 schrieb khayman:
>
> I have installed Apache, modpython and Django via apt-get. Apache and
> modpython are working (I can serve normal
On Mon, Apr 21, 2008 at 5:07 PM, Justin Lilly <[EMAIL PROTECTED]> wrote:
> I believe there is also a google-code application called Coltrane-blog.
Also, http://code.google.com/p/cab/
-Gul
--~--~-~--~~~---~--~~
You received this message because you are subscribed
It seems that if there are no entries for a particular month, the
archive link to that month results in a 404.
http://www.djangoproject.com/weblog/2008/apr/ <--Works
http://www.djangoproject.com/weblog/2008/mar/ <--404
I tried to open a trac ticket on this, but it thinks I'm a spammer.
I believe there is also a google-code application called Coltrane-blog.
On Mon, Apr 21, 2008 at 5:00 PM, bfrederi <[EMAIL PROTECTED]> wrote:
>
> I am curious as to what other Django based projects are named
> something to do with other jazz people (such as Django, Ellington, and
> Satchmo)? I
I have installed Apache, modpython and Django via apt-get. Apache and
modpython are working (I can serve normal files and python script
output). However, I am unable to serve the initial Django project.
Here is the httpd.conf:
Code:
SetHandler python-program
PythonHandler
I am curious as to what other Django based projects are named
something to do with other jazz people (such as Django, Ellington, and
Satchmo)? I think it's a cool convention, but those are the only 3 I
can think of when I am trying to tell people about it.
Thanks,
Brandon
I can't use the admin module because I am working with Google App
Engine...
On Apr 21, 3:15 pm, Peter Rowell <[EMAIL PROTECTED]> wrote:
> > This works but looks really ugly...
>
> Agreed.
>
> Is there some reason you can't use class Admin in your models?
>
> More than one person has observed
> This works but looks really ugly...
Agreed.
Is there some reason you can't use class Admin in your models?
More than one person has observed that Django's auto-generated admin
interface is its Killer App. It's integrated with the
django.contrib.auth authentication app, and it's even
There are any number of Cheap Hacks you can do to make this simpler.
In the view (or possibly using the {% expr %} tag (See
http://www.djangosnippets.org/snippets/9/)), set a variable called
in_news_archive to "-active" if you are in that section, and '' or
None if you aren't.
If this is a
How are you getting the URL? Is there something in your models that is
defining the absolute URL? or are you using the Revese lookup?
Chances are because they are just copies of one another that you forgot to
change one of the files and they still have the get_absolute_url referring
to the
(Warning: still very much a Django newbie)
I'm having a bit of trouble conceptualizing this. Say I have an app
that has two models: A and B. Both need to have CRUD views. What's the
preferred way of doing this?
One way I can think of is in urls.py, separate by URL and method name
like so:
> Since you are using jQuery (my favorite JS library), take a look at
> the taconite plugin.
> Home page:http://www.malsup.com/jquery/taconite/
> It makes page mods almost trivial to do.
Very cool plugin. I will be implementing that shortly.
So if I could get an opinion on this logic... I have
> forms.ModelMultipleChoiceField(queryset=Submission.objects.all())
>
> how can I make the queryset use Submission.objects.filter rather than
> objects.all ?
I have not used formtools, but just from looking at the above line I
wonder if you tried:
On Mon, Apr 21, 2008 at 1:06 PM, Peter Rowell <[EMAIL PROTECTED]> wrote:
> From http://www.djangoproject.com/documentation/templates/#variables
>
> If you use a variable that doesn't exist, the template system will
> insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is
> set
Just an additional note:
This will be going ahead. I'm organising the London Django User Group
with Simon Willison. There are a few things to iron out and i'll keep
everyone posted.
Regards
Rob
On Apr 21, 8:58 am, "Joe Bloggs" <[EMAIL PROTECTED]> wrote:
> I live in St Albans but I am
On Apr 21, 2:29 pm, jmDesktop <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to change the admin template from chapter 6 of
> djangobook.com. How can I change the admin template from:
>
> {% trans 'Django administration' %}
>
> to
>
> {% trans 'Bob's administration' %}
>
> I can't put the
jmDesktop,
On Mon, 21 Apr 2008, jmDesktop wrote:
> {% trans 'Bob's administration' %}
One can find examples of using the trans template tag about 1/4 of the way
down the Internationalization documentation page:
http://www.DjangoProject.com/documentation/i18n/
For the above it looks like:
On Apr 21, 2:13 pm, ydjango <[EMAIL PROTECTED]> wrote:
> Django is a pretty good framework for server side web development.
>
> client side Web development is also very time consuming and painful.
>
> For Web Client side development, are there any good web ui frameworks
> which can make
Hi, I'm trying to change the admin template from chapter 6 of
djangobook.com. How can I change the admin template from:
{% trans 'Django administration' %}
to
{% trans 'Bob's administration' %}
I can't put the apostrophe single quote in there. I tried \' and
, but it did not work. Thank
On Apr 19, 3:29 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am worried about how to model the next scene (this is an example, but
> an appropriated one): In the model we have People, and there are
> different kind of people, let's say: Professors, Students and Other.
> Each
Django is a pretty good framework for server side web development.
client side Web development is also very time consuming and painful.
For Web Client side development, are there any good web ui frameworks
which can make developing look and feel and ui of a web site as easy
and as productive as
From http://www.djangoproject.com/documentation/templates/#variables
If you use a variable that doesn’t exist, the template system will
insert the value of the TEMPLATE_STRING_IF_INVALID setting, which is
set to '' (the empty string) by default.
So you could at least define this to be something
I will look into it thank you.
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to
Thanks, I take a look at your ideas...
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send
> if I include the template tags within the html, will
> that still be parsed? Or would it be wiser to call a .py script that
> will return html after all the object calling is done?
I think you might need to work on your model of how things work.
Template tags are only meaningful to the
> Authentication works perfectly on the latter method. Why would one
> work but not the other?
Because they are two different models that are unrelated except for
Userprofile having a ForeignKey to User. Just as with Userprofile, if
you modify the User record you have to explicitly save() it.
Thanks for the response. So regarding how to inject html via ajax
(using jquery) if I include the template tags within the html, will
that still be parsed? Or would it be wiser to call a .py script that
will return html after all the object calling is done?
Uhm, you could use . However, you
eat the overhead of a second breowser<=>server chat, so I would
investigate ways to directly include your news item in a larger
template. The higher the volume of your site, the more that second
chat will hurt you.
AJAX is appropriate if you are going to be
Kenneth Gonsalves escribió:
>
> On 21-Apr-08, at 8:15 PM, Michael wrote:
>
>> What about using the count() method on a filtered subset to get your
>> id?
>>
>> Eg:
>> p = People(type="S")
>> p.id = People.objects.filter(type=p.type).count() + 1
>
> I dont know what the context of this is,
> This not happend in dev mode with the webserver of django.
That's an important observation to make because it limits the places
where this might be happening.
Firefox has an excellent plugin, Live HTTP headers, that can give a
little more insight into what is happening. The following was
The way i have it setup now is that when i go to the url (news/) i
defined for the html snippet, it calls a generic view of the
object_list. I configured all the CSS for it so it looks good. Now
that I have a working model of the app, is there a way to simply
include or call the url into another
So I have created a user profile model the extends the User model. I
am having issues with trying to authenticate. So I gather some
information and and attempt to save it out but when I go to
authenticate shorty after, the auth.authenticate does not return a
user object therefore not logging the
Show me -- Settings.py
2008/4/21, jeffself <[EMAIL PROTECTED]>:
>
>
> I've got a project that contains two apps (elections and precincts).
> My root urls.py looks like this:
> from django.conf.urls.defaults import *
> urlpatterns = patterns('',
> (r'^elections/',
On 21-Apr-08, at 8:15 PM, Michael wrote:
> What about using the count() method on a filtered subset to get your
> id?
>
> Eg:
> p = People(type="S")
> p.id = People.objects.filter(type=p.type).count() + 1
I dont know what the context of this is, but this would only give the
id if you
Unless something has changed since.96 you should be able to access
initial and bound data directly. They are stored in dicts on the form
object called 'initial' and 'data'
form.data.fieldname (this is pre-cleaned bound data)
form.cleaned_data.fieldname (post clean if valid)
AFAIK that JS date picker is only available in the admin interface.
rendering a form as {{ my_form}} does not print that date picker
either.
I'd be interested in knowing how to get it to show up too (what JS/CSS
files need to be added, whether there is some setting we can use in
the python code
Hello !
I have a model that I try to edit with a ModelForm. This model has a
DateField property. I render the form in my template with a simple :
{{ form.as_p }}
I expected the DateField to be displayed as in the admin interface,
with a javascript date picker. But I only get a text field. The
http://www.djangoproject.com/documentation/newforms/#customizing-the-error-list-format
documentation ftw :)
On Mon, Apr 21, 2008 at 5:15 AM, J. Pablo Fernández <[EMAIL PROTECTED]> wrote:
>
> No ideas on this?
>
>
>
> On Apr 6, 2:38 am, J. Pablo Fernández <[EMAIL PROTECTED]> wrote:
> > Hello,
Thanks for writing back, Karen. I guess the snippets of code I
inserted were a little misleading. I have many other modelforms too,
which all have a user = ForeignKey(User) defined. Problem is that I
have to use multiple instances of these forms (for example, I need I
have a ModelForm called
Hi,
I have http://www.paradondevamos.com/imagen/ (imagen is the spanish
name of image) and always get converted to /images so I get a 404 for
all the urls.
I have this in my urls:
(r'^imagen/', include('shared.multimedia.urls-image')),
I don't have rewrite rules in apache, and not have a
Hello,
What is the best practice in naming templatetags modules in the
following situation?
I have an application named "foo". It lives as a top-level Python
package. Its views are foo.views, its models are foo.models, etc. I
waht this application to define some templatetags. The most
Hi all - being new to Django I've started to define my first template. The
issue that I am having is when I simply want to get a value from a form
object (rather than the whole string).
I can get around this by passing in extra values in the render_to_response
command in the views.py file
I've got a project that contains two apps (elections and precincts).
My root urls.py looks like this:
from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^elections/', include('elections.urls')),
(r'^precincts/', include('precincts.urls')),
(r'^admin/',
No idea ?
Can't I use generic view in this case ? :-/
On 18 avr, 00:11, picky <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to usegenericview in my app and I have some problems with
> objects related to the logged user.
>
> Here is a simplified version of my models :
>
> class
Hello All,
I am writing an app that includes Messaging and I would like to give
users the ability to attach other system objects to the messages that
they send. The FormWizard stuff is fabulous, but I would like to limit
a queryset used in one of the forms here are my Mail forms:
class
Hi all,
I'm new to working with Django so forgive my newness. I'm reading
through chapter 10 of the free online django book, and I've come
across the statement that filter should silently ignore errors. I
disagree with this. I think they ought to raise exceptions, and the
site should be
i often find myself thinking "there must be a better way" when
creating site navigation that has different images for normal/active/
hover link.
so if my current location is "/news/archive", what i usually do is:
- define current_view="news_archive" as variable for template
- in template,
Constantin Christmann schrieb:
> Hello,
>
> I am using ModelForm for auto-generation of my input forms. It saves me
> much time to use this, but is there a way to apply additional attributes
> to the generated form.
> I mean the kind of attributes I can define with
>
> attrs={'class':'special'}
What about using the count() method on a filtered subset to get your
id?
Eg:
p = People(type="S")
p.id = People.objects.filter(type=p.type).count() + 1
Michael
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
André,
On Mon, 21 Apr 2008, Andre Meyer wrote:
> btw I am using the 0.96.1 release. Does that still use old_forms? Have
> not yet looked into old/newforms...
Yes it does. At the moment to use newforms-admin, one has to check out
the newforms-admin branch from SVN. If you'd like to find out
Thanks again dallas and kenneth,
Kenneth's comment about the clean process sent me back to the docs. I
was using form.cleaned_data to do my own integrity checking, but I
didn't realize what was truly available from the clean methods.
Handling the validation with custom form methods does seem
Thanks i got it .
a=Page.objects.all()
for one in a:
print one
>>[a,a1,a2]
:D
>
> >
>
--
deSign thE fuTure
http://www.freeis.cn/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
I have it implemented without new forms for now. Anyone have an idea
how I could do it with new forms?
On Apr 18, 5:11 pm, Raisins <[EMAIL PROTECTED]> wrote:
> I am trying to create a dymanic MultipleChoiceField with the
> CheckboxSelectMultiple widget. The thing I want different, is the all
>
On Sun, Apr 20, 2008 at 10:45 AM, Hilbert Schraal
<[EMAIL PROTECTED]> wrote:
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '[EMAIL PROTECTED]@d(5w+m)kpcjffne(pvb+#6w2s_pz*5)b%$f'
As an aside, note the comment: "don't share it with anybody" It's good
that you cleaned the
On Mon, Apr 21, 2008 at 2:53 AM, Rishabh Manocha <[EMAIL PROTECTED]> wrote:
>
> Hey Guys,
>
> I have 4 models working something like this:
>
> class User(models.Model):
> name = models.CharField()
> email = models.EmailField()
> ...
>
> class A(models.Model):
> domainname =
I posted this a second ago but it didnt seem to post. ah well.
I have it working without newforms. Just a bunch of check boxes and a
loop over c.m2mModel2.all() I then just capture the post data and
figure out what I want to do in the view. I would really like to new
this in newforms and take
> My favorite is FCKeditor. Its formatting of source code is really
> clean and semantic. I have come to hate TinyMCE because it jumbles
> source code and uses too many tags at times. Try it out, you may like
> it a lot.
I've tried it and it seems it does not work with Opera...
El dom, 20-04-2008 a las 12:13 +0530, Kenneth Gonsalves escribió:
>
> On 20-Apr-08, at 12:03 PM, lee wrote:
>
> > Do the designers use text base editting like ultraedit or
> > or graphics based software like dreamweaver? Most of the artist I know
> > don't do much coding and are into
El dom, 20-04-2008 a las 12:13 +0530, Kenneth Gonsalves escribió:
>
> On 20-Apr-08, at 12:03 PM, lee wrote:
>
> > Do the designers use text base editting like ultraedit or
> > or graphics based software like dreamweaver? Most of the artist I know
> > don't do much coding and are into
When you retrieve a row (aka, a model instance), it will be an object
with attrs a, a1, aN.
I'm not sure I got your point, though.
~ Chris
El lun, 21-04-2008 a las 01:11 +0800, 小龙 escribió:
> Just as in table Test:
> name url sizetime
> a a1 a2 a3
>
Hi everyone,
I have my code like this:
class OrderedItem(models.Model):
owner_list = models.ForeignKey('OrderedList',
related_name='items')
order = models.IntegerField()
...
class OrderedList(models.Model):
# Reset orders
an_ordered_list =
Hi Kevin
Thanks a lot for this. It does indeed work in this way which is MUCH better
than my ifequal solution.
btw I am using the 0.96.1 release. Does that still use old_forms? Have not
yet looked into old/newforms...
thanks and cheers
André
On Sat, Apr 19, 2008 at 1:02 PM, Kevin Monceaux
Please follow the django documentation, section named 'Install the
Django code'.
It's located here:
http://www.djangoproject.com/documentation/install/
Make sure that you follow the part 'Installing the development
version'.
And don't forget to 'Remove any old versions of Django' before
As far as I know, "Psyco" will not have feature enhancements:
You can read here http://psyco.sourceforge.net/introduction.html:
I will not continue to develop it beyond making sure it works with
future versions of Python
I think you can use it without fear, but I have never used it in a
hang on, I may have found the answer here:
http://groups.google.com/group/django-users/browse_thread/thread/8933164dfc790200/f7ef4498f1391aac?lnk=gst=link+class+to+user#f7ef4498f1391aac
On Apr 20, 8:29 pm, chiefmoamba <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a model in models.py as shown
I live in St Albans but I am travel into London a few times a month so I
wouldn't mind a meetup. My main criteria for the meetup would be that the
pub has some real ale!
That is assuming that people who want to attend are over 18.
On Fri, Apr 18, 2008 at 9:17 PM, siudesign <[EMAIL PROTECTED]>
Doh! thanks that fixed it man I feel stupid now :)
On Apr 21, 12:03 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-04-20 at 23:43 -0700, Russ wrote:
> > Im trying to learn django and I appear to be running into an issue
> > with python manage.py dbshell I am getting the
I don't know if this answers your specific question, but this is being
worked on, apparently - http://code.djangoproject.com/ticket/5361.
I had a similar requirement, where I wanted to dynamically append a
model field to the filename before saving it. I ended up getting the
model field's value
On Sun, 2008-04-20 at 23:43 -0700, Russ wrote:
> Im trying to learn django and I appear to be running into an issue
> with python manage.py dbshell I am getting the following error can
> anyone shed some light on this for me, Im at a loss
>
> Im running MAC OSX 10.5.2 Leopard
> I have installed
Hey Guys,
I have 4 models working something like this:
class User(models.Model):
name = models.CharField()
email = models.EmailField()
...
class A(models.Model):
domainname = models.CharField()
class B(models.Model):
domain = models.ForigenKey(A)
name = models.CharField()
Im trying to learn django and I appear to be running into an issue
with python manage.py dbshell I am getting the following error can
anyone shed some light on this for me, Im at a loss
Im running MAC OSX 10.5.2 Leopard
I have installed the MySQLdb
Thank You
$ python manage.py dbshell
94 matches
Mail list logo