y to figure out what that can do for me and try
> using it.
>
> Kmike - the gears thing seems promising but I am frankly still having
> trouble figuring out what it does. Does your code actually upload
> files via drag and drop? I will try downloading your code and see if
> I can f
Google Gears can also be used in order to implement drag-n-drop image
uploading. I beleive it is the easiest way because it only involves
some javascript programming.
You can also do other nice things with Google Gears (resize images
client-side, for example; check http://bitbucket.org/kmike
Maybe you don't have enough information to make an abstraction right
now. If so I suggest to actually implement several API's in a dumb
way. After that it'll be clear what are the differences and what are
the common parts so making a good abstraction will be easier.
On 23 окт, 11:06, Jason
> appropriate cache_prefix function
oops, key_prefix, not cache_prefix :)
On 8 окт, 01:35, kmike <kmik...@googlemail.com> wrote:
> 1. Maybe you can use django's Vary support
> (http://docs.djangoproject.com/en/dev/topics/cache/#using-vary-headers
> ). This
> will work
/kmike/django-view-cache-utils/
for that (writing appropriate cache_prefix function).
2. Functions (from the same django-view-cache-utils app) that removes
page from cache based on page's url (and
possibly key_prefix):
http://bitbucket.org/kmike/django-view-cache-utils/src/tip/view_cache_utils
/kmike/django-view-cache-utils/
for that (writing appropriate cache_prefix function).
2. Function that removes page from cache based on page's url (and
possibly key_prefix):
http://bitbucket.org/kmike/django-view-cache-utils/src/tip/view_cache_utils/__init__.py
On 8 окт, 00:11, Christophe Pettus &l
that I could use to query comments for that
> particular paragraph.
>
> Thanks again,
>
> Tomas
>
> On Oct 3, 11:28 am, kmike <kmik...@googlemail.com> wrote:
>
>
>
> > If you want additional field (paragraph_id) in Comment model you can
> > create your o
Define custom form:
class NoEmailCommentForm(CommentForm):
def __init__(self, *args, **kwargs):
super(NoEmailCommentForm, self).__init__(*args, **kwargs)
self.fields['email'].required = False
Then put
def get_form():
return NoEmailCommentForm
in your comment
If you want additional field (paragraph_id) in Comment model you can
create your own model as decribed here:
http://docs.djangoproject.com/en/dev/ref/contrib/comments/custom/#ref-contrib-comments-custom
On 3 окт, 01:46, cirip wrote:
> Hi,
>
> I am just reading about django
If you have one default logo then maybe the 'right' way is to use
'default' parameter of ImageField?
On 3 окт, 22:07, Nan wrote:
> Nope, but I finally found what seems to be the "right" way to do this
> (copies the file to the appropriate upload_to location, etc):
>
> from
My solution was
urlpatterns += patterns('',
url(r'^my_wizard/$', login_required(MyWizard().__call__),
name='my_wizard'),
)
On 2 окт, 18:11, JimR wrote:
> After much searching, I found the answer that I was looking for -
> using the login_required decorator directly in the
'id__in' queries (example:
http://bitbucket.org/kmike/django-generic-images/src/tip/generic_utils/managers.py#cl-122).
On 28 сен, 09:17, triman <john.ple...@gmail.com> wrote:
> I have a model that can be attached to a variety of different models,
> based on the value of a column. Is t
You can remove fields from templates (from html). They indeed should
be removed if you don't want them :)
Then we face a problem: some of CommentForm fields are marked as
required. The solution is to subclass CommentForm and set this flag to
False:
class NoEmailForm(CommentForm):
def
Try using smth. like siege (http://freshmeat.net/projects/siege/ ,
home page seems to be broken) to check how many requests per second
can your app handle. Then add more django processes/threads in your
mod_wsgi config (or more fastcgi processes, or smth. else) and test
again. Measure memory and
I mean smth. like
lambda: self.content.text
On 16 авг, 20:41, Ali Rıza Keleş wrote:
> Hello,
>
> I want to carry value as default from one model to another.
>
> For example:
>
> class Text(models.Model):
> text = models.TextField(blank = True)
> name =
You can override `save` method or maybe provide callable ***,
smth. like
default=lambda: self.text
but i haven't test it.
On 16 авг, 20:41, Ali Rıza Keleş wrote:
> Hello,
>
> I want to carry value as default from one model to another.
>
> For example:
>
> class
I wrote a simple app that may be useful for avatar management:
http://bitbucket.org/kmike/django-generic-images/wiki/Home
It's similar to django-tagging in aspect that images can be attached
to any model using generic relations and then fetched in a few sql
queries.
Avatar-uploading view example
I wrote a simple app that may be useful for avatar management:
http://bitbucket.org/kmike/django-generic-images/wiki/Home
It's similar to django-tagging in aspect that images can be attached
to any model using generic relations and then fetched in a few sql
queries.
Avatar-uploading view
That's a question about database migration. Django doesn't have built-
in solution for that.
Try using South (http://bitbucket.org/andrewgodwin/south/overview/),
it is a very good db migration app. I suggest using development
version because (based on my experience) it is more robust than last
Hi,
I've recently create an app for advanced view caching. It allow pages
to be cached based on anything in request, specific cookies for
example.
Please check http://bitbucket.org/kmike/django-view-cache-utils/wiki/Home
If you have any questions about it feel free to ask.
On 5 авг, 20:11
20 matches
Mail list logo