On Dec 28, 10:01 am, "Russell Keith-Magee"
wrote:
> On Sun, Dec 28, 2008 at 5:32 AM, adambossy wrote:
>
> > Russ,
>
> > Thanks for the reply. Specifically, I am wondering if there is some
> > feature of the Models API that allows me to retrieve the foreign key
> > object so that it is included
hi guys...me again...but now I've done a little step forward, when I
load urls file through request.urlconf it does not append end slash to
any url..:( and urls without trailing slash try map through base
urls.py file (ROOT_URLCONF).
in new url.py file I specify urlpatterns = pattern() not +=. It
Great link. I was really excited to try it.
Here is my new inline:
class rentalInline(admin.TabularInline):
model= Rent
extra = 3
raw_id_fields = ('movie',)
exclude = ['rented_by']
def save_formset(self, request, form, formset, change):
instances = formset.save(commit
Take a look at the save formset method:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#save-formset-self-request-form-formset-change
On Dec 27, 6:46 pm, Timboy wrote:
> I have an admin object where I want to pass in the request.user on
> save. It works fine in my normal admin class but
On Fri, Dec 26, 2008 at 2:34 AM, Russell Keith-Magee wrote:
>
> On Thu, Dec 25, 2008 at 9:02 AM, bsergean wrote:
> >
> > Hi all,
> >
> > I'm populating my database manually using a script that create ORM
> > objects and save them... I have a lot of datas and it's fairly slow.
> > I'm wondering w
I have an admin object where I want to pass in the request.user on
save. It works fine in my normal admin class but not for the inline
version.
(works fine here):
class RentAdmin(admin.ModelAdmin):
exclude = ['rented_by']
list_display = ('renter', 'movie', 'late', 'owed', 'paid',
'due_dat
Ah, as a noob I was not aware of context processors! Thanks!
On Dec 28, 5:13 am, bruno desthuilliers
wrote:
> On 27 déc, 17:42, Roy wrote:
>
> > How to create middleware that adds context variables?
> > Hi, anyone have any examples of the above?
>
> What's wrong with context processors ?
>
> h
On Sun, Dec 28, 2008 at 5:32 AM, adambossy wrote:
>
> Russ,
>
> Thanks for the reply. Specifically, I am wondering if there is some
> feature of the Models API that allows me to retrieve the foreign key
> object so that it is included in the serialized string. That is,
> without writing my own se
Hi,
I am fairly new to django, so if I missed a piece of documentation
that would describe what I want to do please feel free to redirect me,
I may have missed it in my search.
I have a pretty simple problem that I cannot quite get my head around.
I have a Many To Many relationship between UserP
On Sun, Dec 28, 2008 at 12:27 AM, Florian Lindner wrote:
>
> Hello,
>
> I'm trying to use the comment framework from Django 1.0.2.
>
> I've followed all the steps in
> http://docs.djangoproject.com/en/dev/ref/contrib/comments/
>
> (added it to installed apps, added to urls.py and loaded in the
Hi,
I tried to add comments app
http://docs.djangoproject.com/en/dev/ref/contrib/comments/,
now few things works but Preview sometimes acts as Submit when there
are no errors and I have no idea how to override Posted screen to
include link (or just redirect) to original page.
The documentation i
On 27 déc, 17:42, Roy wrote:
> How to create middleware that adds context variables?
> Hi, anyone have any examples of the above?
What's wrong with context processors ?
http://docs.djangoproject.com/en/dev/ref/templates/api/?#writing-your-own-context-processors
--~--~-~--~~
Russ,
Thanks for the reply. Specifically, I am wondering if there is some
feature of the Models API that allows me to retrieve the foreign key
object so that it is included in the serialized string. That is,
without writing my own serializer (which I suspect I may have to do).
Alternatively, I wa
No one has offered any help. That's fine, so let me ask my question
differently.
Can anyone point me to an example of form processing for formsets?
Let's say can_delete=True, how do I process that in my code?
I have scoured google and can find no examples, so any examples/links
would be apprecia
2008/12/27 Alessandro Ronchi :
> Il 16 dicembre 2008 19.20, Alessandro Ronchi
> ha scritto:
>> When google spiders our i18n translated django websites, does it try
>> and indicize all languages? is it possible to force the language by a
>> GET var (for example &language_code=en) ?
>
> I think it'
Hi all,
I'm new to Django, started out with 0.96 and very soon switched to 1.0
version. Here, I'm facing the following problem.
My Admin index page needs to have a small custom form snippet in
addition to all other usual things. It will be accommodated in the
admin_index page as follows:
{% bloc
I have middleware where I dynamically load (request.urlconf) urls.py
for each subdomain (application)..if I used (r'^(?P[a-zA-Z0-9-]
{4,20})/$', 'user'), its work with end slash and without, but (r'^(?
P[a-zA-Z0-9-]{4,20})/new/$', 'new'), works only with end
slash..why? I really dont understand wh
hi all:)
I have middleware where I dynamically (request.urlconf) load urls.py
for each subdomain (django application)..
if I used (r'^(?P[a-zA-Z0-9-]{4,20})/$', 'user'), its work with
end slash and without,
but (r'^(?P[a-zA-Z0-9-]{4,20})/new/$', 'new'), works only with
end slash..why?
I would like
the ability to edit posts would be nice :)
i figured out the issue and am now displaying relative urls to the
images.
now, to edit the delete function to remove the thumbnails as well...
On Dec 27, 1:21 pm, garagefan wrote:
> currently, self.image.name displays the absolute server path...
>
>
currently, self.image.name displays the absolute server path...
i want to change this so that when i call it, it either display the
relative path, or an absolute path for the website itself.
so instead of displaying /home/site/mysite/images/gallery/
imagename.jpg
it will display http://www.site
Hi, anyone have any examples of the above?
--~--~-~--~~~---~--~~
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
Hi.
I want to have html-code:
3
I do try it with forms.py:
pos = (
(1,1),
(2,2),
(3,3),
)
field1 = forms.CharField( widget=forms.widgets.Select(choices=pos))
but I get strings which not have parametr selected="selected".
How need change it so as to get it?
Thanks
--~--~-~-
Resolved, if I could say so :)
the problem was that I can't use reverse in forms.py 'cause is to
early for doing that :(
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
Hello,
I'm trying to use the comment framework from Django 1.0.2.
I've followed all the steps in
http://docs.djangoproject.com/en/dev/ref/contrib/comments/
(added it to installed apps, added to urls.py and loaded in the
template) but I get:
TemplateSyntaxError at /blog/1/
Invalid block ta
Maybe a better approach for this, can be override the save method for
your model and also exclude that field on your forms.
Actually there is a post from James Bennett at:
http://www.b-list.org/weblog/2008/dec/24/admin/
hope it helps,
regards,
Sergio Hinojosa
On Dec 26, 6:32 pm, eldonp2 wrot
On Sat, Dec 27, 2008 at 2:32 AM, Fridrik Mar Jonsson wrote:
>
> Hi Djangonians,
>
> I recently had an instance where it would have been really convenient
> to see the error and a traceback in the ``runserver`` console instead
> of just a single line telling me that the request returned a 500
> er
On Sat, Dec 27, 2008 at 7:48 AM, eldonp2 wrote:
>
> Is there a way to calculate and store the average rating in this
> example:
It's not entirely clear which part of this problem you want help with.
- Computing the average rating. The brute force approach would be to
iterate over the relevant
On Sat, Dec 27, 2008 at 2:11 PM, adambossy wrote:
>
> I have a model that refers to a ForeignKey, e.g.:
>
> class Template(models.Model):
> type = models.ForeignKey(Type)
> ...
>
> class Type(models.Model)
> name = models.CharField(max_length=32)
> ...
>
> I can fetch these objects fine using t
Il 16 dicembre 2008 19.20, Alessandro Ronchi
ha scritto:
> When google spiders our i18n translated django websites, does it try
> and indicize all languages? is it possible to force the language by a
> GET var (for example &language_code=en) ?
I think it's a critical problem.
We spend time to ma
{% for %} itself
On 12/27/08, Vicky wrote:
>
> Is there a way to access the previous value of a for loop in
> templates. Can anyone tell the template representation for the python
> code like:
>
> for i,j in enumerate(item):
> ...
> >
>
--
---
А
Is there a way to access the previous value of a for loop in
templates. Can anyone tell the template representation for the python
code like:
for i,j in enumerate(item):
...
--~--~-~--~~~---~--~~
You received this me
2008/12/27 evenrik :
>
> So I need to display the data for a form field from the post or from
> the instance if no post. This works but I am hoping there is a better
> way:
>
> {% if form.is_bound %}
>{{ form.data.foo }}
> {% else %}
>{{ form.instance.foo }}
> {% endif %}
>
> Any
32 matches
Mail list logo