Hi,
I have a problem:
Python:
week = [1, 2, 3, 4, 5, 6, 7]
# There are only two records in objects_list with date_start field =
01.01.2000 and 02.01.2000
objects_list = SomeModel.objects.all()
Template:
{% for day in week %}
{% for e in objects_list %}
{% ifequal e.date_start|date:"j" da
Hi,
I have a problem (Django 1.1. alpha SVN):
Python:
week = [1, 2, 3, 4, 5, 6, 7]
# There are only two records in objects_list with date_start field =
01.01.2000 and 02.01.2000
objects_list = SomeModel.objects.all()
Template:
{% for day in week %}
{% for e in objects_list %}
{# date:"j
Hi,
I have a problem with Django Orm annotate method..
My models (application: app):
class File(models.Model):
name = models.CharField(max_length=255)
file = MyFileField(upload_to=...)
class Visit(models.Model):
file = models.ForeignKey(File)
class Comment(models.Model):
file = models
I'm using latest SVN version of Django (10105 revision)
regards.
--~--~-~--~~~---~--~~
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
> Seems like you're seeing this:http://code.djangoproject.com/ticket/10060
Yes, It's a big bug.
> Try to add distinct() to query set.
It's work.. Thanks Alex... distinct is not very fast but it's last way
to fix the problem...
Proper query:
e = File.objects.annotate(comment_cnt=Count('comment',
How to pass to the Sum() function (ORM) more than one field?
My problem:
class Model1(models.Model):
name = models.CharField(u'Name', max_length=255)
class Model2(models.Model):
fk1 = models.ForeignKey(Model1, related_name='fk_1')
fk2 = models.ForeignKey(Model1, related_name='fk_2')
anybody?
On 23 Mar, 16:17, eli wrote:
> How to pass to the Sum() function (ORM) more than one field?
>
> My problem:
>
> class Model1(models.Model):
> name = models.CharField(u'Name', max_length=255)
>
> class Model2(models.Model):
> fk1 = models.
Hi,
I have problem with Django Forms and field with set attrs to
disabled="disabled"
# forms.py
class EditForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(EditForm, self).__init__(*args, **kwargs)
self.fields['title'].widget.attrs.update({'readonly':
'reado
Thanks for help.
regards.
--~--~-~--~~~---~--~~
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
Hi,
How to add custom static url (they are not in database) to Django
Sitemap? for ex: /about-me.html, /contact.html, /some-static-url.html
regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
:
> Hi eli,
>
> If you want serve a "static file" (that never changes and doesn't take
> advantage of django's template system) then you shouldn't be serving
> it with django. You can use django if you really
> want:http://docs.djangoproject.com/en/dev/howto/
Hi,
It's a good idea to logging errors, notices etc using python module
logging in app under production mode (Nginx)?
I know about for ex: sending error:500 emails to admins etc, but
sometimes I want to log errors and lets app go on.
(I'm talking about logging errors to the file, and later send
I have problem when tag is called from for loop in template. It's
called only once (sic!). Why?
--~--~-~--~~~---~--~~
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@g
Thank You.
regards.
On 23 Mar, 23:58, Russell Keith-Magee wrote:
> On Tue, Mar 24, 2009 at 12:17 AM, eli wrote:
>
> > How to pass to the Sum() function (ORM) more than one field?
>
> > My problem:
>
> > class Model1(models.Model):
> > name = mode
Hi,
What is the best way to add button "previous step" to multi-steps
form ?
Thank You.
regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
anybody ? :-)
regards.
On 4 Kwi, 11:17, eli wrote:
> Hi,
>
> What is the best way to add button "previous step" to multi-steps
> form ?
>
> Thank You.
>
> regards.
--~--~-~--~~~---~--~~
You received this message because you a
unt of conditional logic (e.g. if stepone then show this form
> elseif steptwo show this form)?
>
> On Apr 5, 1:14 pm, eli wrote:
>
> > anybody ? :-)
>
> > regards.
>
> > On 4 Kwi, 11:17, eli wrote:
> > I have no problem reading existing docs if you k
No, how to add functionality to back to the previous step without
deleting current step's data.
regards.
On 5 Kwi, 22:39, codecowboy wrote:
> Are you asking how to modify the html in the multi-step-form app to
> add a button?
>
> On Apr 5, 4:33 pm, eli wrote:
>
> >
Thank You Elliott.
regards.
On 6 Kwi, 11:52, Elliott wrote:
> On Apr 5, 4:24 pm, eli wrote:
>
> > No, how to add functionality to back to the previous step without
> > deleting current step's data.
>
> > regards.
>
> That can't be done wi
On 13 Kwi, 21:10, Alex Gaynor wrote:
> Provide a custom form to the ModelAdmin using the form
> option:http://docs.djangoproject.com/en/dev/ref/contrib/admin/#form
>
> Alex
>
Oh, it's so simple.. :-)
Thank You Alex
regards.
--~--~-~--~~~---~--~~
You received th
Hi,
How can I to validate data from form in Django Admin Panel? (like:
clena_fieldname in form.ModelForm) ?
regards.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Hi,
I have a problem with GenericRelation ...
My code:
class Comment(models.Model):
text = models.TextField()
content_type = models.ForeignKey(ContentType, blank=True,
null=True)
object_id = models.PositiveIntegerField(blank=True, null=True)
content_object = generic.GenericForei
Thank You Alex. This patch will be available in Django 1.1 ?
On 22 Kwi, 16:56, Alex Gaynor wrote:
> On Wed, Apr 22, 2009 at 10:49 AM, eli wrote:
>
> > Hi,
>
> > I have a problem with GenericRelation ...
>
> > My code:
>
> > class Comment(models
Hi,
I have problem:
In my template, I have some inputs with multiple name like:
How to get this data from request.POST in view method?
I tried:
- request.POST.get('values', None)
- request.POST.get('values[]', None)
but didn't wokr..
Thank You.
regards.
--~--~-~--~~---
Ok, I'm going to use string (like: items_{{ data.id }})
Thanks.
regards.
On 26 Kwi, 21:31, Malcolm Tredinnick wrote:
> On Sun, 2009-04-26 at 10:20 -0700, eli wrote:
> > Hi,
>
> > I have problem:
> > In my template, I have some inputs with multiple name lik
Hi,
I have problem with save_form, save_model, save_formset methods in
Admin class admin.TabularInline.
class AAdmin(admin.TabularInline):
model = A1
extra = 3
def save_form(self, request, form, change):
print "form"
return form.save(commit=False)
def save_model
Ok, I overloaded save_formset in BAdmin and everything works fine.
Thank You.
On 1 Maj, 16:46, George Song wrote:
> On 5/1/2009 4:29 AM, eli wrote:
>
>
>
> > Hi,
>
> > I have problem with save_form, save_model, save_formset methods in
> > Admin class admin.
Hi Guys,
A noob here,
I have two models,
class Students(CommonInfo):
first_name = models.CharField(max_length=75)
surname = models.CharField(max_length=75)
class_score = models.ForeignKey(Course, related_name='course')
exam_score = models.ForeignKey('House')
n is to put the condition in get and check there and return
redirect. But that seems hacky.
I'm just wonder whats the best way to do this.
Eli Criffield
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on
I like the raise exception idea, but where do i catch it?
In a decorator?
Overwrite get() ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/KMhk4RFokUAJ.
T
30 matches
Mail list logo