On 16 September 2011 22:05, Torsten Bronger
<bron...@physik.rwth-aachen.de> wrote:
> this means that we don't have to do anything.
Not really. To 1.4 not be affected, someone needs to write a patch for
that ticket. This can be you ;)
--
Łukasz Rekucki
--
You received this message be
oblem in **your code**". If
you're trying to use a non-existant module, there's not much Django
can do about it.
--
Łukasz Rekucki
--
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@go
io module replaces.
--
Łukasz Rekucki
--
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...@google
PyPI page says otherwise[1]. You probably mean that there is no
binary packages for newer Python versions. If you trust random blogs,
here are some packages [2][3].
[1]: http://pypi.python.org/pypi/MySQL-python/1.2.3
[2]: http://www.codegood.com/archives/4
[3]: http://www.codegood.com/archi
o way to tell to which URL it was bound (look at how as_view()
works for more details).
Naming all your URLs is a good practice anyway.
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
problems you have.
--
Łukasz Rekucki
--
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
n in your webserver, that would be easier)
Good news, Django already provides a way to do this. See
APPEND_SLASH[1] setting and CommonMiddleware[2].
[1]: http://docs.djangoproject.com/en/1.3/ref/settings/#append-slash
[2]:
http://docs.djangoproject.com/en/1.3/ref/middleware/#django.middleware.commo
gt;> build documentation?
>>
Yes, you do.
--
Łukasz Rekucki
--
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
abstracted into view_decorator() function[2].
[1]:
http://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-the-class
[2]:
https://github.com/lqc/django/blob/0eb2de3c156d8e6d1c31f46e0734af0ff06f93c4/django/utils/decorators.py#L46
--
Łukasz Rekucki
--
You received this message because you
he form and template
used[2].
[1]:
http://docs.djangoproject.com/en/dev/topics/auth/#writing-an-authentication-backend
[2]:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.AdminSite.login_form
--
Łukasz Rekucki
--
You received this message because you are subscribed t
ionWarning it's most
likely something deprecated in previous version.
(Unless you're using Python 2.7 or later, which also silences
DeprecationWarning, so you should run your code with "-Wd" to see
them).
--
Łukasz Rekucki
--
You received this message because you are subscribed to the
ket/14651
Also, from PostgreSQL's docs:
One should, however, be aware that there's no need to manually create
indexes on unique columns; doing so would just duplicate the
automatically-created index.
So there is just no need, to create the index - it's already there.
--
Łukasz Rekucki
--
You received
ew, self).dispatch(*args, **kwargs)
You can report it to the bug tracker here:
http://code.djangoproject.com/newticket
Thanks.
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
filter(published=True,
date__lte=datetime.datetime.now()) # or at least the datetime.now()
part mustbe dynamic
http://docs.djangoproject.com/en/dev/topics/class-based-views/#dynamic-filtering
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Dj
tes like Bitbucket or
Github is a great way, to make sure you don't lose or your work.
3) Deployment - Instead of uploading stuff via FTP, you can just push
your changes to the site. This wil proably require some more knowledge
about VCS, but it will save lots of time.
--
Łukasz Rekucki
] )
>
It still is? http://docs.djangoproject.com/en/dev/ref/models/fields/#validators
+ http://docs.djangoproject.com/en/1.2/ref/validators/#regexvalidator
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
ink you want '[\.\w]'.
>
Not if used in a character class:
>>> re.match("[.]", ".")
<_sre.SRE_Match object at 0xb72fe330>
>>> re.match("[.]", "1")
--
Łukasz Rekucki
--
You received this message because you are su
lversion (this has extra advantage
of being available even if your internet fails) until the problem is
fixed.
--
Łukasz Rekucki
--
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@goo
e there any additional Trac
features planned ? (like the Vote Plugin).
--
Łukasz Rekucki
--
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,
in colors
> ' xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/;> eiveShortMessageRequest
> xmlns:ns1="http://flypp.infy.com/sms/v2010r1_0;> D>12345343661t1 ctionID>p1p2 ge>TEXT
> HERE Envelope>']}>
>
Ok, so what problem are you encountering and what hav
ls
To avoid the need of explaining about bash, permission, etc.
>
> I've checked the directory I am using and the manage.py file is there.
> I also set the _init_.py to where the operating system - os is
> imported and that the django_setting_module is set to settings. Any
> advice
identity). In receive() you're using a class, while in send()
you're passing an instance of that class, so they have no chance of
matching.
Try:
post_copy.send(sender=type(self), copied_to=new_version)
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Goog
stance of ReportHeader failed, due
to buggy constructor). After all, you're rendering the template even
if you failed to fetch the data you most likely need to render it.
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django use
/1.2/howto/custom-template-tags/#writing-custom-template-filters
>
>>> {% for x in a %}
>>> loop number = {{forloop.counter|increase}}
>>> {% endfor %}
>
> cheers,
> Konrad
>
Actually, that case is already covered by builtin filter "add":
t.pun_collection = []
for pun in Puns.objects.all(): # or if threads are limited:
filter(thread__in=threads)
t[pun.thread_id].pun_collection.append(pun)
# now ``threads`` contains a list of threads with assigned puns.
--
Łukasz Rekucki
--
You received this message because yo
iframe loads you can post back response from server to your application.
> It's not fully ajax but as close as it can get without using flash.
I call this HTML4 fallback. I have a whole jQuery plugin that
transparently uses an IFrame if the user's browser doesn't have any of
required HTML5 capabi
by overriding
> get_initial(), but this doesn't work because the `created_by` field
> has editable=False so the form doesn't include it in the fields list.
>
> Am I missing something simple? Probably :). Any help would be greatly
> appreciated!
>
> Thanks,
> -Justin
>
--
Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-
"package". Now you can google for "django models package":
http://www.acooke.org/cute/UsingaDire0.html
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
djangobook: http://www.djangobook.com/en/2.0/chapter07/
--
Łukasz Rekucki
--
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 this group, send email
ance of A
b = B(parent=A)
b.save() # this will fail
The patch on #7623 is describing exactly this situation, so you should
check it out.
>
> 2010/12/20 Łukasz Rekucki <lreku...@gmail.com>:
>> This looks a lot like this bug: http://code.djangoproject.com/ticket/7623.
>>
&g
s.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
Łukasz Rekucki
--
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..
e code in the views file which loops over the views defined in the
> file and applies the auth decorator to each one.
>
Now that's some "automagic" :). IMHO, putting a single line in front
of a view isn't THAT bad and gives important information to the person
reading the c
On 18 December 2010 12:24, Jonas H. <jo...@lophus.org> wrote:
> On 12/18/2010 10:30 AM, Łukasz Rekucki wrote:
>>
>> On 18 December 2010 03:43, suckerfish<yip...@gmail.com> wrote:
>>>
>>> Hi guys
>>>
>>> I've added a de
roup, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
--
Łukasz Rekucki
--
You received th
s on your code editor ?
--
Łukasz Rekucki
--
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 this group, send email to
django-users+unsubscr...@googlegrou
tag"."name" = foo AND "simple_tag"."name" = bar )
Looks related. It's exactly what you specified, but conditions you
gave are just impossible to satisfy.
Your task is a bit more complicated to do in SQL:
Blog.objects.filter(post_tags__name__in=["foo",
"
WHERE ("simple_table"."tags" LIKE %candy% ESCAPE '\'
AND "simple_table"."tags" LIKE %milk% ESCAPE '\' )
[1]:
http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects
--
Łukasz Rekucki
--
You received this message
asses can redefine the way
that decision is made without the need to copy all of the view's code.
--
Łukasz Rekucki
--
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...@goo
em with that at all. The main issue is how the docs
> approach generic views..
>
> --
> 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 unsu
2010/12/8 Nuño Iglesias <respira...@respirando.org>:
>
> What i'm trying to do is this:
> {{ mystring | upper }}
> to convert "mystring" into upper-case.
AFAIR, there should be no spaces before or after "|": {{ variable|upper }}
--
Łukasz Rekucki
--
r(csrf_exempt)
@view_decorator(domain_required(login=True))
class FileCollectionView(JSONMixin, PersonMixin, SingleObjectMixin, View):
# lots of secret code :)
pass
This uses view_decorator() function I wrote[1], which is a shortcut
for overriding ``as_view`` method (I prefer to overri
{% if var == None %} ... {% endif %}
>
It's best to just try before asking if something works :) There is a
filter variant too:
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#default-if-none
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Grou
}
> {% block extra_head %}
>
> {% endblock extra_head %}
> {% block content %}
> {% for food in foods %}
> {{food}}
> {% endfor %}
> {% endblock %}
> ------------
>
>
> --
> You received this message because you are subscribed to the Go
lpatterns('myapp.views',
url(r'some_pattern/', 'my_view', name="myapp-my_view")
)
There is not way to use a string like 'myapp.views.MyView' - you need
the alias. Also, you most likely want to name all your URL patterns
that use class-based views or you won't have a way to use rev
ecifying-translation-strings-in-template-code
"To give your template access to these tags, put {% load i18n %}
toward the top of your template."
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
p://docs.djangoproject.com/en/dev/ref/django-admin/#inspectdb
[2]: http://docs.djangoproject.com/en/dev/ref/models/options/#managed
--
Łukasz Rekucki
--
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...@googl
t.com/ticket/13842 ; But then, you must have
changed something in your code/settings (like migrating from Django
1.1 syndication views or adding XView).
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
really appreciate 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-us...@googlegroups.com.
> To unsubscribe from this group, send email to
but a standard {% if field %}
> treats 0.0 and None the same. Right now, I'm checking is None in the
> application and setting a separate value in the context, but is there a way
> of doing this directly on the field itself?
In Django 1.2, {% if value == None %} seems to work fine.
--
d to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/
you put any passwords in docstrings ?
--
Łukasz Rekucki
--
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 this group, send email to
django-users+unsubsc
t generic
class LinkGroup(models.Model):
site = models.ForeignKey(Site)
name = models.CharField() # such as "Navigation Links"
class Link(models.Model):
link_group = ForeignKey(LinkGroup)
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerF
d(mydict.keys)
>>
>> I won't stick with the tag name, but you see my point.
The name is *really* awkward - what does sorting have to do with "secret"?
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" g
On 12 November 2010 03:12, Russell Keith-Magee <russ...@keith-magee.com> wrote:
> 2010/11/12 Łukasz Rekucki <lreku...@gmail.com>:
>> On 12 November 2010 01:45, Ian Lewis <ianmle...@gmail.com> wrote:
>>> 2010/11/12 Łukasz Rekucki <lreku...@gmail.c
On 12 November 2010 01:45, Ian Lewis <ianmle...@gmail.com> wrote:
> 2010/11/12 Łukasz Rekucki <lreku...@gmail.com>
>>
>> On 12 November 2010 01:16, hcarvalhoalves <hcarvalhoal...@gmail.com>
>> wrote:
>> > What about having an official 1.
ttp://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/
>>
>> * Download instructions:http://www.djangoproject.com/download/
>>
>> --
>> "Bureaucrat Conrad, you are technically correct -- the best kind of correct."
>
--
Łukasz Rekucki
--
You rec
tabase tables?
Starting from version 1.1 Django supports aggregation[1], so you can just write:
>>> from django.db.models import Max
>>> Client.objects.aggregate(maxid=Max('id'))
{'maxid': 2L}
And you'll get a dictionary with the value you want as a result.
[1]: http://docs.d
mission in your Django app, while still
having the speed of serving static files directly by HTTP server. A
similar solution is also availble for nginx[2] and probably other
webservers.
[1]: https://tn123.org/mod_xsendfile/
[2]: http://wiki.nginx.org/NginxXSendfile
--
Łukasz Rekucki
--
You receiv
On 10 November 2010 22:10, Shawn Milochik <sh...@milochik.com> wrote:
> 2010/11/10 Łukasz Rekucki <lreku...@gmail.com>:
>> On 10 November 2010 21:55, Shawn Milochik <sh...@milochik.com> wrote:
>>> The queryset returns zero or more instances of your model. So if
# element was not found - do something with it
pass
except YourModel.MultipleObjectsReturned as e:
# there was more then one object that matches given params - if
params include a (primary) key this shouldn't happen
pass
--
Łukasz Rekucki
--
You received this message because you ar
'django.contrib.sessions',
'django.contrib.sites',
'polls'
)
If you forget the comma Python will join the two literal strings.
('django.contrib.admin'
'django.contrib.auth',)
Is the same for Python as:
('django.contrib.admindjango.contrib.auth',)
And that's not a valid application. At le
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
--
Łukasz
; %
num), a custom tag or with something horrible like this:
{% with totem.layout.communitySpace|stringformat:"d" as page_number %}
{% with "bacheche/clip_"|add:page_number|add:".html" as template_name %}
{% include template_name %}
{% endwith %}
{% endwith %}
--
Łuka
ut then BaseA.save will never call BaseB.save if you ever
decide to put any code there.
Sorry, if it's not very clear.
[1]: http://www.python.org/download/releases/2.3/mro/
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" g
gnificantly.
> - or the way my application is designed??
In the long term, when the DB really starts to be your bottleneck, you
want to do some research about all things "spatial" (like spatial
indexes).
--
Łukasz Rekucki
--
You received this message because you are subscribed to
nge just because it would make sense.
>
You should see this ticket on South's trac:
http://south.aeracode.org/ticket/567; Your options are: downgrade to
0.7.1, use a version from their repository or you can just safely
delete the extra args.
--
Łukasz Rekucki
--
You received this m
rrel".
http://github.com/dnerdy/factory_boy
Also, there is a more general python solution:
http://farmdev.com/projects/fixture/ that supports django. You should
probably check it out for inspiration before writing a one from
scratch.
--
Łukasz Rekucki
--
You received this message bec
on a pre-save signal ...
This sounds like what django-reversion[1] does :)
[1]: http://github.com/etianen/django-reversion#readme
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
On 23 October 2010 08:08, Joachim Pileborg <joachim.pileb...@gmail.com> wrote:
>
> On 19 Okt, 21:18, Łukasz Rekucki <lreku...@gmail.com> wrote:
>> On 19 October 2010 19:06, Valentin Golev <v.go...@gmail.com> wrote:> Hello,
>> > I was going to write som
; Can anyone point me in the right direction?
AFAIK, the same rules apply as with code. You create a ticket on
http://code.djangoproject.com/simpleticket describing errors you found
in a way that it will be easy to find for others. Patches are welcome,
but not required.
--
Łukasz Rekucki
inRequiredMixin, TemplateView):
pass
It should work as expected.
>
> --
> Best Regards,
> Valentin Golev
> Lead Developer
> r00, http://r00.ru
>
> http://valyagolev.net
> +7 921 789 0895, avaiable 12:00-18:00 MSK
>
>
>
> 2010/10/19 Łukasz Rekucki <lreku...@gmai
self).dispatch
return login_required(bound_dispatch)(*args, **kwargs)
[1]: http://www.toddreed.name/content/django-view-class/
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
g a middleware[1], so that you can
later access it's type in your custom 500 handler[2].
[1]:
http://docs.djangoproject.com/en/dev/topics/http/middleware/#process-exception
[2]:
http://docs.djangoproject.com/en/dev/topics/http/views/#the-500-server-error-view
--
Łukasz Rekucki
--
You received thi
more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
--
Łukasz Rekucki
--
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.
Is it only me or is http://docs.djangoproject.com/ down?
--
Łukasz Rekucki
--
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 this group,
templates
[1]:
http://docs.djangoproject.com/en/dev/ref/templates/api/#subclassing-context-requestcontext
[2]:
http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Grou
"self.file".
Unlike in some other OO languages, object attributes in methods are
not implicit.
[1]:
http://docs.djangoproject.com/en/dev/ref/files/file/#django.core.files.File.size
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django
; Graduate Student
> Duke University
> School of Medicine
> 801-712-8799
>
It looks like your trying to use both mod_python and mod_wsgi on the same path ?
--
Łukasz Rekucki
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
o you should
probably fix your application.
--
Łukasz Rekucki
--
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 this group, send email to
django
On Jun 6, 10:12 pm, Tomas Kouba wrote:
> Hello all,
>
> I am writing an application that often lists objects and some of their
> attributes in tables.
> I get the list in my view and then access attributes in template.
> It means that the table rendering results in many simple sql
On Feb 19, 2:15 am, geraldcor wrote:
> All of your comments prompted me to start reverse engineering what
> django does and I came across the check_password method which just
> separates the algorithm, salt and hash and then sends it to the
> following method to compare the
82 matches
Mail list logo