(how) can I make a CreateView use a dynamic form based on a
parameter passed from the url?
Thanks,
oMat
--
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 fro
a parameter to the
validator and in the help text. I would like to display the max length
value using a generic template.
Cheers,
omat
> On Aug 18, 3:41 pm, omat wrote:
>
>
>
> > Hi,
>
> > In my generic form template, if a CharField has a max_length
>
heers,
omat
--
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...@googlegroups.com.
For more options, v
TagField: {'widget': admin.widgets.AdminTextareaWidget},
}
This has no effect on the form field widget and tags are still
rendered with a TextInput widget.
Any help is much appreciated.
--
omat
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
z__in=quiz_qs)
is not possible as User does not have a quiz attribute.
and daniel, yours, saying "user.id in Quiz queryset" does not look ok:
User.objects.filter(id__in=Quiz.objects.filter(score__gt=90))
Still stuck. Any ideas?
--
oMat
On May 24, 4:58 pm, omat wrote:
> @cliff:
@cliff: you are right, but i am writing an extension to an existing
app. i want to use the models as-is if possible.
i found the part in the docs:
inner_qs = Blog.objects.filter(name__contains='Cheddar')
entries = Entry.objects.filter(blog__in=inner_qs)
thanks.
On May 24, 4:22 pm, Tomasz Ziel
ops, a small correction. i meant:
User.objects.filter(id__in=[q.user.id for q in
Quiz.objects.filter(score__gt=90)])
--
oMat
On May 24, 3:12 pm, omat wrote:
> Hi All,
>
> I have a Quiz model, which is related to the User model by a
> ForeignKey. I want to get a queryset of users
.
What is the optimal way of doing this?
Thanks,
oMat
--
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-user
e the actual content for
much longer, e.g. 1 month. Then, if something related to its context
is submitted, I remove those pages from the cache.
Maybe I am thinking this in a wrong way from the start.
Thanks,
omat
On Dec 22, 3:50 pm, Javier Guerra wrote:
> On Tue, Dec 22, 2009 at 8:44 AM,
many issues,
mainly due to running out of memory, and in the end the whole system
is screwed. using no caching is doing much much better than this
setup.
Any suggestions for optimizing the caching is greatly appreciated.
--
omat
--
You received this message because you are subscribed to the G
It is not something to do with the upload_to path.
I managed to track down the problem, I was passing the full url to the
thumbnail templatetag (i.e. "provider.logo.url") but it should be just
the relative URL (i.e. "provider.logo").
Thanks.
--
omat
On Dec 6, 9:10 pm
The model is as simple as can be:
class Provider(models.Model):
name = models.CharField(max_length=100)
logo = models.ImageField(upload_to='logo/',
blank=True, null=True)
Thanks.
--
omat
On Dec 6, 4:45 pm, Kenneth Gonsalves wrote:
> On
ories under my media root as:
- "http/" (yes the directory name has a trailing slash)
- "localhost/8000" (yes, this is funny too)
- "logo" (this is the upload_to location)
and the created directory is empty, no thumbnail.
Am I missing something obvious?
T
and admin templates, which doesn't feel right.
Maybe there should be a way to define model-wide actions as well as
the current ones.
--
omat
On Apr 8, 3:10 am, Alex Gaynor wrote:
> On Tue, Apr 7, 2009 at 8:04 PM, Malcolm Tredinnick
>
>
> > wrote:
>
> > On Tue, 200
le that functionality.
Then I would have some admin actions in the ModelAdmin classes and
some in the views and admin templates, which is not a neat solution.
Can the ModelAdmin be overridden to let the selected action be
executed without caring abou
/dev/topics/auth/#other-authentication-sources
should mention that.
Best,
oMat
On Mar 12, 4:28 pm, dave wrote:
> Hi,
> I'm encountering exactly the same problem as yours. Didyoufinally
> find the solutions?
> Thanks,
> Dave
>
> On Feb 17, 1:25 pm, Tipan wrote:
>
n/dev/topics/auth/#other-authentication-sources
I think, this document should mention about admin / permissions issues
when using custom backends.
Best,
oMat
On May 7, 3:01 pm, "omat * gezgin.com" wrote:
> While trying to track down the problem, I encountered this strange
&
ns()
set([])
Am I missing something basic?
Best,
oMat
On May 7, 1:25 pm, "omat * gezgin.com" wrote:
> Sure, otherwise I won't be able to login to admin with that user at
> first place.
>
> Best,
> oMat
>
> On May 7, 1:04 pm, Kenneth Gonsalves wrote:
&
Sure, otherwise I won't be able to login to admin with that user at
first place.
Best,
oMat
On May 7, 1:04 pm, Kenneth Gonsalves wrote:
> On Thursday 07 May 2009 15:32:08 omat wrote:
>
> > "You don't have permission to edit anything."
>
> you have
Hi,
I have set up the admin, and works as expected when logged in as a
super user.
When I log in with a user that have limited permissions (either when
permissions were assigned directly to the user or through a group
membership), the admin site says:
"You don't have permission to edit anything
queries is the most civilized way to go.
Best,
oMat
On Apr 29, 3:12 pm, Russell Keith-Magee
wrote:
> On Wed, Apr 29, 2009 at 4:08 PM,omat wrote:
>
> > Hi all,
>
> > I would like to fetch the latest entries for each user from a model
> > like:
>
> > cl
., wouldn't it be great to have something like:
Entry.objects.annotate(Max('added'), group_by=['user']).filter
(date=date__max)
Thanks,
oMat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
27;I', which is a legal ascii character for a
username, iexact does not match it with 'i', which is the slugified
version of the 'I', but matches with 'ı' (the non-ascii char), when
the locale is TR.
i.e. I need something like:
User.objects.get(username__slug=us
s.all()
[, ...]
# the user is in the group admin, and admin group has permissions
>>> u.groups.all()
[]
>>> u.groups.all()[0].permissions.all()
[,
, ...]
# but
>>> u.get_all_permissions()
set([])
Strange, or am I m
pm, "omat * gezgin.com" wrote:
>
> > 'file' for liblwgeom.so and two of it dependencies (libgeos_c.1.dylib
> > and libproj.0.dylib) reveals they are built only for i386.
>
> > Is this ok or should it be x86_64? as I built from source, how come
>
'file' for liblwgeom.so and two of it dependencies (libgeos_c.1.dylib
and libproj.0.dylib) reveals they are built only for i386.
Is this ok or should it be x86_64? as I built from source, how come
they are built for the wrong architecture, if so?
Thanks,
omat
On Feb 27, 11:16
I am using the django's built-in development server.
Thanks.
On Feb 27, 12:48 am, Graham Dumpleton
wrote:
> On Feb 27, 12:29 am, "omat * gezgin.com" wrote:
>
> > Thanks for the pointer.
>
> > But I checked the architecture of the liblwgeom.so with
pm, Graham Dumpleton
wrote:
> On Feb 26, 10:07 pm, omat wrote:
>
>
>
> > Hi all,
>
> > Following the instructions on inhttp://geodjango.org/docs/install.html,
> > i managed to get to "Creating a Spatial Database Template" section.
>
> > But when tr
/usr/local/pgsql_saved_0804141532/lib/liblwgeom.so: mach-o, but wrong
architecture
Can it be that a conflicting version already existed and caused
problems? Or what?
I took the "build from source" path as instructed in the install
documentation. I am using PostgreSQL 8
I opened the ticket:
http://code.djangoproject.com/ticket/10182
Thanks.
On Feb 3, 1:25 am, Russell Keith-Magee wrote:
> On Mon, Feb 2, 2009 at 4:46 PM,omat wrote:
>
> > I just remembered that the above error occured when running on
> > Postgresql 8.2. Sorry for the misinform
I am using a recent svn checkout.
I opened a ticket for the issue:
http://code.djangoproject.com/ticket/10181
Best.
On Feb 3, 5:03 am, Malcolm Tredinnick
wrote:
> On Mon, 2009-02-02 at 03:23 -0800,omatwrote:
> > Hi,
>
> > I am receiving an EmptyResultSet exception in 'in' lookups, if the
> >
A typo correction:
In line
>>> ids = Tag.objects.filter(id__in=[]).values_list(id, flat=True)
"id" in expression values_list(id, flat=True) should be quoted as:
values_list('id', flat=True)
Thanks...
On Feb 2, 1:23 pm, omat wrote:
> Hi,
>
> I am
t in
an 'in' lookup:
>>> Tag.objects.filter(id__in=ids)
This results in an EmptyResultSet exception, where I would expect an
empty QuerySet instead.
Am I missing something here?
Thanks...
oMat
ps: I am running the most rec
rank = models.IntegerField(default=0)
relevance = models.IntegerField(default=0)
added = models.DateTimeField(auto_now_add=True)
Thanks...
On Feb 2, 9:46 am, omat wrote:
> I just remembered that the above error occured when running on
> Postgresql 8.2. Sorry for the misinfor
: tagging_taggeditem.added
This is very strange, because the column 'added' is surely there.
On Feb 1, 11:39 pm, omat wrote:
> Hi,
>
> TaggedItem model is as follows:
>
> class TaggedItem(models.Model):
> tag = models.ForeignKey(Tag, verbose_name=_('tag'
ent type'))
object_id = models.PositiveIntegerField(_('object id'),
db_index=True)
object = generic.GenericForeignKey('content_type', 'object_id')
And I am using sqlite on Mac OS X with django revison 9781.
Thanks,
oMat
On Feb 1, 1:12 am, Russel
Hi all,
I obtain a list of tag ids by:
tag_ids = TaggedItem.objects.all().order_by('-added__max').annotate(Max
('added'))[:10]
and try to use it in the following query to obtain tag objects:
Tag.objects.filter(id__in=tag_ids)
But i get "invalid reference to FROM-clause" error:
Caught an except
Hi,
Is it possible to order a queryset by a calculated field, such as
multiplication of 2 attributes?
With the fantastic aggregate functions introduced, I think something
like this would be cool:
Book.objects.annotate(total=Arithmetic('price * tax')).order_by
('total
ot
seem to be a real solution.
I doubt that Django's response may have something (HTTP headers?) that
safari don't like.
Any ideas?
Cheers,
oMat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
at /pathwaysolutions/validation/admin/
encounter/standardcomment/10/
Exception Value: 'module' object has no attribute 'parse_file_upload'
This happens for every model and every add / edit operation.
The model in example does not have a file or image field. Where does
this &
Exactly. Thanks for the reference.
--
oMat
On Oct 31, 6:54 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 31, 2008 at 12:39 PM, omat <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
>
> > Is it possible to update a chosen subset of a
or any comments,
oMat
--~--~-~--~~~---~--~~
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 [
Thanks for the reply Karen.
Accepted but not used? Neither in the model nor in the forms? This is
not how I would expect it to be.
Then, how can I limit a, say comment field to 500 chars in a djangoic
way?
Thanks...
--
omat
On Oct 24, 6:09 pm, "Karen Tracey" <[EMAIL PROT
eld? Is it something supported at db
level?
I am using sqlite and django 1.0.
Thanks for any comments...
--
omat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
It was this:
http://code.djangoproject.com/ticket/7411
It is not valid anymore, but as I couldn't find time to port to post
1.0 I was experiencing this problem.
On Sep 20, 11:36 am, omat <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Due to a model change, I would like to move a
error':
>>> from products.models import *
>>> for product in Product.objects.all():
>>> Image.objects.create(product=product, image=product.image)
Is there a way to do such an import in django way, or should I go the
raw SQL path?
thanks,
omat
--~--~-
are you getting the error with a GET request?
On Sep 20, 9:08 am, ehpmail <[EMAIL PROTECTED]> wrote:
> Why do i get the above error in views.py:
>
> def bookmark_save_page(request):
> if request.method == 'POST':
> form = BookmarkSaveForm(request.POST)
> if form.is_valid
to be called, I receive a:
Exception in thread Thread-2:
... traceback ...
OperationalError: no such table: game_question
Does this mean the db tables are created only for the main thread and
other threads cannot access the temporary db?
Thanks,
oMat
I think the most natural fit for this is a database like the google
appengine provides, not a relational one:
Attach a review to an encounter whenever needed, and access it as an
attribute of the encounter
On Aug 19, 11:29 pm, omat <[EMAIL PROTECTED]> wrote:
> Another approach
encounter model will be reflected to the Review
model resulting in DRYness. But this will not avoid the redundancy in
the db tables.
Thanks...
On Aug 19, 11:02 pm, omat <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a model class that holds patients' encounters. It has fie
unter)
review = XMLField()
And the 'review' XML field will hold all the data on reviewed fields
in a non-relational and flexible format.
I cannot decide among these approaches as neither of them feels
natural.
Any advice would be much appreciated.
I have submitted a ticket for the issue:
http://code.djangoproject.com/ticket/7585
Thanks...
On Jul 1, 12:51 pm, omat <[EMAIL PROTECTED]> wrote:
> More specifically, I think the problem is in
> ReverseSingleRelatedObjectDescriptor in related.py, where it does not
> check if
low null values.' %
(instance._meta.object_name,
self.field.name))
...
On Jul 1, 12:30 pm, omat <[EMAIL PROTECTED]> wrote:
> But it is raised at the line:
>
> photo = form.save(commit=False)
>
> On Jul 1, 12:26 pm, Malcolm Tredinnick <[E
But it is raised at the line:
photo = form.save(commit=False)
On Jul 1, 12:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Tue, 2008-07-01 at 02:18 -0700, omat wrote:
> > Hi,
>
> > I updated Django to svn trunk v. 7811 from about a week old version.
=False):
ValueError: Cannot assign None: "Photo.album" does not allow null
values.
--
omat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send e
AIL PROTECTED]> wrote:
> On Fri, Jun 27, 2008 at 12:10 PM, omat <[EMAIL PROTECTED]> wrote:
>
> > Thanks for the clarification.
>
> > Apparently my demo case of the problem was not appropriate, but my
> > real problem is still there.
>
> > I have 2 ModelForms t
ext(request))
But when I submit an invalid entry_form (i.e. nothing related to item
form is executed or accessed other then the initialization item_form =
ItemForm(request.POST, instance=item)) the item_form arrives at my
template with a filled errors dictionary.
Any opinions?
--
omat
On Jun 27
tem
>>> form = ItemForm({}, instance=Item())
>>> form.errors
{'title': [u'This field is required.']}
>>>
The ItemForm is a ModelForm build from Item model.
Is the documention or the behavior wrong?
Thanks,
omat
--~--~-~--~~~--
, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> omat pisze:
>
> >http://dpaste.com/54750/
>
> This is postmortem after actual error which happened before. Basically
> for PostgreSQL it works like this: if you gen an error in transaction,
> any later statement raises programm
jango with Postgres 8.2 on Mac OS.
This seems like a bug. Any ideas?
Thanks,
omat
--~--~-~--~~~---~--~~
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@goog
http://dpaste.com/54750/
--~--~-~--~~~---~--~~
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 [EMAIL
avorites_favorite".object_id
The query representing qs2 is:
SELECT "notes_note"."id", "notes_note"."title", "notes_note"."slug",
"notes_note"."note", "notes_note"."tags", "notes_note&qu
I figured it out:
I should you QuerySetPaginator instead of the Paginator and the LIMIT
is set properly.
Thanks.
On Jun 3, 2:44 pm, omat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am using a recent svn checkout of django and:
>
> Paginator(User.objects.all(), 20)
>
&g
."date_joined" FROM "auth_user"
WHERE "auth_user"."is_active" = true ORDER BY
"auth_user"."date_joined" DESC
As you can see there is no LIMIT in this query and it takes quiet a
long time to execute (about 0.2 sec.)
Shouldn't the pa
And, I think your problem is the same that makes "union with an empty
queryset always result in an empty queryset" bug:
User.objects.filter(Q) | User.objects.none()
=> always returns an empty queryset.
--
omat
On May 30, 12:12 pm, omat <[EMAIL PROTECTED]> wrote:
> Hi J
ject.com/ticket/7277
I tried to track down the problem in the django.db.query and solve my
problems partially by monkey patching but I am not comfortable at all
and looking forward for the official resolution.
--
omat
On May 30, 9:57 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
&
Not sure but this can be related to ticket #7277:
http://code.djangoproject.com/ticket/7277
On May 23, 7:59 pm, omat <[EMAIL PROTECTED]> wrote:
> I am trying to merge 2 QuerySet objects with the following function:
>
> qs_user = queryset.filter(user=user)
'favorites_favorite' is the table name as returned by
"Model._meta.db_table"
The line:
promote = (rhs.alias_map[alias][JOIN_TYPE] == self.LOUTER)
raises thi exception as "rhs.alias_map" does not contain the key
'favorites_favorite'
This seems like a bug
I figured it out:
unique query is referring to distinct() and to combine two QuerySets,
they should both be distinct() or non-distinct.
On May 23, 12:17 pm, omat <[EMAIL PROTECTED]> wrote:
> I was able to track down the problem a little further and I saw that
>
> Tag.object
means? What is a unique query?
On May 22, 7:08 pm, omat <[EMAIL PROTECTED]> wrote:
> An other case where I get empty result sets unexpectedly is when I
> want to join 2 querysets, one holding the objects that the current
> user entered and the other holds the objects marked as
Set is exactly the same
as the result of a query set generated by Note.objects.
But when I try to get the union such as
Note.objects.all() | Favorite.objects.get_by_user(Note, user)
The result is a QuerySet objects with no elemnts in it.
Thanks...
On May 22, 4:38 pm, omat <[EMAIL PROTECTE
Note.objects.none()
Shouldn't it be equivalent to Note.objects.filter(tag='foo'). Am I
missing something?
Thanks,
omat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To pos
wish hem to be displayed, but this is not applicable to my
case.
I tried specifying fields = (...) in the Meta inner class of the
ModelForm class, but its order is not taken into account.
Is there a way to specify the field order in ModelForm with extra
fields?
Thanks,
omat
Thanks for the reply. Here are the HistoricDateField and the
HistoricDateWidget classes:
http://dpaste.com/hold/51690/
--
omat
On May 20, 8:08 pm, fivaldi <[EMAIL PROTECTED]> wrote:
> Hi Omat,
>
> Does your HistoricDateField implement the compress(self, data_list)
> me
form is not called and cleaned_data does not have the data for 'date'.
Am I missing something or is it a bug?
Thanks,
omat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
This was because all the templates should have the "html" extension to
get translated.
On Apr 1, 11:32 am, omat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am sending notification e-mails to members on some actions. The
> message body comes from a template:
>
&g
ENT': 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:
1.8.1.11) Gecko/20071127 Firefox/2.0.0.11',
'PATH_INFO': '',
'PATH_TRANSLATED': None,
'QUERY_STRING': None,
'REMOTE_ADDR': '80.67.25.132',
'REMOTE_HOST': N
maintainable (though hacky) way is to create a template file such
as translation.html and put the strings to be translated into that
file such as:
{% load i18n %}
{% trans "Home page" %}
{% trans "Continue" %}
On Apr 30, 3:14 pm, omat <[EMAIL PROTECTED]> wrote:
> H
projects (settings, models, views, etc) to find related
files and extract text to be translated.
The way it actually is is more simple and straight-forward, so it is
quite ok. But dependency on file extension (especially for templates)
was something I wouldn't expect.
Regards,
when I build the translation file, the text is not
recognized to be translated and does not appear in the translation
file.
How can I make xgettext to process those templates?
Thanks,
oMat
--~--~-~--~~~---~--~~
You received this message because you are subscribed
ble dealing with the date.
>
> Just a thought, might be able to help.
>
> Michael
>
> On Fri, Mar 7, 2008 at 9:54 AM, omat <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> > I need some advice to build an event submission form in a smart way.
>
> > I have 2
y)
except Event.DoesNotExist:
pass
else:
raise forms.ValidationError(_('This event already
exists'))
return self.cleaned_data
I couldn't solve the challenges mentioned above. Any help is
appreciated.
Thanks,
oMat
--~--~-
I should have checked if there were form validation errors already.
Required fields that receive empty data get dropped in the fields'
validation before reaching the form class's clean().
On Mar 7, 11:28 am, omat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am doing cus
Hi,
I am doing custom validation in my form class's clean() method
according to several fields in the form but some fields does not
appear in the cleaned_data dictonary when the supplied value is
empty.
My (simplified) model is:
class Event(models.Model):
title = models.CharField(max_lengt
Hi,
Suppose 'categories' is the name of a ManyToMany field in our model
(with blank=True).
Q(name = 'test') | Q(categories__title = 'xyz')
fails to match the instance with name = 'test' if the instance is not
related to any category.
This see
t the duplicates
in.
On Feb 1, 12:36 am, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> On Feb 1, 2:05 am, omat <[EMAIL PROTECTED]> wrote:
>
> > When I install Django on Leopard, py files went into:
> > /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.
having this problem.
I would like to hear if there are any better approaches.
oMat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Yes! This solved the problem...
Thanks a lot Thomas...
On Jan 30, 5:51 pm, Thomas <[EMAIL PROTECTED]> wrote:
> Hi Omat,
>
> May be
>
> export LC_ALL=en_US.UTF-8
>
> in terminal prior to syncdb would help.
>
> Regards,
> Thomas
>
> On Jan 30, 4:34 pm
OK, I found it, it is a bug:
http://code.djangoproject.com/ticket/5846
On Jan 30, 5:34 pm, omat <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> When I try to syncdb I am getting a "unknown locale: UTF-8" error.
>
> I am using a recent checkout from the trunk with Postgr
Hi all,
When I try to syncdb I am getting a "unknown locale: UTF-8" error.
I am using a recent checkout from the trunk with Postgres on MacOS X.
My database is UTF-8 and my DEFAULT_CHARSET is 'utf-8'. The
application was used to run on different platforms as-is.
Any ideas?
, 2, 3]) format should be
supported. I will submit it as a feature request to trac.
On Jan 22, 2:58 am, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> omat wrote:
> > Hi all,
>
> > I have a model with a date field. When I try to filter based on its
> >
Hi all,
I have a model with a date field. When I try to filter based on its
months like:
q1 = Event.objects.filter(start_date__month__in=[1, 2, 3])
I get an "unable to resolve field 'start_date__month'" error.
Is this usage not supported or is this a bug?
Any i
Sorry, it was a stupid mistake, nothing to do with the above
middleware and the cache system.
My middleware above works fine for caching pages that differ by their
subdomains.
On Jan 5, 8:58 am, omat <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Django's per-site cache does not t
Hi,
Django's per-site cache does not take sub domains into account. I
derived my own middleware to handle subdomains by modifying the
key_prefix:
from django.middleware.cache import CacheMiddleware
class SubdomainCacheMiddleware(CacheMiddleware):
def process_request(self, request):
Jan 2, 11:15 pm, omat <[EMAIL PROTECTED]> wrote:
> The sitemaps.org says:
>
> > For instance, if the Sitemap is located
> > athttp://www.example.com/sitemap.xml, it can't include URLs
> > fromhttp://subdomain.example.com.
>
> But if I place it under &qu
The sitemaps.org says:
> For instance, if the Sitemap is located at
> http://www.example.com/sitemap.xml, it can't include URLs from
> http://subdomain.example.com.
But if I place it under "example.com" (without the "www") it should be
ok for the subdomains.
On Jan 2, 5:55 pm, Peter Rowell
Well, I figured out that overriding the "get_urls" method of the
Sitemap class solves the problem. But, remember to call the private
__get() method like _Sitemap__get() in your class.
Though, a cleaner solution is appreciated...
On Jan 2, 3:38 pm, omat <[EMAIL PROTECTED]>
ed to the URL.
Same with get_absolute_url, too.
How can I add URLs with sub-domains to my sitemap files?
Thanks,
oMat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gro
back to Review.
> But I'm not sure exactly what problem you're trying to solve yet, so I
> can't say for sure if that'll help you.
>
> -Gul
>
> On Dec 3, 2007 10:16 AM, omat <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi all,
>
> > I have
simpler than what those examples
cover, I had no luck managing this.
I tried looping through the _meta.fields of the Record model but I
couldn't manage to add them to the "base_fields" of the Review
class.
Thanks for any help,
oMat
--~--~-~--~~~-
1 - 100 of 216 matches
Mail list logo