You can set a prefix here:
http://code.djangoproject.com/browser/django/trunk/django/core/urlresolvers.py#L364
--
Andy McKay, @clearwind
http://clearwind.ca/djangoski
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
Olivier,
Look at this -
http://stackoverflow.com/questions/1057149/django-users-and-authentication-from-external-source
I imagine your problem comes from the fact that django.contrib.auth
User is tied to the DB
Sam
On Jan 18, 12:09 am, Olivier Détour wrote:
> up
>
> 2010/1/16 Détour Olivier :
I recommend this book - and the answer to your question is in chapter
8.
http://www.amazon.com/Practical-Django-Projects-Pratical/dp/1590599969
go ahead and get this one too
http://www.amazon.com/Python-Essential-Reference-David-Beazley/dp/0672329786/ref=pd_sim_b_4
and read http://diveintopython.
bells-n-whistles.net appears to be dead, but www.alwaysdata.com is
alive and providing excellent hosting, with a free option.
On Jan 17, 1:59 pm, alrobeler wrote:
> hi i ve heard you can provide with free django
> hostinghttp://www.jjude.com/2008/06/10/a-free-but-superb-django-hosting/
> if this
Hello,
I would like to have a table with optional pointers to other tables
items, generic relations would do it fine, the only problem seems to
be the fact that generic forreign keys don't accept null values.
Any hint or idea about why NOT NULL is enforced in this kind of relations ?
--
Alessa
On Mon, Jan 18, 2010 at 2:04 AM, Russell Keith-Magee wrote:
> On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box
> wrote:
> > On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee> Which raises the
> question of what the correct behaviour should be, so the
> > bug can report that it's not happening and
On Sun, Jan 17, 2010 at 7:18 PM, Chris Withers wrote:
> Alessandro Ronchi wrote:
>
>> I cannot use an SMS gateway for my app (I must use a SIM and an hardware
>> modem).
>>
>
> Why? This is not a sane requirement for a web app...
>
> Chris
Because of the number of the SMS I must write. I need a
On 18 Jan 2010, at 03:04 , Russell Keith-Magee wrote:
>
> On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box wrote:
>> On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee
>> wrote:
>>>
>>> On Sat, Jan 16, 2010 at 6:32 AM, Malcolm Box
>>> wrote:
>>>
It seems to me that Django should process PO
Hi guys,
I would like to announce the alpha release of LFC - a CMS based on Django:
- http://pypi.python.org/pypi/django-lfc
You will also find the installation instruction there.
Some documentation can be found here:
- http://packages.python.org/django-lfc/general/overview.html
Some first i
Hi,
In the ModelAdmin using inline forms I would like to know if it is possible
to save the inline instances first/before saving the instance edited by the
main ModelAdmin form.
Thanks for your consideration.
Kind regards,
Gabriel
Gabriel de Carvalho Nogueira Reis
Software Developer
+44 7907
On Mon, Jan 18, 2010 at 9:23 AM, Masklinn wrote:
> On 18 Jan 2010, at 03:04 , Russell Keith-Magee wrote:
> >
> > On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box
> wrote:
> >> On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee
> >> Which raises the question of what the correct behaviour should be,
I'm trying to implement a linked list of abstract objects in my
models.py; however, it is throwing an error.
--activenotes/models.py--
class Element(models.Model):
class Meta:
abstract = True
prev = models.OneToOneField('Element', null=True, blank=True)
next = models.OneToOneFie
On Sun, Jan 17, 2010 at 11:47 PM, Benjamin Welton <
benjamin.r.wel...@wmich.edu> wrote:
> Since the call structure goes similar to this Django Internals ->
> view_func1 -> authenticate_user. That return is required so that the Django
> internals see the HttpResponse Class. Without this return al
On Mon, Jan 18, 2010 at 3:58 AM, Alessandro Pasotti wrote:
> Hello,
>
> I would like to have a table with optional pointers to other tables
> items, generic relations would do it fine, the only problem seems to
> be the fact that generic forreign keys don't accept null values.
>
> Any hint or idea
On Mon, Jan 18, 2010 at 6:23 AM, Gabriel Reis wrote:
> In the ModelAdmin using inline forms I would like to know if it is possible
> to save the inline instances first/before saving the instance edited by the
> main ModelAdmin form.
>
Why do you want to?
It can't be done when you are adding a n
El 18/01/10 05:26, Kerrick escribió:
> I'm trying to implement a linked list of abstract objects in my
> models.py; however, it is throwing an error.
> --activenotes/models.py--
> class Element(models.Model):
> class Meta:
> abstract = True
> prev = models.OneToOneField('Element', n
Hi,
After having Django used a long time ago, I recently started a new
project, using "django-admin.py startproject". What I found
inconvenient is that in the default project layout, the templates and
the static media are so "far away" from each other.
What I mean is this: In the default structure
I think this would help you:
http://github.com/robhudson/django-debug-toolbar
On 17 jan, 14:51, oakmad wrote:
> What is the best way to debug templates when data is not showing?
>
> Here is my problem. I'm using Google App Engine with app-engine-patch
> so I realize it may not be a Django specifi
Thanks Eric, that worked like a charm. I've never got to use the update,
thus I had no idea of its existence, fair enough that is exactelly what I
needed.
Thank you very much, and other who have answered this thread.
Victor Lima
2010/1/16 Eric Chamberlain
>
> On Jan 15, 2010, at 4:22 PM, Victor
Also, I think you'll need to make those relations to a class that
isn't abstract. Right now you have a 'class Meta: abstract=True' That
means your model doesn't really exist for the relations to link to.
Hope that helps,
Alex
On Jan 18, 2:26 am, Kerrick wrote:
> I'm trying to implement a linked
There is also an online version of one of the django books here:
http://djangobook.com/
On Jan 17, 5:08 pm, pfwd wrote:
> Thanks fantastic thank you
> I was also able to do:
> result = obj.task_set.aggregate(Count('id'))['id__count']
> to get the a count of the tasks for quote
>
> I don't suppose
Hmm, you posted the save method for your Event model, but not the
definition. I think you haven't gotten any feed back because no one
really knows what you are asking. Could you show the Event model, and
then show what a finished save should look like? What should the data
end up like?
Alex
On Ja
Hi
Trying to use save_m2m as described here
http://docs.djangoproject.com/en/1.0/topics/forms/modelforms/#the-save-method
Though in run into an attrribute error 'Post' object has no attribute
'save_m2m'
*** Model ***
class Post(models.Model):
id = models.AutoField(primary_
On Jan 18, 10:01 am, GoSantoni wrote:
> Hi
>
> Trying to use save_m2m as described
> herehttp://docs.djangoproject.com/en/1.0/topics/forms/modelforms/#the-sav...
> Though in run into an attrribute error 'Post' object has no attribute
> 'save_m2m'
>
> *** Model ***
> class Post(models.Model):
>
On Mon, Jan 18, 2010 at 5:23 PM, Masklinn wrote:
> On 18 Jan 2010, at 03:04 , Russell Keith-Magee wrote:
>>
>> On Mon, Jan 18, 2010 at 8:14 AM, Malcolm Box wrote:
>>> On Sat, Jan 16, 2010 at 4:58 AM, Russell Keith-Magee
>>> wrote:
On Sat, Jan 16, 2010 at 6:32 AM, Malcolm Box
wrot
On Mon, Jan 18, 2010 at 2:59 PM, Alex Robbins
wrote:
> Hmm, you posted the save method for your Event model, but not the
> definition. I think you haven't gotten any feed back because no one
> really knows what you are asking. Could you show the Event model, and
> then show what a finished save sh
I suppose that you can do what you want, but in deployment static files like
js and css files are usually served by the front end (apache, for example),
while, despite the .html, templates are not static files, and should never be
served as is, only through the django template engine. It is reason
Probably need to solve the problem individually:
First problem: Performance.
Have you looked at using select_related[1] in your query? That might
speed up the loop since it would do all the lookups in one big query.
(It'll need more memory since it is loading it all at once, but it
will probably b
Trying to start dev server of django on mac os x with postresql
database.
bash-3.2$ ./manage.py runserver
Validating models...
Unhandled exception in thread started by
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/django/core/management/
commands/runserver.py", line
Thanks Karen..
Did not realize that "Running of the end of the code" in python
results in returning a None and not the last evaluated expression.
I wrote a small test case and realized what you said that without an
explicit return , python returns a None even though the evaluated
expression retur
Hi Nek4life,
Unfortunately that didn't work.
TypeError at /blog/new/
save() got an unexpected keyword argument 'commit'
Request Method: POST
Request URL:http://localhost:8000/blog/new/
Exception Type: TypeError
Exception Value:
save() got an unexpected keyword argument 'commit'
On Jan 18, 4:
Ensure it's the save() method on the FORM and not the MODEL. :)
On Mon, Jan 18, 2010 at 12:23 PM, GoSantoni wrote:
> Hi Nek4life,
>
> Unfortunately that didn't work.
>
> TypeError at /blog/new/
> save() got an unexpected keyword argument 'commit'
> Request Method: POST
> Request URL: http://lo
I didn't alter the model but the view
def new(request, form_class=BlogForm, template_name="blog/new.html"):
if request.method == "POST":
if request.POST["action"] == "create":
blog_form = form_class(request.user, request.POST)
if blog_form.is_valid():
I had a need for this at one point because my main model had an
overridden save method that would modify the inlines. But it didn't
work because the inlines weren't there. I had to reverse the save
method and put it on the inline model. But in my case, there was no
reason not to do that.
:Marco
Have you, perhaps, overridden the save() method of your model form, and
neglected to capture **kwargs and pass it on to the superclass method?
On Mon, Jan 18, 2010 at 1:23 PM, GoSantoni wrote:
> Hi Nek4life,
>
> Unfortunately that didn't work.
>
> TypeError at /blog/new/
> save() got an unexpecte
I do not understand how this would work.
The only place where /apps/ is mentioned is apache's config file.
WSGIScriptAlias /apps /export/home/web/docs/django/my_site/apache/
django.wsgi
There is nothing in my Django settings about /apps/.
Is there a setting that I can put in my Django settings?
Thanks for this link, I saw it Saturday.
But the problem is the same, I have to login to use template like that:
{% if user.is_authenticated %}
lol
{% else %}
not lol
{% endif %}
and my view.py is somethink like that:
username = request.POST['user']
password = request.POST['passw
Hi,
I'm trying to split tests.py into individual files into a tests/ subfolder, but
that doesn't work.
I correctly import everything from within tests/__init__.py, as previously said
on this mailing list:
http://groups.google.com/group/django-users/browse_frm/thread/10cfd65e398360d2/dae3a7226dccd
Here's a fantastic resource. It's what I used to switch to this methodology. It
talks you through exactly how to do this.
http://ericholscher.com/blog/2008/nov/4/introduction-pythondjango-testing-basic-unit-tests/
Shawn--
You received this message because you are subscribed to the Google Groups
On 01/18/2010 08:40 PM, Olivier Guilyardi wrote:
Hi,
I'm trying to split tests.py into individual files into a tests/ subfolder, but
that doesn't work.
I correctly import everything from within tests/__init__.py, as previously said
on this mailing list:
http://groups.google.com/group/django-use
On Jan 18, 7:17 pm, GoSantoni wrote:
> I didn't alter the model but the view
>
> def new(request, form_class=BlogForm, template_name="blog/new.html"):
> if request.method == "POST":
> if request.POST["action"] == "create":
> blog_form = form_class(request.user, request.POST
On 01/18/2010 09:19 PM, Reinout van Rees wrote:
> On 01/18/2010 08:40 PM, Olivier Guilyardi wrote:
>> Hi,
>>
>> I'm trying to split tests.py into individual files into a tests/
>> subfolder, but
>> that doesn't work.
>>
>> I correctly import everything from within tests/__init__.py, as
>> previousl
On 01/18/2010 08:59 PM, Shawn Milochik wrote:
> Here's a fantastic resource. It's what I used to switch to this methodology.
> It talks you through exactly how to do this.
>
> http://ericholscher.com/blog/2008/nov/4/introduction-pythondjango-testing-basic-unit-tests/
Oh yes, I found this one.
T
On Jan 18, 2010, at 3:50 PM, Olivier Guilyardi wrote:
> On 01/18/2010 08:59 PM, Shawn Milochik wrote:
>> Here's a fantastic resource. It's what I used to switch to this methodology.
>> It talks you through exactly how to do this.
>>
>> http://ericholscher.com/blog/2008/nov/4/introduction-python
On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote:
> Hi,
>
> I'm trying to split tests.py into individual files into a tests/ subfolder,
> but
> that doesn't work.
>
> I correctly import everything from within tests/__init__.py, as previously
> said
> on this mailing list:
> http://groups
On 01/18/2010 09:58 PM, Shawn Milochik wrote:
> On Jan 18, 2010, at 3:50 PM, Olivier Guilyardi wrote:
>
>> On 01/18/2010 08:59 PM, Shawn Milochik wrote:
>>> Here's a fantastic resource. It's what I used to switch to this
>>> methodology. It talks you through exactly how to do this.
>>>
>>> http:/
On 01/18/2010 10:04 PM, Ramiro Morales wrote:
> On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote:
>> Hi,
>>
>> I'm trying to split tests.py into individual files into a tests/ subfolder,
>> but
>> that doesn't work.
>>
>> I correctly import everything from within tests/__init__.py, as pre
Greetings,
I'm here to seek your help:
I'm new to Django (I have experience with Prado and Zope3 though).
Here is my problem:
I created a model having - among the other ones - a status field (approved,
draft, proposed, etc) and a reference to the user that created the instance.
I'd like to use Adm
This is something I've run into as well. If it's a forms.ModelForm, and you
instantiated it by passing an instance, you can access it like this:
{{ person_form.instance.last_name }}
Shawn--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
I have an application in which I'd like to present a form whose
elements are stored in a database. To be specific, the database
contains a series of questions that I'd like to ask the user, via
radio buttons.
I can't do e.g.
class thingee(forms.Form):
q1 = forms.BooleanField()
In your form's __init__ function, you can dynamically add items to its
self.fields. You can dynamically supply the label value as well, so what is
shown on-screen will be properly labeled.
So, you'd pull from your database, then create (in code) a field (such as a
forms.CharField or forms.Boole
On 01/18/2010 10:21 PM, Olivier Guilyardi wrote:
> On 01/18/2010 10:04 PM, Ramiro Morales wrote:
>> On Mon, Jan 18, 2010 at 4:40 PM, Olivier Guilyardi wrote:
>>> Hi,
>>>
>>> I'm trying to split tests.py into individual files into a tests/ subfolder,
>>> but
>>> that doesn't work.
>>>
>>> I correc
I'm having problems authenticating an http POST from a java applet
(which is loaded from a fully authenticated django view).
Does anyone have any idea how I could share the authentication of the
browser user with the applet which is loaded? Am i missing something
blindingly obvious here?
I am con
Hi guys,
How would I make it so that every page requires a login? Should I use
middleware or something like?
--
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...@googlegroups.com.
To unsubscribe from
Hi,
Will you help me please?
I've got a model called Card which has a ManyToMany relationship to
Tag. When I save a Card, I'd like to create a Product as well, which I
want to have the same ManyToMany relationship to tag.
How do I access the instance's tags? self.tags.all() gives an empty
list,
I did it with middleware. Here's my code.
http://pastebin.com/f52e6ef04
Make sure you provide exceptions for the login page, password reset,
static content, etc.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
On Mon, Jan 18, 2010 at 5:25 PM, Alex Robbins wrote:
> Hmm, you might also look at just doing something like
> Event.objects.values_list
> ('classes_involved__parent_disciplines__name', flat=True).distinct().
> That works on some relations, but I haven't tested it in your case.
I tried that and a
heya,
I'm trying to use an "Address" model as a generic relation against
multiple other models (e.g. in a "User Profile", for each User, as
well as for "Building", "Institution", and various other ones).
So I've added the content_type, object_id and content_object fields to
Address.
class Addres
On Monday 18 Jan 2010 3:37:08 pm Kai Diefenbach wrote:
> I would like to announce the alpha release of LFC - a CMS based on Django:
>
great - actually I had written a CMS a couple of years ago - but never had
time to polish it and release it. Yours seems to have almost exactly done what
I had b
Hi friends,
i am working with django1.1.1, now i want to connect django with
multiple database, could you people please help me how to achieve
this. if possible please send me the sample application using django
multiple db.. i tried it by reading some procedure in the net.. but i
cont able to ach
Victor Hooi wrote:
> class AddressAdmin(VersionAdmin):
> pass
> class AddressInline(generic.GenericTabularInline):
> model = Address
> ...
fields = (the fields you want to display)
or
exclude = ('content_type', 'object_id',)
> class HospitalAdmin(admin.ModelAdmin):
> inline
On Jan 19, 5:25 am, Victor Hooi wrote:
> heya,
>
> I'm trying to use an "Address" model as a generic relation against
> multiple other models (e.g. in a "User Profile", for each User, as
> well as for "Building", "Institution", and various other ones).
>
> So I've added the content_type, object_id
62 matches
Mail list logo