On Apr 11, 2010, at 5:58 AM, ydjango wrote:
I find all my view method have identical code in start and in end:
anyway to avoid repetition...?
Example:
def typical_view_method(request):
Check if user is authenticated.
Get user and group
Get some session variables
try:
Method s
On Jul 18, 2010, at 7:19 PM, Biju Varghese wrote:
Eclipse is the best IDE for python and django.
On Jul 17, 8:53 pm, Jitendra Joshi wrote:
What is the best open source Django IDE ?
I would say VIM, too. Emacs should be very good too, but I've never
used it. Their advantage:
1) you can use
Dear Kostia
On Jul 28, 2010, at 2:29 PM, kostia wrote:
I have a model Favourite with fields User, Project, Date, what means
that some user put some project as favourite on some date. I take all
favourites filtered by this user and I want to INNER JOIN that info
with Project model. How can I do t
On Jul 28, 2010, at 5:19 PM, kostia wrote:
Thank you very much Roald,
What is faster:
projects = Project.objects.filter(favourites__user = request.user)
or
select_related('project')
?
I think it doesn't matter much, but if one is faster, it should be the
first one. If you only use the
On Jul 28, 2010, at 6:02 PM, kostia wrote:
Well, I used
projects = projects.filter(favourites__user = request.user)
And then I tired to order by 'date' field, which is in the Favourite
model like here:
projects = projects.filter(favourites__user =
request.user)#.order_by(filter_field)
And it
Hi Wadim,
On Jul 27, 2010, at 6:51 PM, Wadim wrote:
Hello.
I have a list that i want to present in a table.
Each row should have 5 items.
For now i create the function that returns me new grouped list, that i
use later in a template.
def groupListByRow(list):
cnt=0
rows=[]
Dear all,
I have the following error, and don't know what it means:
Error: One or more models did not validate:
update.personupdate: 'address' has a relation with model Address,
which has either not been installed or is abstract.
I did a pretty big refactoring, but I think the proble
On Aug 5, 2010, at 3:00 PM, Emily Rodgers wrote:
On Aug 5, 1:50 pm, Roald de Vries wrote:
Dear all,
I have the following error, and don't know what it means:
Error: One or more models did not validate:
update.personupdate: 'address' has a relation with model
Addr
On Aug 5, 2010, at 3:15 PM, Roald de Vries wrote:
On Aug 5, 2010, at 3:00 PM, Emily Rodgers wrote:
On Aug 5, 1:50 pm, Roald de Vries wrote:
Dear all,
I have the following error, and don't know what it means:
Error: One or more models did not validate:
update.personupdate:
Hi all,
I have two models (Person, PersonUpdate) with a many-to-many field
(properties). The properties of a personupdate should be initialized
(copied) from that of the corresponding person. But before I can add a
list of properties to a new personupdate, it must have an id, and
therefor
On Aug 8, 2010, at 2:04 PM, Tim Sawyer wrote:
What I do is to setup a search that works at /search/q=search_term,
and then create a form on each page that submits to /search.
This form is in my top level site template. The /search/ url is
part of a search application.
There's an exa
Hi refreegrata,
On Aug 11, 2010, at 3:31 PM, refreegrata wrote:
Hello list. I'm a newbie in django and now i am working with
"modelformset_factory".
I have something like this
---
On Aug 11, 2010, at 7:25 PM, refreegrata wrote:
My code
--
class Format(models.Model):
name = models.CharField(max_length=5, unique=True)
myBoolean = models.BooleanField(default=False)
class FormFormat(forms.ModelForm):
boolean1 = forms.BooleanField(requi
On Aug 11, 2010, at 8:59 PM, Streamweaver wrote:
I use the the standard django login and logout views in the usual way
url(r'^login/$', 'django.contrib.auth.views.login',
{'template_name': 'accounts/login.xhtml'}, "login-account"),
url(r'^logout/$', 'django.contrib.auth.views.logout',
{'te
On Aug 11, 2010, at 8:47 PM, Bradley Hintze wrote:
Hi all,
Is there a way that I can startup my script and pass it a file? For
example:
~$ python myscript.py mytext.txt
and then access mytext.txt in myscript.py?
Option 1: use stdin
~$ python myscript.py < mytext.txt
>>> import sys
>>> fi
On Sep 2, 2010, at 4:41 PM, Steve McConville wrote:
What would be the best way to go about this? Is it necessary to create
a custom widget to achieve this?
I guess the best way would be to use the 'initial' parameter.
http://docs.djangoproject.com/en/dev/topics/forms/formsets/#using-initial-dat
On Mar 11, 2010, at 11:56 AM, pyt...@roalddevries.nl wrote:
I have the following model:
1 class MyOrderItem(models.Model):
2 orderitem = models.ForeignKey(OrderItem, null=True,
blank=True)
3 # other fields
4
5 def save(self, *args, **kwargs):
6
On Mar 31, 2010, at 9:12 AM, Eximius wrote:
Please help me out
On Mar 29, 11:04 pm, Eximius wrote:
Hi all,
I have created a django application using app engine sdk, and have
stored data in database using forms. But the problem i am getting
when
i deploy it, the data I stored is not ther
On Sep 14, 2011, at 11:32 PM, Visgean wrote:
Hello I have these two models:
class SubOrder(models.Model):
"""
This is model for single order
it should be used later in complex order
"""
product = models.ForeignKey(Product)
quantity = models.SmallIntegerField()
class Order(m
19 matches
Mail list logo