Hi,
a group of intelligent, but non computer-nerd people, asked me for help. They
want to build a community page:
- simple homepage/wiki
- news
- members with login
- mailing list
I develop with django daily. Since I don't want to reinvent the wheel,
I search django app which can handle mos
Thank you it was a big help. I ended up putting together myself the
example I wanted.
http://www.peachybits.com/2011/09/django-1-3-form-api-modelform-example/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Works perfectly, thanks :) Tested with a join 4 levels deep too and
it made just one query.
I use select_related elsewhere for more generic optimizations but it
hadn't occurred to me that django would need the hint once in
conjunction with an only() call. Perhaps a patch to ensure that the
appro
Hi John,
Use select_related [1] to tell Django to 'follow' the foreign key. Try
the following:
testmodels =
models.ATestModel.objects.all().select_related('other').only('other__name')
print testmodels[0].other.name
Regards,
Alasdair
[1]:
https://docs.djangoproject.com/en/dev/ref/models/qu
Hello.
I want to register users.
So I made a RegisterForm(ModelForm):
Class Meta:
model=User (from django.auten.contrib.User)
no i display that form in a view and submit it.
When i do form.is_valid(), i get this validation error: Your username
and password didn't match. Please try again.
Hey,
I'm trying to improve the performance of a Django app, and noticed
that you can't seem to properly defer fields when making lookups with
joins. To demonstrate, I set up a test project with the following
models:
class ATestModel(models.Model):
other = models.ForeignKey('OtherModel')
cla
Ohh - I actually didn't know this, thanks for giving a heads up :)
Cal
On Tue, Sep 27, 2011 at 8:21 PM, Andre Terra wrote:
> It doesn't hurt to remind him that methods that begin with _ are considered
> unstable API and are subject to change/removal without previous notice.
>
>
> Cheers,
> AT
>
It doesn't hurt to remind him that methods that begin with _ are considered
unstable API and are subject to change/removal without previous notice.
Cheers,
AT
On Tue, Sep 27, 2011 at 3:51 PM, Willem Romijn wrote:
> ob._state.db, according to this article:
>
>
> http://stackoverflow.com/questio
ob._state.db, according to this article:
http://stackoverflow.com/questions/4146781/does-a-django-model-know-from-which-database-it-was-loaded-and-how-can-this-info
2011/9/27 Juan Pablo Romero Méndez
> Hello,
>
> Suppose I get an object from a non-default database:
>
> ob = MyModel.objects.usin
Hope this helps.
>>> _r = SessionIP.objects.get(id=1000)
# figured this out by doing dir(_r._meta)
>>> _r._meta.db_table
'ddcms_sessionip'
# figured this out by looking at
https://docs.djangoproject.com/en/dev/topics/db/multi-db/
>>> _r._state.db
'nats_rw'
Cal
2011/9/27 Juan Pablo Romero Ménde
Hello!
We are developing Helicon Zoo – a repository of web frameworks and
applications for Windows and IIS ( http://www.helicontech.com/zoo/gallery/
). Currently we have Python 2.7.1 and Django 1.3 running under IIS 7.
Now we are filling repository with various Django applications. We
have alread
Hello,
Suppose I get an object from a non-default database:
ob = MyModel.objects.using('somedb').get(pk=1)
Is it possible later to retrieve the database name just from the object?
ob.db??
Regards,
Juan Pablo
--
You received this message because you are subscribed to the Google Groups
"Dj
django cumulus does this with the directory hierarchy just fine.
On Sep 26, 11:33 am, Kurtis wrote:
> Hey,
>
> I really want to build a storage back-end for cloudfiles. The snag is
> that cloudfiles containers do not allow for a hierarchical directory
> structure. Everything must be in a "base di
Great food for thought. Thank you for your help Tom!
--
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
django-users+unsubscr...@goog
On Tue, Sep 27, 2011 at 4:15 PM, David wrote:
> Hi Tom
>
> I had been using ajax on the form and thus hadn't got my traceback. I
> removed all ajax to get the traceback and it says:
>
> 'WSGIRequest' object has no attribute 'person'
>
> Relating to:
>
> f.person = request.person
>
> I guess. Do I
Found this snippet, have not tried it yet:
http://djangosnippets.org/snippets/431/
--
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
Hi Tom
I had been using ajax on the form and thus hadn't got my traceback. I
removed all ajax to get the traceback and it says:
'WSGIRequest' object has no attribute 'person'
Relating to:
f.person = request.person
I guess. Do I have to add a hidden field for the person id?
--
You received th
On Tue, Sep 27, 2011 at 4:06 PM, David wrote:
> Hi Tom
>
> I am unsure, yes it could be request.person that isn't populated. How
> can I pass that through my form submission ?
>
> Thanks for your reply.
>
How can you be unsure? What does your traceback say?
Debugging by guesswork is slow and err
On Tue, Sep 27, 2011 at 8:30 AM, Thomas Guettler wrote:
> it seems, that the django ORM can only do deletes which result in a lot
> of SQL-Queries to do "on delete cascade" in python code.
>
> https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete
>
> Is there a way to leave this up to
Hi Tom
I am unsure, yes it could be request.person that isn't populated. How
can I pass that through my form submission ?
Thanks for your reply.
--
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@
AFAIK you can only call delete() on each separate member of the result and
overwrite the models's delete() method where you decide wether to delete or
not.
Lucian
On Tue, Sep 27, 2011 at 4:30 PM, Thomas Guettler wrote:
> Hi,
>
> it seems, that the django ORM can only do deletes which result in
On Tue, Sep 27, 2011 at 3:55 PM, David wrote:
> Hopefully this will make sense.
>
> You are on a page displaying information about a Person. You want to
> add a log to this person so you fill in the form at the bottom of the
> page. When that form is saved to a log object both the user that has
>
Hopefully this will make sense.
You are on a page displaying information about a Person. You want to
add a log to this person so you fill in the form at the bottom of the
page. When that form is saved to a log object both the user that has
submitted the log, and the person to whom the log belongs
Still pretty new to Django. I'm trying to understand how to write django tests
and hit the following test failures in other installed apps.
1. Does the sekizai test failure mean that it expects settings to be in the
python path? My settings.py file does have TEMPLATE_DEBUG, why isn't setting
Good day.
To the case.
There are some models (simplified form):
class Group (models.Model):
name = models.CharField ()
class Person (models.Model):
name = models.CharField ()
groups = models.ManyToManyField (Group)
class Event (models.Model):
name = models.CharField ()
g
YOu can implement a virtual directory, we do it for our cloud files.
http://www.rackspace.com/cloud/blog/2010/01/26/nested-folders-in-rackspace-cloud-files/,
It's clearly documented on a number of sites, if you just serach for
it in google.
--
You received this message because you are subscribed
You can upgrade the "inspectdb" result with Django Autoadmin (
https://github.com/bancek/django-autoadmin ) which generates necessary
basic AdminModel classes on the fly, without the need for manual
definition and/or Django-specific DB tables (auth, for example).
This way you can be up and running
Sorry - I just realised this response would have been more appropriate
'off-list'. My apologies.
Cal
On Tue, Sep 27, 2011 at 3:13 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:
> Hi Jon,
>
> I've forwarded your info to a few clients of mine, to try and help
Hi Jon,
I've forwarded your info to a few clients of mine, to try and help spread
the word.
Might also be worth looking for Python/Django on LinkedIn - and contacting
people directly.
Cal
On Tue, Sep 27, 2011 at 10:19 AM, Jon Underwood wrote:
> Dear Django people,
>
> I'm looking for some work
On Tue, Sep 27, 2011 at 2:49 PM, NavaTux wrote:
> Thanks I have done the same way before seeing this valuable one.
>
> Let me ask you one more? ..Need to do some extra functioalities like
> the effects of Uploading file in gmail like that in django? any
> suggestions?
>
Google is full of tips and
Thanks I have done the same way before seeing this valuable one.
Let me ask you one more? ..Need to do some extra functioalities like
the effects of Uploading file in gmail like that in django? any
suggestions?
On Sep 26, 7:14 pm, Philip Mountifield
wrote:
> I would put the images in a seperate
I actually just wrote a blog post about why I think extending
contrib.auth.models.User is a better solution to using a OneToOneField
(or a ForeignKey), you can find it here:
http://ryanwest.info/blog/2011/django-tip-5-extending-contrib-auth-models-user/
Please let me know what you think.
Regards
Hi,
it seems, that the django ORM can only do deletes which result in a lot
of SQL-Queries to do "on delete cascade" in python code.
https://docs.djangoproject.com/en/1.3/ref/models/querysets/#delete
Is there a way to leave this up to the database?
I know that you can give the ForeignKey the on
So I've had a further look into this.
Firstly, I updated to PG 8.4, and found the the issue is still there.
Secondly I had a look at Matthias' code on github and tries a few hacks.
I found that clearing the caches on the opposite side of the many to
many relationship solved the problem.
E.g.
Hello friends,
i'm new with django. I've something to ask you.
I'm building a website similar to eBay where i've different "kinds" of
users. These are: CustomerUser and SellerUser. Both of them has
different data to be saved.
While reading docs and django book i noted the UserProfile
"trick" (ht
Thank you for the link but unfortunately it hasn't got me any further.
I believe I have my model set up correctly:
image_width = models.IntegerField(editable=False, null=True)
image_height = models.IntegerField(editable=False, null=True)
image = models.ImageField(upload_to='persons/%Y
On 27/09/2011 10:57, David wrote:
Hello
This is my view:
@login_required
@transaction.commit_on_success
def update_person(request):
try:
person_id = int(request.POST['person_id'])
except KeyError:
raise Http404
person = Person.objects.select_related().get(pk=per
Dear Django people,
I'm looking for some work experience to help me develop my Django
skills.
I'm available 2 days a week (generally Monday and Wednesday) between
10am and 5pm GMT for the next few months.
I've got a graduate Systems Engineering qualification and 1.5 years
ANSI C experience in a
Hi I'm developing django application that have multiple admin panels.
One for Admins one for customers one for our sales team.
So I figured out to not override code too much best is to make
validation on model level and that's possible with django 1.2.
I needed to check if postal town of contact
Hello
This is my view:
@login_required
@transaction.commit_on_success
def update_person(request):
try:
person_id = int(request.POST['person_id'])
except KeyError:
raise Http404
person = Person.objects.select_related().get(pk=person_id)
form = PersonForm(request.POS
On Sep 26, 2011, at 5:06 PM, Doug Ballance wrote:
> There are also a few third-party apps that can assist you with the
> form->query process such as this one:
>
> https://github.com/alex/django-filter
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django
41 matches
Mail list logo