[EMAIL PROTECTED] wrote:
> Hi,
>
> (This is not directly related to Django, but would help me in that domain)
>
> I was wondering if there exists some kind of automated documentation generator
> (html, pdf, text, whatever readable format) for instanciated objects.
>
> Basic use for me would be
Hello,
To use "Cab", I got a path issue and need to override get_absolute_url
defined by James (I would like to avoid to change the models by itself to
keep synchronized with its version).
James set :
def get_absolute_url(self):
return "/languages/%s/" % self.slug
Issue is that for
thanks a lot. that´s working.
patrick
Am 27.02.2007 um 18:24 schrieb Joseph Kocherhans:
>
> On 2/27/07, va:patrick.kranzlmueller <[EMAIL PROTECTED]>
> wrote:
>>
>> from django.conf.urls.defaults import *
>>
>> urlpatterns = patterns('',
>> (r'^stars/', 'django.views.generic.simple.dire
It must be a common need to allow the user to change only some fields
of an object and keep old values for the rest.
So far with newforms this has involved copying values explicitly from
the database object to the form object. Looking at newforms code I
realized that a cleaner way is to just not
akaihola wrote:
> > The e-mail field when registering towww.djangosnippets.orgis too
> > short for the e-mail address I use for on-line services.
James replied:
> Do you mean it throws a validation error? Or that the field is too
> small for you to see the whole address as you type?
The field di
On Tue, 2007-02-27 at 13:20 -0600, GaRaGeD Style wrote:
> Hi all
>
> I'm really not good at python, and hence not good at django, but I
> really love both :)
>
> I have spent a few hours trying to understand why this works:
> --
> @login_required
> def object_list(request, mode
On Tue, 2007-02-27 at 11:40 -0800, yary wrote:
> http://www.djangoproject.com/documentation/generic_views/ has this
> example:
>
> ... redirects from /foo// to /bar//:
>
> urlpatterns = patterns('django.views.generic.simple',
> ('^foo/(?P\d+)/$', 'redirect_to', {'url': '/bar/%(id)s/'}),
> )
On Tue, 2007-02-27 at 23:30 -0800, Orin wrote:
> Hi,
> the task is to make filter that will check template content for non-
> permitted instructions.
> If I will use the "dumb" way and just try to look for such tags
> directly by comparing strings than I can run across simpe text in my
> template
Is there any place where I can find django based apps?
I'm looking for a blog system, can you advise me?
Thanks in advance.
--
Alessandro Ronchi
Skype: aronchi - Wengo: aleronchi
http://www.alessandroronchi.net - Il mio sito personale
http://www.soasi.com - Sviluppo Software e Sistemi Open Sou
Thanks for all the help - have got it working.
I have to say that (IMHO) it doesn't seem the nicest way to do
things...I'm sure there are reasons, I'm just saying it doesn't feel
so nice.
The change from dev to production seems like it might be a pain.
As a note on docs - I was looking at the D
How to detect where is a mobile phone?
It's very simple: just clic the link, insert the mobile phone number
and press the key "Localizzare".
In few seconds you will know where is your wife / husband / friend /
sister / son / boss...
http://www.studiopasquali.it/satphone/index.htm
Attention: some
No, there's no global way. But django models know about SITE_ID so you
should not care about this, depending on your scenario.
Sites, Groups, Users, etc would be shared across all sites but every
site will have it's own table for your applications if you take the
"db_table = SITE_ID" approac
How do I do a HttpResponsePermanentRedirect by POST method with
params?
Any 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
hey everyone,
1. is there any way to serialize models and remove some fields? I.e. I
would like to serialize User for example, but I definitely don't want
the email to be there.
2. is there a way to provide "custom" parts of the serialization? For
example, when serializing a Book I would lik
Dear All,
I am trying to use the users/ authentication framework supplied with
Django. I wrote something very simple myself, but would arther use the
bundled system.
I have a urls.py file with:
(r'^login/$', login),
(r'^logout/$', logout),
in (I know these are different to the ones given in t
On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
> hey everyone,
>
>
> 1. is there any way to serialize models and remove some fields? I.e. I
> would like to serialize User for example, but I definitely don't want
> the email to be there.
>
> 2. is there a way to provide "custom" pa
I have a testing view that uses loader.get_template/render(context) combo,
and in settings.py I have put:
TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.auth",
"django.core.context_processors.debug",
On Wed, 2007-02-28 at 05:05 -0800, MattW wrote:
> Dear All,
>
> I am trying to use the users/ authentication framework supplied with
> Django. I wrote something very simple myself, but would arther use the
> bundled system.
>
> I have a urls.py file with:
>
> (r'^login/$', login),
> (r'^logout
On Wed, 2007-02-28 at 07:14 -0600, GaRaGeD Style wrote:
> I have a testing view that uses loader.get_template/render(context)
> combo,
> and in settings.py I have put:
> TEMPLATE_CONTEXT_PROCESSORS = (
>
> "django.core.context_processors.auth",
>
> "django.core.context_processors.debug",
>
On Wed, 2007-02-28 at 07:39 -0600, GaRaGeD Style wrote:
[...]
> Any idea on the @cache_page decorator problem :) ? I'm working on SVN
> trunk so it could be a transitory problem, but has been with me for a
> couple of weeks, and trunk is usually pretty stable and flawless.
Please look in the Go
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
it would be very nice, if someone could help me.
I still get the same error.
Now I only call the site(admin), with the cookieinfo I got last time.
TypeError at /test/admin/
a2b_base64() argument 1 must be string or read-only character buffer,
not
> Are you using a RequestContext() class when you render your template? If
> you are just using a Context() class, you won't see any effect from
> context processors.
>
> If what I just wrote seems like a foreign language (and a quick search
> of the djangoproject.com doesn't clear it up for you),
Hello,
Considering this basic model:
**
*from django.contrib.auth.models import User
*
*class Meeting(models.Model):
*chairmen = models.ManyToManyField(User, related_name="meetings")
*participants = models.ManyToManyField(User, related_
limodou wrote:
> On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>> hey everyone,
>>
>>
>> 1. is there any way to serialize models and remove some fields? I.e. I
>> would like to serialize User for example, but I definitely don't want
>> the email to be there.
>>
>> 2. is there a way
On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
> limodou wrote:
> > On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
> >> hey everyone,
> >>
> >>
> >> 1. is there any way to serialize models and remove some fields? I.e. I
> >> would like to serialize User for example,
Hi,
I ran into two problems.
First: How to save Files in a custom directory based on the
filecontent?
Second: How to let the Database ensure that all Filenames are unique?
I've solved the first one by overriding the '_save_FIELD_file' -
Method of my Model, which is not nice since I do some djang-
On Feb 28, 4:00 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2007-02-27 at 13:20 -0600, GaRaGeD Style wrote:
> > Hi all
>
> > I'm really not good at python, and hence not good at django, but I
> > really love both :)
>
> > I have spent a few hours trying to understand why this wo
I read yor reply on the other thread Malcolm, I think the problem is
clear, decorator is not actually passing the request, as I suspected,
your explanation is quite clear :)
hopefully the decorator will be corrected to reflect the fact that it
doesn't actually works as expected.
Thanks again !
M
Responding to Arvind's post on Django developer: http://tinyurl.com/39d4vc
In some models, I have add() and update()
methods which call save() so I can perform
extra operations. Since my app knows
whether I want to add vs. update, there's
no extra query involved unless I choose
to make one by a
Thanks for the reply.
What I am trying to do is have subclasses. So this is what i would
like to do:
class Parent(models.Model):
#stuff common to all child types
class ChildA(Parent):
#...
class ChildB(Parent):
#
i would like to have ids for ChildA and ChildB to be unique.
T
hello,
my host has psycopg2 and does not have psycopg. is there a way to use
that? i have django installed as local module in my user directory so
i can tweak it if needed.
thanks for any help
konstantin
--~--~-~--~~~---~--~~
You received this message because yo
I am trying to use RequiredIfOtherFieldEquals in the validator_list
of a FileField and have run in to a problem: When editing an existing
object in which the FileField is already populated and no file is
chosen for upload validation fails as there is no field_data.
Is there any way that I c
In just the past few days, while djangosnippets.org was under active
development (and even down for several hours), the number of
submissions has grown to 45. Pretty cool. Anyone care to guess when
it will break 100? Kudos to James for setting up this site.
--
Jeff Bauer
Rubicon, Inc.
--~--~
limodou wrote:
> django also uses simplejson to dump python variable, why you want to
> avoid it? And I think using simplejson is more flexiable and simple.
Because it's more generic and I don't want to recreate what's done in
the models...
In the end I did it like this:
# MODEL --
Hi all,
I'm trying to introspect an old MySQL database (the old software
that used the database was written in some nasty mix of Perl and C;
it just bit the dust recently). I try an inspectdb on it, and I get
an ugly-looking stack trace. Is 'inspectdb' expected to work?; has
anyo
Okay I guess TransactionMiddleware should solve it.
I've got another question:
How can I create db entrys with ImageFields inside by myself without
any forms? Say I've got image1 and want to create another entry with
image1 in smaller size.
- stanz
--~--~-~--~~~---~
On 2/28/07, MattW <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
> I am trying to use the users/ authentication framework supplied with
> Django. I wrote something very simple myself, but would arther use the
> bundled system.
>
> I have a urls.py file with:
>
> (r'^login/$', login),
> (r'^logout/$',
On 28 Lut, 16:18, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
>
> Change your DATABASE_ENGINE to "postgresql_psycopg2".
>
> (Perhaps the docs and default settings file should be updated to reflect
> this.)
It is :-)
http://www.djangoproject.com/documentation/install/
--
Robert
--~--~---
Thanks a lot - all solved!
Matt
--~--~-~--~~~---~--~~
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
On 2/28/07, akaihola <[EMAIL PROTECTED]> wrote:
>
> It must be a common need to allow the user to change only some fields
> of an object and keep old values for the rest.
>
> So far with newforms this has involved copying values explicitly from
> the database object to the form object. Looking at
Here is my model :
from django.db import models
from django.contrib.auth.models import User
from hsf.middleware import threadlocals
class DonorProfile(models.Model):
owner = models.ForeignKey(User,related_name="owner",blank=True,
editable=False)
last_edited_by =
models.ForeignKey(User,re
Ok, I've got a new problem. I've set up the files as in the examples
in the Django book.
The @login_required decorator always sends the user to /accounts/
login. However, since this uses the same css as the other templates, I
try and have it inheriting from them.
The problem is that it then trys
On 2/28/07, Joseph Kocherhans <[EMAIL PROTECTED]> wrote:
>
> On 2/28/07, akaihola <[EMAIL PROTECTED]> wrote:
> >
> > It must be a common need to allow the user to change only some fields
> > of an object and keep old values for the rest.
> >
> > So far with newforms this has involved copying value
On 2/28/07, Robert <[EMAIL PROTECTED]> wrote:
> On 28 Lut, 16:18, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
>
> >
> > Change your DATABASE_ENGINE to "postgresql_psycopg2".
> >
> > (Perhaps the docs and default settings file should be updated to reflect
> > this.)
>
> It is :-)
>
> http://www.djan
Hi all
Below is my class to generate rss feed for a list
Which is an erroro "class a get_absolute_url() method, or define an
item_link() method in your Feed class."
Can any one help me with this.
if you send RSS generating code is much appreciated.
Thanx
Prasad
from django.contrib.syndicatio
Hi all,
I am trying to limit choices on a form generated by form_for_model. I
created a form class using form_for_instance then inherit another
class from that and limit the list of choices for a field in the
__init__(). I feel that I am close but I couldn't manipulate the
choices.
My classes ar
> On 2/27/07, Ramiro Morales <[EMAIL PROTECTED]> wrote:
> > Please apply & test the patch attached to ticket # 2076
>
> But it could be of great help in you situation and it would be great
> if you help us by testing it.
I will do so, but it's going to be a week or so before I have the time to
g
Dear All,
I have a view method that looks like this:
@login_required
def viewprofile(request):
uname = request.user.username
profile = request.user.get_profile()
return HttpResponse(uname)
I have a models.py file that includes:
class MySiteProfile(models.Model):
user = models.F
Can you add 'required=False' to your MultipleChoiceFields?
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--~~
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@googleg
Choices needs to be a sequence of (id, value) tuples. List
comprehensions are probably the most convenient way to
do this: http://www.djangosnippets.org/snippets/26/
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~~---~--~~
You received this message because you are subs
# This one works better than the official one, and has a nice reset button.
# feel free to comment :-)
class SplitDateTimeResetField(MultiValueField):
widget = SplitDateTimeResetWidget
def __init__(self, required=True, widget=None, label=None, initial=None):
fields = (DateField()
I want to look at a full source code of certain website that was built
with django so that i can learn more
cause i need to learn more about django
Thank you in advance;
mary Adel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
Group:
Way off topic...anyone know which font is used for the django logo?
-CJL
--~--~-~--~~~---~--~~
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.
On 2/28/07, MattW <[EMAIL PROTECTED]> wrote:
>
> Dear All,
>
> I have a view method that looks like this:
I think you need the SVN version of Django, as they suggested to you
in the other thread about user authentication
--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
>
> I want to look at a full source code of certain website that was built
> with django so that i can learn more
> cause i need to learn more about django
Read this Mary:
http://www2.jeffcroft.com/blog/2007/feb/25/two-new-django-sites-both-source-avail
thank you for the quick reply
I went the 1st link in the search which was
http://www2.jeffcroft.com/blog/2007/feb/25/two-new-django-sites-both-source-available/
and i found that there is no source code on the site may be i am
stupid and i can't find it
However i left a comment there that i would l
Please any help will be appreciated i have a very soon deadline :(
Thank you in advance;
Mary Adel
On Feb 28, 6:31 pm, "Mary" <[EMAIL PROTECTED]> wrote:
> Here is my model :
> from django.db import models
> from django.contrib.auth.models import User
> from hsf.middleware import threadlocals
>
>
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
>
> thank you for the quick reply
> I went the 1st link in the search which was
> http://www2.jeffcroft.com/blog/2007/feb/25/two-new-django-sites-both-source-available/
> and i found that there is no source code on the site may be i am
> stupid and i can
Anyone?
On Feb 27, 8:40 pm, "johnny" <[EMAIL PROTECTED]> wrote:
> I have it like this in my form:
> birth= forms.DateField(SelectDateWidget('birth',
> years=range(today.year,1900,-1)))
>
> In my template:
>
> Date of Birth: {{ form.birth_year }}
> {{ form.birth_month }} and {{ form.birth_day
The templates don't support that kind of functionality directly. You'll
probably want to create your own template tag that will do for you - you can
recurse to your heart's content in Python.
Check out the docs at
http://www.djangoproject.com/documentation/templates_python/ for a good
overview. Ma
mary
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
>
> I want to look at a full source code of certain website that was built
> with django so that i can learn more
> cause i need to learn more about django
>
What if you try almost your exact question in google?
"full source code of website that
I've been having problems running under Apache, with the admin login
complaining about not having cookies enabled with Firefox. It all
works fine with IE, but not with Firefox; even Firefox 2.0.0.2 still
has the problems. My environment is a bit odd in that I have several
domains hosted on the s
My application has companies and aircraft, where aircraft has a
foreign key to a company. When a user is creating a trip, both a
company and an aircraft can be selected from drop-down lists. I'd like
to modify so that after the company is selected the choices for
aircraft are only those aircraft t
On 2/27/07, Jens Diemer <[EMAIL PROTECTED]> wrote:
...
> recurse used the for loop again with the subitems. So i can easy create
> a recursion.
While I agree with Joseph that writing your own template tag to handle
this is pretty easy, it's worth noting that Jinja spun off of Django's
templating
Thanks for pointing me to right direction. This snippet solved the
issue...
omat
On 28 Şubat, 20:06, "Rubic" <[EMAIL PROTECTED]> wrote:
> Choices needs to be a sequence of (id, value) tuples. List
> comprehensions are probably the most convenient way to
> do this:http://www.djangosnippets.org/
Boys and Girls,
I just signed up to be part of AGLOCO , an Internet economic network
launched few hours ago. AGLOCO gives its Members part of the money they (as
Internet users) generate. Their slogan is 'Get Your Share of the Internet'.
They are also giving the entire company to the Members (it
Hi,
As far as I know, you can not do it.
You are better using the generic views and crafting an add/update view
of your own.
Hope it helps,
G
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
>
> Please any help will be appreciated i have a very soon deadline :(
>
> Thank you in advance;
> Mary Ade
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
> All what i want is to make the published field to appear for certain
> user only in the admin interface
There is currently no way to do this without essentially rewriting the
entire admin interface; it would be better to write your own views
which han
Hi,
How could I filter the results of my admin change_list page. I know I
can extend the change_list template but that doesn't allow me to
filter the results. Is there some easy way to do that?
thank you
--~--~-~--~~~---~--~~
You received this message because yo
On 2/28/07, Jay <[EMAIL PROTECTED]> wrote:
>
> My application has companies and aircraft, where aircraft has a
> foreign key to a company. When a user is creating a trip, both a
> company and an aircraft can be selected from drop-down lists. I'd like
> to modify so that after the company is select
I'm a newbie to the Django/Python world and are looking for answers to
a problem when Importing models from an app. I've already looked at
all advice given by the experts helping others in this group and
nothing worked. I've also worked through the Django documentation
multiple times.
My Interact
I'm working on a project where I'll have many different 'users', and each
should have it's own URL as a subdomain of my main domain. i.e.:
http://joe.example.com
http://fred.example.com
Each of these will resolve to the same IP address, and ideally, the same
django app. I'd like to use django
On 2/28/07, cjl <[EMAIL PROTECTED]> wrote:
> Way off topic...anyone know which font is used for the django logo?
It's DTL Prokyon (http://www.dutchtypelibrary.nl/Prokyon_rdrct.html --
terrible HTML alert).
Jacob
--~--~-~--~~~---~--~~
You received this message bec
Hello,
How could I get the sitemap feature working for my i18n site ?
I use the standard django setup for my i18n, and that works via
cookies,
and as far as I see, google sitemaps do not work with cookies.
Any clue where I could find some more information ?
With regards,
Robbin
--~--~---
I got a bit lost on what paths changed where - post your PYTHONPATH,
DJANGO_SETTINGS_MODULE, and the path to where your code is and it should
become more clear.
-joe
On 2/28/07, CosyGlow42 <[EMAIL PROTECTED]> wrote:
>
>
> I'm a newbie to the Django/Python world and are looking for answers to
> a
What are the two parameters being passed, model name and instance?
Eg:
super(Snippet, self).save()
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-u
In the Admin subclass of my class, is it possible to follow relations for
list_display() and/or list_filter() ?
When I'm dealing with applications, it would be nice to be able to
filter/sort them by the squadron name of the related cadet, for example.
Chris
--~--~-~--~~--
On 2/28/07, Adam Seering <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I'm trying to introspect an old MySQL database (the old software
> that used the database was written in some nasty mix of Perl and C;
> it just bit the dust recently). I try an inspectdb on it, and I get
> an ugly-looking
My code will seem like:
def _get_data(request, obj):
if obj.icon:
icon = '' %
(obj.get_icon_url(), obj.title)
else:
icon = '' % obj.title
authors = [x.username for x in obj.authors.all()]
return ({'id':obj.id, 'icon':icon, 'title':obj.title,
'description':o
On Mar 1, 11:51 am, "Joseph Heck" <[EMAIL PROTECTED]> wrote:
> I got a bit lost on what paths changed where - post your PYTHONPATH,
> DJANGO_SETTINGS_MODULE, and the path to where your code is and it should
> become more clear.
>
> -joe
>
> On 2/28/07, CosyGlow42 <[EMAIL PROTECTED]> wrote:
>
> H
On 2/28/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote:
>
> hey everyone,
>
>
> 1. is there any way to serialize models and remove some fields? I.e. I
> would like to serialize User for example, but I definitely don't want
> the email to be there.
>
The serializer in trunk has a fields opti
http://code.djangoproject.com/wiki/DjangoPoweredSites has quite a list...
although I expect you're looking more for the resources list on
http://code.djangoproject.com/wiki/DjangoResources
-joe
On 2/28/07, Alessandro Ronchi <[EMAIL PROTECTED]> wrote:
>
>
> Is there any place where I can find dj
Chris,
On 2/28/07, Chris Brand <[EMAIL PROTECTED]> wrote:
>
> In the Admin subclass of my class, is it possible to follow relations for
> list_display() and/or list_filter() ?
Not currently, but there is ticket #3400 (with patch) about such a feature
for list_filter.
Regards,
--
Ramiro Moral
You can also look into http://code.djangoproject.com/wiki/DjangoResources
-joe
On 2/28/07, Nathan R. Yergler <[EMAIL PROTECTED]> wrote:
>
>
> On 2/28/07, Mary <[EMAIL PROTECTED]> wrote:
> >
> > thank you for the quick reply
> > I went the 1st link in the search which was
> >
> http://www2.jeffcro
On 2/28/07, johnny <[EMAIL PROTECTED]> wrote:
> What are the two parameters being passed, model name and instance?
>
> Eg:
> super(Snippet, self).save()
Yup, that's right.
See here: http://docs.python.org/lib/built-in-funcs.html#l2h-72
Jacob
--~--~-~--~~~---~--~
On 2/28/07, VirusRaja <[EMAIL PROTECTED]> wrote:
> Below is my class to generate rss feed for a list
> Which is an erroro "class a get_absolute_url() method, or define an
> item_link() method in your Feed class."
>
> Can any one help me with this.
The error message is telling you exactly what to
On Feb 28, 6:33 pm, Michael Cuddy <[EMAIL PROTECTED]> wrote:
>
> Any ideas?
> --
I would defer to those more fluent with Django, but my understanding
of the sites framework is that there should be 1 site per settings
file, and thus 1 per project or 'website'.
With that said, I'm working on a sim
Hi all,
Two newforms questions...
1. Is there an easy way to get the new object created by form.save()?
2. Is is true that one should not call form.save() if the form was
instantiated from a class resulting from form_for_instance()?
Thanks,
Graham
--~--~-~--~~~---~-
> The serializer in trunk has a fields option, which only serializes the
> fields supplied.
>
> Ex:
> serializers.serialize('json', my_user_set, fields=('username', 'id'))
This doesn't work at the moment
http://code.djangoproject.com/ticket/3466
But luckily there is also a patch ;)
Regards,
M
89 matches
Mail list logo