{{a.nat_balance}}
sure it shouldn't be spelt
{{a.net_balance}}
?
On Wednesday, 14 June 2017 06:57:30 UTC+10, suabiut wrote:
>
> Hi ludovic,
> Thanks for your response.
> when i did what you say it print out the date and sum in an array. Date
> still in Julian date but i don't worry about the d
documentation examples spans
results over two
different multi-valued relationships (authors and store).
Hope that makes things a bit clearer to you,
Best,
Simon
Le vendredi 11 août 2017 16:32:42 UTC-4, gaazkamm a écrit :
>
>
> The documentation advises against combining multiple annotatio
stall python3.5.
Best,
Simon
[0] https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes
Le dimanche 13 août 2017 08:51:17 UTC-4, Seo Brain a écrit :
>
> Hi, the question is about which python version suppose to use. On web
> server is ubuntu 14.4 - python v3.4 (i assume) with virtualen
or
trial and error?
Best,
Simon
Le jeudi 21 septembre 2017 10:13:11 UTC-4, Jason a écrit :
>
> I have a model in which I was trying to get a count for records that
> matched three variable values and found an interesting edge case not in the
> documents
> for condi
27;status_month',
).annotate(
progress_sum=Sum(actual_progress)
)
That will return an iterable of lists of the form [activity_id,
status_month, progress_sum]
If you want to annotate your Activity instances you'll need to use window
functions[0].
Simon
[0]
https://docs.djangoproject.c
like Oracle 11g has not been supported since August 2013 [3]
If you can't upgrade your Oracle setup I suggest you consider moving to a
different database such as PostgreSQL.
Simon
[0]
https://docs.djangoproject.com/en/3.0/releases/3.0/#dropped-support-for-oracle-12-1
E_CODE = 'fr' plutôt que 'fr-fr'
Simon
Le jeudi 26 mars 2020 21:47:11 UTC-4, Anselme SERI a écrit :
>
> Je suis un nouveau dans le développement python et je teste actuellement
> Django.
> Il m'est impossible d'utiliser le language_code 'fr-fr'
|
| 2 |
++
This ORM level check is to prevent you from shooting yourself in the foot
by expecting that providing a zero will assign this value.
Cheers,
Simon
Le lundi 6 avril 2020 09:35:22 UTC-4, Hamza Mirchi a écrit :
>
> Hi Everyone,
>
> I'm Saving My Mail Model but
Something in your code is assigning a id=0 to Mail before calling .save()
on it.
If you identify its origin then removing it should address your problem.
Simon
Le lundi 6 avril 2020 11:51:46 UTC-4, Hamza Mirchi a écrit :
>
> How Can I Fix That Via Django?
>
> On Mon, Apr 6, 2020
Try to include the dependencies inside the block content. Here is what I did
{% block content %}
{% load bootstrap3 %}
{% bootstrap_css %}
{% bootstrap_javascript %}
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this g
Is it in you installed apps?
On Sat, May 16, 2020, 22:04 sunday honesty wrote:
> I did that and got a TemplateSyntaxError stating that bootstrap4 is not a
> registered tag library
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group
Try to run the pip install command if you havent already. Check the correct
command to install bootstrap3 or 4 if forgot the complete package name.
On Sat, May 16, 2020, 22:45 sunday honesty wrote:
> I included it to installed app and got an error message on the console.
> "Module not found, no
did
> other bootstrap features worked well except for the dropdown?
>
> On Sat, May 16, 2020, 3:51 PM sunday honesty
> wrote:
>
>> All right
>>
>> On Sat, May 16, 2020, 3:49 PM Simon A wrote:
>>
>>> Try to run the pip install command if you haven
Hi Angit,
It shouldn't be an issue since Django's default password hashers are not
relying on settings.SECRET_KEY.
Simon
Le mercredi 5 août 2015 05:12:47 UTC-4, Ankit Agrawal a écrit :
>
>
>
> Hi everyone,
>
>
> I have a Django powered site(Pro
com/en/1.8/topics/testing/tools/
Thanks again,
Simon
On Monday, July 20, 2015 at 11:03:42 AM UTC+1, simon.s...@eporta.com wrote:
>
> Hi Tim,
>
> Thanks again for the responses. Tom is now on holiday for a week but we'll
> pick up where he left off and try to replicate
n/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fields>,
just make sure you also override ModelAdmin.get_readonly_fields()
<https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_readonly_fields>
to return them as well.
Cheers,
Simon
Le mard
a
patch/PR if you don't want the ticket to rot in Trac make it to Django 1.9
which should enter feature freeze soon enough. I'd be glad to review your
proposed changes if you're interested.
Simon
Le mercredi 9 septembre 2015 10:31:12 UTC-4, Malcolm Box a écrit :
>
> Hi Simon,
&
going on here but I highly doubt checks are
ran against the get_readonly_fields() return value since it's a method
bound to a ModelAdmin instance and requires a `request` argument to be
called in the first place.
Simon
Le jeudi 10 septembre 2015 06:27:13 UTC-4, Malcolm Box a écrit :
is only the properties of the instances should be checked and not the
return value of methods that could depend on request properties such as the
user.
Simon
Le jeudi 10 septembre 2015 13:32:32 UTC-4, Malcolm Box a écrit :
>
> Hi Simon,
>
> On Thursday, 10 September 2015 16:57:51 UTC+1,
ct.lesson_id].append(lesson_subject.subject)
Simon
Le mercredi 16 septembre 2015 04:54:13 UTC-4, Erik Cederstrand a écrit :
>
> Hi folks,
>
> I'm working on a school timetable app. I want to fetch hundreds of
> thousands of Lesson instances with prefetched m2m relations
Hi Jose,
I looks like ibm_db_django doesn't support Django 1.6+ yet
<https://pypi.python.org/pypi/ibm_db_django/>.
Simon
Le lundi 21 septembre 2015 07:14:39 UTC-4, Jose Paul a écrit :
>
> I am trying to run DJango 1.8 test cases with DB2
>
> Several insert statement
_past_date(value):
if value > datetime.date.today():
raise ValidationError('This date can't be in the future')
Cheers,
Simon
Le mercredi 23 septembre 2015 17:06:54 UTC-4, felix a écrit :
>
>
> When today's date is entered in the form it shows a form er
Hi Felix,
>From what I know model and form DateField are completely TIME_ZONE
agnostics.
This is not the case for DateTimeField however. Is this what you're using?
Simon
Le jeudi 24 septembre 2015 15:13:01 UTC-4, felix a écrit :
>
> El 23/09/15 17:12, felix escribió:
>
>
m and your approach is safe.
Could you add a mention on the ticket tracking this feature addition about
the workaround you and your team used to achieve similar results? I think
this could be valuable to other users until the ticket is fixed.
Cheers,
Simon
Le lundi 28 septembre 2015 09:56:58
You'll want to use
Because François' suggestion will break if you use a static file storage
that doesn't
allow missing files reference such as the ManifestStaticFilesStorage
<https://docs.djangoproject.com/en/1.8/ref/contrib/staticfiles/#manifeststaticfilesstorage>
define Model form for your models and use them to
perform conversion and validation of your scrapped data.
Simon
Le mercredi 21 octobre 2015 13:49:08 UTC-4, Yunti a écrit :
>
> I have a django project where I want to save web scraped data to the
> database via the django ORM- which will be u
ext even if now rows match
the provided id?
Simon
Le mercredi 21 octobre 2015 18:01:50 UTC-4, Joakim Hove a écrit :
>
> Hello;
>
> this arises in the context of a django application - but it might be a
> more general Python/Postgres/... problem.
>
> [ The django application
Hi Gagaro,
Intermediate models are just like other in this regard, they create a
related relation hence the reported clash.
You should either add related_name='+' on your Wishlist related fields or
give them a unique name.
Simon
Le vendredi 23 octobre 2015 06:01:30 UTC-4, Gaga
ppens with
this implicit query name.
Simon
Le vendredi 23 octobre 2015 10:27:26 UTC-4, Gagaro a écrit :
>
> Hi Simon, thanks for the answer, it cleared some things up.
>
> However, I still have a question. The reverse relation is *wishlist_set*
> by default. Why is Django bothe
I would add that since migration files are normal Python modules you can
simply replace the previously imported callable in the referencing
migrations by inlining it.
Simon
Le mercredi 28 octobre 2015 11:33:28 UTC-4, Tim Graham a écrit :
>
> Please read
> https://docs.djangoproje
today()
return self.filter(start__date=today)
class Entry(models.Model):
start = models.DateTimeField()
objects = EntryQuerySet.as_manager()
Are you sure you are actually using Django 1.9?
Simon
Le mercredi 4 novembre 2015 14:45:33 UTC+1, aprzy...@gmail.com a écrit :
>
> Hello,
>
relationship.
Thanks,
Simon
Le jeudi 5 novembre 2015 15:04:31 UTC+1, mccc a écrit :
>
> I'm using a Prefetch object to follow some GenericRelation, and I was
> playing around with the to_attr parameter;
> I had the DB debug turned on, as I was checking whether it was making any
&g
escriptor for the specified `to_attr` at least
until this behavior is deprecated since it looks like a major footgun to me.
I guess we should move the discussion to the development mailing list
<https://groups.google.com/forum/#!forum/django-developers> to gather
feedback.
Au plaisir,
Simon
Hi Michele,
I don't if someone beat you to it but a ticket for this exact issue just
surfaced[1].
Please chime in on Trac if you'd like to follow the progress of the
resolution.
Thanks,
Simon
[1] https://code.djangoproject.com/ticket/25693
Le vendredi 6 novembre 2015 11:01:35 UTC
thub.com/django/django/blob/53ccffdb8c8e47a4d4304df453d8c79a9be295ab/django/contrib/auth/apps.py#L14-L17>
.
Cheers,
Simon
Le mercredi 11 novembre 2015 11:06:18 UTC-5, frocco a écrit :
>
> This is still not working.
>
>
> On Tuesday, November 10, 2015 at 11:36:39 AM UTC-5, frocco wro
JOINed by default
(unless values() and friends are involved).
Django should warn you about this. Please file a new bug ticket
<https://code.djangoproject.com/newticket> so we don't loose track of this
issue.
Thanks!
Simon
Le samedi 14 novembre 2015 08:03:56 UTC-5, Gilad a écrit :
&
com/newticket> to track your effort.
Simon
Le samedi 14 novembre 2015 10:03:57 UTC-5, Tim Graham a écrit :
>
> I guess it would be backwards incompatible if we changed the behavior now,
> wouldn't it?
>
> On Friday, November 13, 2015 at 1:40:27 PM UTC-5, Alejandro Do Nascime
isplay = ['text_field_ellipsis']
def text_field_ellipsis(self, obj):
if len(obj.text_field) > max_length:
return "%s..." % obj.text_field[:max_length]
return obj.text_field
Cheers,
Simon
Le samedi 14 novembre 2015 10:49:09 UTC-5, Jorge Fernandez-de-Cossio
Hi Daniels,
There's a tentative API being worked on Github. You might want to have a
look at it <https://github.com/django/django/pull/5637>.
Simon
Le samedi 14 novembre 2015 13:38:18 UTC-5, daniels a écrit :
>
> The only method that seems to be working is adding the decora
With all respect Jani, I do not think this is the right answer. Django-cms
per se does not give top level access to the views, so integrating pure
python is not as easy as it sounds. Adam
On Wednesday, November 18, 2015 at 3:50:46 AM UTC-8, Jani Tiainen wrote:
>
> Then I suggest that you do
Hi Zac,
There's a ticket <https://code.djangoproject.com/ticket/25452> and a pull
request <https://github.com/django/django/pull/5612/files> suggesting to
improve the actual email validation based on RFCs.
You might want to join the conversation there.
Simon
Le mardi 1 dé
Hi Cajetan,
You can visit the ticket [1] and have a look and the
commit messages. In this case the fix have been
backported to 1.7.4[2] and should be part of Django 1.8+.
Simon
[1] https://code.djangoproject.com/ticket/24163
[2]
https://github.com/django/django/commit
.Model):
all_pizzas = models.ManyToManyField(
Pizza, related_name='available_toppings',
verbose_name='available pizzas'
)
Cheers,
Simon
[1] https://docs.djangoproject.com/en/1.8/releases/1.8/#model-meta-api
[2]
https://docs
hould have a `model`
attribute.
Please file a new bug ticket[1] for 1.9.
Thanks,
Simon
[1] https://code.djangoproject.com/newticket
Le vendredi 4 décembre 2015 07:16:32 UTC-5, J. Gourds a écrit :
>
> Nested ArrayField seems to be broken in 1.9, it creates an error when
> running the
).contribute_to_class(model, name)
setattr(model, name, Converter(self))
This is mostly what SubfieldBase use to do.
Cheers,
Simon
Le samedi 5 décembre 2015 12:04:10 UTC-5, matus moravcik a écrit :
>
> Hi,
>
> according to the docs, SubfieldBase is going to be removed in 1.10
Hi Alejandro,
Did you get the reply to your previous similar question[1]?
Simon
[1] https://groups.google.com/d/topic/django-users/OGavpqJrw6g/discussion
Le mercredi 9 décembre 2015 03:13:46 UTC-5, Alejandro Do Nascimento a
écrit :
>
> Hello,
>
> I have a doubt, In a model I'
Hi Larry,
It's more of a JavaScript question but my first guess would be
you'd need to use the `type` option instead of `method` because
you are using an old version of jQuery?
Simon
Le mardi 15 décembre 2015 17:25:12 UTC-5, larry@gmail.com a écrit :
>
> I am sending an a
Hi Billlu,
Does one your model use an ArrayField?
Le samedi 26 décembre 2015 01:34:02 UTC-5, Billu a écrit :
>
> I'm trying to make a single choice quiz (i.e. Choose one from 4 options).
> I'll populate the quiz (with 30 questions) depending upon what topic the
> user chooses. I'm made some mod
Hi Mark,
I suppose you opened #26045 <https://code.djangoproject.com/ticket/26045>
about the same issue.
Are you using PostgreSQL? If it's the case the issue I suppose the issue is
fixed
in Django 1.9
<https://github.com/django/django/commit/dc27f3ee0c3eb9bb17d6cb764788eeaf73a3
) Restart your server.
Simon
Le vendredi 8 janvier 2016 09:19:30 UTC-5, Andrzej Mateja a écrit :
>
> Hi,
>
> I have a problem with using CachedStaticFilesStorage as a
> STATICFILES_STORAGE and with external package containing its own static
> files (easy_select2 to be specifi
sible share the full traceback of the error raised when
`collectstatic --traceback` is run.
Simon
Le vendredi 8 janvier 2016 15:36:54 UTC-5, Andrzej Mateja a écrit :
>
> Thank you Simon for sharing your remarks although it is not the case what
> you described. I'm talking about de
Hi Nicholas,
These warnings should be safe to ignore.
See 1.9 release notes
<https://docs.djangoproject.com/en/1.9/releases/1.9/#syntaxerror-when-installing-django-setuptools-5-5-x>
for more details.
Simon
Le samedi 9 janvier 2016 16:30:14 UTC-5, Nicholas Geovanis a écrit :
>
Hi,
These warnings are safe to ignore, please see 1.9 release notes for more
details
<https://docs.djangoproject.com/en/1.9/releases/1.9/#syntaxerror-when-installing-django-setuptools-5-5-x>
.
Simon
Le mardi 12 janvier 2016 12:06:43 UTC-5, Kshitij Saraogi a écrit :
>
> Hell
Hi Manimaran,
I can't help you much with the details you provided.
Could you come with an example project to reproduce your issue?
Simon
Le vendredi 15 janvier 2016 10:41:03 UTC-5, manim...@ishafoundation.org a
écrit :
>
> Hi Simon,
>
> I am also facing the issue. the thing
F('end') - F('start'), output_field=DurationField()
)
).filter(duration__gte=timedelta(minutes=time_in_minutes)
Cheers,
Simon
Le mardi 19 janvier 2016 13:01:36 UTC-5, Steven Nash a écrit :
>
> Hi,
>
> Given an object such as:
>
> class Entry(models.Mo
Hi Steve,
It looks like it might only work on PostgreSQL unti this bug
<https://code.djangoproject.com/ticket/24793> is fixed.
Simon
Le mardi 19 janvier 2016 14:59:57 UTC-5, Steven Nash a écrit :
>
> Hi Simon,
>
> Thanks, I'll give that ago.
>
> Cheers,
>
&g
Hi Bobby,
I'm not sure this is what you are looking for but it looks like
`connection_created`[1] signal might do.
Cheers,
Simon
[1] https://docs.djangoproject.com/en/1.9/ref/signals/#connection-created
Le mercredi 3 février 2016 12:25:36 UTC-5, Bobby Mozumder a écrit :
>
> I'
code base without shipping the boilerplate required to handle the
conversion correctly.
If you can't use Python 3 now I suggest you do as documented and use the
`python_2_unicode_compatible` decorator as it will make your future
transition
to Python 3 easier.
Cheers,
Simon
Le jeudi 11 fé
This is only the case for superusers have you might have noticed.
Le dimanche 21 février 2016 15:26:54 UTC-5, setivo...@gmail.com a écrit :
>
> Code in ipython
> -
>
> In [51]: from django.contrib.auth.models import User
>
> In [52]: User.objects.all()
> Out
t = {
'recipe': recipe,
}
return HttpResponse(template.render(context, request))
but it seems I am not allowed to modify the recipes object. Any ideas how
to pass all the data which belongs to recipe to the template?
Thank you,
Simon
--
You received this message because
Thank you Rahul,
I actually tried that an this is possible for the relationship between a
recipe and its steps. But when it comes to the ingredients for a single
step, I cannot do this any more since the ingredients depend on steps
again. After reading your suggestion I thought about it once mo
my queries with django; I can
finally list my steps using:
{% for step in recipe.steps.all %}
within my template. However, given the model above I am still not sure how
to access a single steps ingredients ... any ideas or suggestions on my
current model?
Thanks, Simon
--
You received this mes
Ok ... but how can I access the additional information stored in
StepIngredient then?
And - to ask more general - is there a way to find all the "nested objects"
attached to my current objects? Something to enter in the shell to see
__all__ attributes; not just _meta.fields?
--
You received t
(yet interesting) discussion here. My current issue is how to access the
additional fields of my M2M relationship. In addition to that I will think
about hierarchical data in relational databases ;-)
Thanks, Simon
--
http://www.slideshare.net/billkarwin/models-for-hierarchical-data
--
You rec
Thank you Florian. After James pointed out that I can access my steps (and
the ingredients in some way) by just passing the recipe object to the
templates context, I thought of reducing the view to a DetailView again.
But I have to somehow access the ingredients from my template for now ...
--
Hi Girish,
I think you didn't to install the `tblib` package[1].
Cheers,
Simon
[1]
https://docs.djangoproject.com/en/1.9/ref/django-admin/#cmdoption-test--parallel
Le lundi 29 février 2016 12:13:08 UTC-5, girish ramnani a écrit :
>
> when running the django test in paralle
Hi Aaron,
I think this could be related to the version of your PostgreSQL server.
Django 1.9 dropped support for PostgreSQL 9.0[1] which doesn't support
GROUP BY selected primary keys[2].
Cheers,
Simon
[1]
https://docs.djangoproject.com/en/1.9/releases/1.9/#dropped-support-for-postgresq
ons)s)'
# ...
MyModel.objects.aggregate(
ArrayAgg(Row(F('field1'), F('field2'))),
)
Cheers,
Simon
[1]
https://docs.djangoproject.com/en/1.9/ref/models/expressions/#writing-your-own-query-expressions
Le lundi 29 février 2016 19:31:15 UTC-5, Tomasz Nowa
Thank you James. Taking your suggestion, I solved it!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this
;with-tag' or 'install some add-ons'. According to Mikes former suggestion,
I expected something easy and elegant here ...
regards, Simon
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group
Hi Jonty,
There's a ticket tracking the addition of this feature[1] but it has not
been fixed yet.
Cheers,
Simon
[1] https://code.djangoproject.com/ticket/16735
Le vendredi 4 mars 2016 08:09:20 UTC-5, Jonty Needham a écrit :
>
> Is there a way to do it? I've seen the method
Hi Jonty,
There's a ticket tracking the addition of this feature[1] but it has not
been fixed yet.
Cheers,
Simon
[1] https://code.djangoproject.com/ticket/16735
Le vendredi 4 mars 2016 08:09:20 UTC-5, Jonty Needham a écrit :
>
> Is there a way to do it? I've seen the method
queryset's SQL representation would also be useful
(str(queryset.query)).
Cheers,
Simon
Le vendredi 4 mars 2016 09:57:43 UTC-5, Tomasz Nowak a écrit :
>
> Hi Simon, thank you for your suggestion!
> I managed to accomplish that for one column with custom ROW function and
>
rated?
Meanwhile I'll have a look at both your custom expressions to try to
identify
the bug.
Simon
Le vendredi 4 mars 2016 16:02:14 UTC-5, Tomasz Nowak a écrit :
>
> Hi!
>
> I would like to create a JSON structure of chosen objects (animals) with
> corresponding events in one
ber')],
output_field=CharField()
)
),
examinations=JsonAgg(
JsonBuildObject(
[F('wynikbadania__date_entered')], output_field=CharField()
)
),
).distinct('life_number', 'inseminacja__id', 'wynikbadania__id'
do I merge
templates? How do I do the URL-routing? Any ideas on how to set this up in
a smart way?
thanks, Simon
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
t to get notified when it's finally
fixed and rely on .raw()[3] until then.
Cheers,
Simon
[1] https://code.djangoproject.com/ticket/10060
[2]
https://docs.djangoproject.com/en/1.9/topics/db/aggregation/#combining-multiple-aggregations
[3]
https://docs.djangoproject.com/en/1.9/topics/db/sq
_zps_calculated_id_6844dce0603174b2_fk_cartography_zps_id"
FOREIGN KEY ("zps_calculated_id")
REFERENCES "cartography"."zps" ("id") DEFERRABLE INITIALLY DEFERRED;
""")],
[AlterField(
model_name='myModel',
oformat()
> '2016-01-01T01:01:01'
Cheers,
Simon
> e.default(datetime.datetime(year=2016, month=1, day=1, hour=1, minute=1,
second=1, microsecond=123456))
> '2016-01-01T01:01:01.123'
I think always including the microseconds could make sense but since it
might have b
It looks like I talked to fast.
The microseconds are explicitly stripped because the string format used is
based on ECMA-262:
http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15
>From what I understand JavaScript dates are limited to millisecond
precision.
Simon
Le jeudi 10 m
e hard to fix correctly as `Coalesce` can be nested.
e.g.
# This should return `0`
Coalesce(Coalesce(Sum('quantity'), Value(0)), F('other_field'))
Cheers,
Simon
[1]
https://github.com/django/django/blob/2e0cd26ffb29189add1e0435913fd1490f52b20d/django/db/models/lookups.py#L221-L2
form or template layer.
Cheers,
Simon
[1] https://docs.djangoproject.com/en/1.9/releases/1.8/#subfieldbase
[2]
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.Field.from_db_value
Le jeudi 31 mars 2016 10:15:38 UTC-4, Fabio Caritas Barrionuevo da Luz a
écrit
).values('title','moyenne')
Au plaisir,
Simon
[1]
https://github.com/django/django/blob/fdf5cd3429369954e8deb764d9f30f6374581613/django/db/models/aggregates.py#L45
[2] https://docs.djangoproject.com/en/1.9/ref/models/fields/#durationfield
[3]
https://github.com/django/
Hi Tazo,
I just submitted a patch that correctly resolves the `output_field` of `Avg`
over non-numeric fields.
If it gets merged you shouldn't have to worry about passing an explicit
`output_field=DurationField()` in Django 1.10.
Simon
Le lundi 4 avril 2016 09:46:53 UTC-4, Tazo Gil a
ord")
4. Enforce the usage of at least one numeric character
You could also define your own rules and add them to
AUTH_PASSWORD_VALIDATORS,
Simon
[1]
https://docs.djangoproject.com/en/1.9/topics/auth/passwords/#module-django.contrib.auth.password_validation
Le mercredi 20 avril 2016 06:44
I know that the standard way to do this is to create a script tag with
a global JS variable in your Django template before you import your
other JS files but that won't work for my current situation.
I have an article detail view which is a single model instance. But I
also have a list of comment
#x27;ll do that then.
Simon.
On Mon, 11 Jun 2018 at 02:04, Vijay Khemlani wrote:
>
> I'm not sure why your code does not work (maybe there is a "race condition"
> between the JS click handlers), but that global variable is a bad idea in
> general.
>
> You can add th
r_by():
Financial.objects.order_by().values('financial_year').annotate(Sum('revenue'))
FWIW there's currently an issue to stop automatically considering
Meta.ordering when performing
GROUP'ing through values().[0][1]
Best,
Simon
[0] https://code.djangoproject.com
Hey James,
Just to add to what was already said there's a ticket tracking the addition
of
database level foreign constraints.[0]
Cheers,
Simon
[0] https://code.djangoproject.com/ticket/21961
Le samedi 23 juin 2018 09:56:23 UTC-4, Tomasz Knapik a écrit :
>
> If you search abou
item.product.image from your template points to nothing. Product is a CharField
so I don't see it having any image attribute.
Try to display some text for item.product or item.price and see how you go.
--
You received this message because you are subscribed to the Google Groups
"Django users"
There's two open tickets to work around this issue.
https://code.djangoproject.com/ticket/25464 which allows passing queryset
override to be used for retrieval and another one that I can't currently
find that allows specifying that a subquery should be used instead of a an
IN clau
There is some discussion on the topic here:
https://www.reddit.com/r/django/comments/8xcbtq/book_announcement_building_multi_tenant/
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsub
=0)
class Reservation(models.Model):
...
event = models.ForeignKey(Event, related_name='reservations')
seats = models.PositiveIntegerField(default=0)
And perform the following query
Event.objects.annotate(
seats_remaining=F('seating') - Sum('reservations__se
The annotate(seats_remaining=...) will add a `seats_remaining` attribute to
Event
instances returned from the queryset so you should be able to use
{{i.seats_remaining }}
Cheers,
Le vendredi 7 septembre 2018 04:38:05 UTC-4, mab.mo...@gmail.com a écrit :
>
> Thank you Simon.
>
> I
Hello Michèl,
I'm pretty sure you hit #28862[0] which should be fixed in Django 2.2.
Here's the PR resolving it if you're curious about it[1].
Cheers,
[0] https://code.djangoproject.com/ticket/28862
[1] https://github.com/django/django/pull/10178
Le mercredi 12 septembre 2018 06:29:30 UTC-4, M
Hey Mike,
Please provide the full traceback.
Also, since all your conditions are ANDed you could use a dict to build
filter() kwargs instead of Q() objects.
Cheers,
Simon
Le mercredi 19 septembre 2018 10:36:13 UTC-4, Matthew Pava a écrit :
>
> I’m not entirely sure if the error is from
Hi itsnate_b,
Would you mind elaborating on your fix?
I'm getting this exact error and I'm at a complete loss. Everything works
fine in local, but on my live server, after a couple of minutes/hours of
working fine, I start getting this error in the logs.
Thanks!
Le dimanche 2 septembre 2018
Are you sure you are using Django 1.11?
What does ./run.sh manage --version yields?
User/AnonymousUser was made a property in Django 2.0+ which I assume your
version of Django CMS is not compatible with.
Best,
Simon
Le jeudi 11 octobre 2018 14:26:27 UTC-4, Stefan Bethke a écrit :
>
>
://github.com/django/django/blob/66ac7a129a70a225adc263602bcf7f5750698e8d/django/contrib/auth/models.py#L428-L433
Which is why I suspect you have Django 2.0+ installed.
Cheers,
Simon
Le jeudi 11 octobre 2018 14:58:33 UTC-4, Simon Charette a écrit :
>
> Are you sure you are using Django 1.11?
>
&g
501 - 600 of 710 matches
Mail list logo