then moved to /user/accounts/.
I have added the get_success_url to point to the correct URL using reverse but
even that doesn't work. Can someone help me out with this please?
Thank you.
Simon.
--
You received this message because you are subscribed to the Google Groups
"Django users&q
?
Thank you.
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 email
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web vi
extension so I removed them all (apart from
Bitwarden) and completely cleared the history but none of that seems to have
fixed the issue.
I'm at a loss. Can someone suggest what might be going on here? As I said it
works fine in Chrome.
Simon.
--
You received this message because you are subscribed
Sun, 24 Sept 2023 at 22:37, 'Simon Connah' via Django users
> wrote:
>
> > I can write a unit test which checks say the title on a page and compares
> > it to a string but that is really prone to breakage. What I want to do
> > instead is to check that the template that is
I can write a unit test which checks say the title on a page and compares it to
a string but that is really prone to breakage. What I want to do instead is to
check that the template that is returned by the URL is the same one that is
expected in the unit test. Is there an easy way to do this?
s file
>
> On Mon, Sep 18, 2023 at 5:28 PM 'Simon Connah' via Django users
> wrote:
>
> > Hi,
> >
> > I have an app which has a lot of views and URLs and keeping them in just
> > one file makes it really hard to manage because it is so long. I'd like to
> &g
about doing that
is.
Can someone point me in the right direction please?
Thank you!
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 email
to dj
26, 2023, 16:23 'Simon Connah' via Django users
> wrote:
>
> > Thank you! That is very helpful.
> >
> >
> > --- Original Message ---
> > On Saturday, August 26th, 2023 at 14:07, Ruby
> > wrote:
> >
> >
> > > Yo
efault/#django.contrib.auth.decorators.user_passes_test)
>
> On Sat, Aug 26, 2023, 11:20 'Simon Connah' via Django users
> wrote:
>
> > I want to make sure that the only people who can update and delete an
> > object are either superusers or the person that originally created them but
> > I'm not sure h
I want to make sure that the only people who can update and delete an object
are either superusers or the person that originally created them but I'm not
sure how to go about doing it. Can someone point me in the right direction?
I'm not sure which method(s) to override.
Thank you.
--
You
Hi,
I want to make a blogging platform and have a question about organising the
project.
With my blog, I'll have the blog in one Django app and then have something like
a forum in another app, along with additional functions in other apps. Also,
I'd like to have a single-user system that uses
items of that tree node* has "456"
in its some_field value.
The second one joins with the outer query based on the individual
treenode_items links, thus checking the filter for each individual item as
well, hence *keeping individual items* that do have "123", but don't have
it for existence of a particular lexeme or multiple of them.
You could then a union of all a user's song lyrics tsvector and even apply
weights based on their listening frequency or their favorite songs.
Cheers,
Simon
[0]
https://stackoverflow.com/questions/25445670/retrieving-position-and-number
Short answer is that you can't; constraints cannot spans across JOINs.
You might be able to use database triggers to emulate though.
Le lundi 28 juin 2021 à 08:08:27 UTC-4, ngal...@gmail.com a écrit :
> I have two models like this
>
> How can I make models constraint based on the dates as shows
to be released tomorrow
https://docs.djangoproject.com/en/3.2/releases/3.2.1/
Cheers,
Simon
Le vendredi 30 avril 2021 à 09:58:53 UTC-4, shahee...@gmail.com a écrit :
> Hi,
>
> On Fri, 30 Apr 2021 at 11:52, Sebastian Jung wrote:
>
>> Take q for or Filterung:
>>
>>
>>
thank you all, i created a virtual environment and installed it.
On Thursday, March 18, 2021 at 9:20:56 PM UTC+1 ule...@gmail.com wrote:
> After installing python, you have to install PIP.
> To install PIP type in the following:
> python get-pip.py
>
> To install django tye in the following :
>
I have installed python 3.9 and selected 'add to path' during installation,
i am now trying to install django 3.1.7 but it generates a lot of errors i
can not understand, please what is the right way to setup django
development on windows 10?
--
You received this message because you are
do
the same locally using django-docker-box
(https://github.com/django/django-docker-box)
Best,
Simon
Le lundi 9 novembre 2020 à 10:38:13 UTC-5, chris...@gmail.com a écrit :
> Folks-
> I ran coverage and massaged the data a bit to get a better idea what areas
> weren’t covered. Here
This is unfortunately not possible to do through the ORM right now due to
lack of support for filtering against window expressions[0]
Until this ticket is solved you'll have to rely on raw SQL.
Cheers,
Simon
[0] ticket https://code.djangoproject.com/ticket/28333
Le mercredi 4 novembre 2020 à
and retrieving their
corresponding primary key.
Cheers,
Simon
Le dimanche 27 septembre 2020 à 19:15:11 UTC-4, rohan...@gmail.com a écrit :
> How can we make this happen?
> What steps would be needed so that bulk_create ends up returning the ids
> of the items that just got created? I d
"parent" cannot be selected for update since it's "foreign_id"
column, which is "nullable", is implied in an outer join.
PostgreSQL simply doesn't support that and you'll have to rethink your data
model if this is something you need to achieve[0]
Cheers,
Simon
[0] http
gt; 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 havent alr
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
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"
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
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
|
| 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 i can
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' dans django 3.0.4.
> Le message d'erreur qui s'affiche d
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
[1] https
(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.com/en/3.0/ref/models/expressions/#window-functions
Le mardi
` as BigIntegerField
was likely only working by change.
Cheers,
Simon
Le mercredi 19 février 2020 14:51:53 UTC-5, Ricardo H a écrit :
>
> Hi Simon,
>
> It was ok on 2.2.6, only on 3.0.3 it fails.
>
> I use BigIntegerField because I use it for some calculations after that,
> but even if I t
Could you simply make the connector field nullable to express that?
Simon
Le mercredi 19 février 2020 12:15:32 UTC-5, test a écrit :
>
> thanks, do you know how i can create custom leaf nodes when using MPTT or
> treebeard?
>
> My parent nodes should have
ave an output_field of BigIntegerField instead of DurationField. That
could be the origin
of your issue.
Cheers,
Simon
[0]
https://github.com/django/django/commit/02cda09b13e677db01863fa0a7112dba631b9c5c
Le mercredi 19 février 2020 13:08:57 UTC-5, Ricardo H a écrit :
>
> Hello, after I updat
SQL type[1] to efficiently
store
such data.
Cheers,
Simon
[0] https://djangopackages.org/grids/g/trees-and-graphs/
[1] https://www.postgresql.org/docs/current/sql-createtype.html
Le mardi 18 février 2020 18:13:39 UTC-5, test a écrit :
>
> Let's say I have:
>
> Calculator #1:
> Ex
Hello Thierry,
Django doesn't support support constraints on lookups/expressions but
there's ungoing work to do so[0].
In the mean time you'll have to rely on a `RunSQL` operation in your
migrations to create the constraint.
Cheers,
Simon
[0] https://code.djangoproject.com/ticket/30916
Le
I'd submit an optimization ticket
to allow direct usage of Q objects for boolean field lookup right hand sides
Cheers,
Simon
https://docs.djangoproject.com/en/3.0/ref/models/expressions/#django.db.models.ExpressionWrapper
Le lundi 27 janvier 2020 14:32:24 UTC-5, Peter Law a écrit :
>
> Hi
it to work on Django 3.0.
Cheers,
Simon
Le lundi 27 janvier 2020 12:47:37 UTC-5, Peter Law a écrit :
>
> Hi,
>
> Thanks for adding support for check constraints in Django 2.2, it's
> great to be able to move constraints into the model definitions.
>
> I've been t
DDL assuming your backend
supports it.
Best,
Simon
[0]
https://docs.djangoproject.com/en/3.0/ref/contrib/postgres/fields/#citext-fields
[1] https://docs.djangoproject.com/en/3.0/ref/models/fields/#unique
[3] https://github.com/django/django/pull/11929
Le jeudi 23 janvier 2020 21:36:29 UTC-5, Mike
Hello Pavel,
This is likely a bug because UniqueConstraint was only recently introduced.
Please file a bug report about it. In the mean time you can add this check
to
your SILENCED_SYSTEM_CHECKS setting to silence it.
Best,
Simon
Le lundi 20 janvier 2020 07:21:26 UTC-5, Pavel Garkin a écrit
a different
name based on whether or not you provided a related_name or
related_query_name to Folder.files.
Cheers,
Simon
Le lundi 30 décembre 2019 02:20:07 UTC-5, Mohit Solanki a écrit :
>
> Assume these two models.
>
> class Folder(model):
> name = models.CharField(max_length
You are missing an underscore here.
It should be published_date__lte and not published_date_lte.
Cheers,
Simon
Le jeudi 19 décembre 2019 11:40:05 UTC-5, MEGA NATHAN a écrit :
>
> Hi all.
>
> Cannot resolve keyword 'published_date_lte' into field. Choices are: author,
> auth
of (model_label,
field_name) tuples and
have index and constraint operations rely on them.
Cheers,
Simon
[0]
https://github.com/django/django/blob/8ea3ff155eda8c9aa55e01e756c13faf2eb542d6/django/db/migrations/autodetector.py#L187-L190
Le mercredi 11 décembre 2019 12:27:43 UTC-5, Rich Rauenzahn a écrit
ilable for the Django
and Python version constraints you provided.
Instead of getting a non-nonsensical SyntaxError crash when trying to run
Django on Python 3.5 pip prevents
you from shooting yourself in the foot in the first place.
Simon
Le lundi 2 décembre 2019 11:06:18 UTC-5, Uri a écrit :
>
Hello Bill!
I'd try again with 3.0rc1 which was released today and file a bug report if
it still crashes.
Cheers,
Simon
Le lundi 18 novembre 2019 06:08:29 UTC-5, Bill Bouzas a écrit :
>
> Good day Simon,
>
> I reproduced with Django 2.2.7, I receive the same error.
>
> Ki
Hello there,
You'll want to use Coalesce[0] for this purpose.
Model1.objects.order_by(Coalesce('effectual_rating', 'rating').desc())
Cheers,
Simon
[0]
https://docs.djangoproject.com/en/2.2/ref/models/database-functions/#coalesce
Le vendredi 15 novembre 2019 13:32:46 UTC-5, Kev H a écrit
Can you reproduce with Django 2.2.7 (releases November 4th, 2019)
Le vendredi 15 novembre 2019 06:04:32 UTC-5, Bill Bouzas a écrit :
>
> Good morning Simon,
>
> Sorry for the delayed response. I a using Django 2.2.6 (released October
> 1st, 2019)
>
> Kind regards,
> Bill
So this happened not to be supported in Django 3.0 either.
But https://github.com/django/django/pull/12067 should add support for it.
Le jeudi 14 novembre 2019 15:50:34 UTC-5, Simon Charette a écrit :
>
> For the record I haven' tested the above myself.
>
> It might only work o
For the record I haven' tested the above myself.
It might only work on Django 3.0+ and require you to pass
`output_field=BooleanField()` to Func.
Le jeudi 14 novembre 2019 09:46:48 UTC-5, Simon Charette a écrit :
>
> Hello there,
>
> I guess your example is not the best since this
Hello Bill,
Could you give us more details about which version of Django you are using?
There was a few Django bugs related to as_sql returning Union[list, tuple]
as params that were
fixed in recent release but this one might not have been caught yet.
Cheers,
Simon
Le jeudi 14 novembre 2019
nc(F('author'), 18, function='author_age_gt'),
name='age_check')
Cheers,
Simon
Le jeudi 14 novembre 2019 02:45:32 UTC-5, Olivier a écrit :
>
> Hello,
>
> Let say I want to enforce a database constraint saying a "book's author
> age is over 18".
> As you m
se that means it expects a "pid_id"
column to exist for the
Budgettable.pid field.
If you column is actually named "pid" you'll want to use the "db_column"
option to let the ORM
know about it[0]. That is `db_column=pid` in your `pid = ForeignKey`
definition.
Cheers,
This was tracked in https://code.djangoproject.com/ticket/30673 and fixed
and 2.2.5[0]
Cheers,
Simon
[0]
https://github.com/django/django/commit/1265a26b2fa3cbd73a2bccd91b700268bc28bc07
Le jeudi 17 octobre 2019 10:31:50 UTC-4, Sijoy Chirayath a écrit :
>
> I am changing one of my appli
Hello there,
>From looking at your code (super() calls) it seems like your are using
Python 2.
We've seen similar reports about stdlib functions hiding system level
exceptions
instead of surfacing them[0] so that might it.
It's hard to tell without the full traceback though.
Best,
Simon
I am using channels 2.x (along with nginx, daphne, redis and gunicorn)
In the local console I can see the user data I added in the chat consumer
but not in my production environment
(in production everything else works, but the user is undefined. Note: the
user is logged in.
Does
This error comes from ForeignObject.resolve_related_fields[0].
If you are using ForeignObject directly you have an incompatible
from_fields and to_fields
definition. It's hard to debug further without the full traceback.
Cheer,
Simon
[0]
https://github.com/django/django/blob
It's hard to tell what's wrong from the limited context you provided but
whatever code
is in django_sites_extensions is highly suspicious.
Best,
Simon
Le jeudi 5 septembre 2019 18:02:49 UTC-4, gh a écrit :
>
> Traceback (most recent call last):
>File
> "/edx/app/edxapp/v
Django 2.0 only supports MySQL 5.5+.
I suspect you're getting a syntax error when Django tries to create a table
mapping
a model with a DateTimeField since it resolves to DATETIME(6) which is not
supported
on MySQL < 5.5.
Cheers,
Simon
Le mardi 3 septembre 2019 09:58:19 UTC-4, johnsi r
= itertools.reduce(QuerySet.union, querysets, querysets[0])
queryset = union.annotate(cc=Sum('weighted_car_crashes')).values('date',
'cc')
Best,
Simon
Le lundi 19 août 2019 17:10:47 UTC-4, Jo a écrit :
>
> I have a table that looks like this
>
> datecar_crashes
Hello there,
These queries should be cached by ContentTypeManager[0] so something must
be broken
in your Django install or monkey patching this method.
Simon
[0]
https://github.com/django/django/blob/7da6a28a447dc0db2a2c6ef31894094eb968f408/django/contrib/contenttypes/models.py#L34-L44
Le
.values() before an annotation of an aggregate function uses the
provided columns
from grouping.
Cheers,
Simon
Le mardi 30 juillet 2019 12:56:56 UTC-4, Jonathan Spicer a écrit :
>
> Hello,
>
> I have an sql query that I would like to recreate using the ORM. Would it
> be possible for
you have a look at the dedicated section of the documentation[3].
I've filed a ticket to make sure bulk_update is also mentioned in this
section
of the documentation.
Cheers,
Simon
[0] https://www.dabapps.com/blog/logging-sql-queries-django-13/
[1]
https://docs.djangoproject.com/en/2.2/topics
=1 THEN foo WHEN id=2 THEN ...)
That you can emulate yourself by using Case and When expressions if you're
using Django < 2.2.
Cheers,
Simon
[0] https://docs.djangoproject.com/en/2.2/ref/models/querysets/#bulk-update
Le mardi 23 juillet 2019 12:15:20 UTC-4, Don Baldwin a écrit :
>
>
('sales_amount')
)
for person in persons:
print('Salesperson %s sold %d dollars' % (person['salesperson'],
person['sum_sales_amount'])
Note that .values() before annotating a an aggregation function results in
a GROUP BY
which should should prefer over using DISTINCT.
Cheers,
Simon
Le dimanche 21
Oh really? Yeah I guess it wont be too bad if I create one.
On Fri, Jun 21, 2019 at 6:56 PM Omar Abou Mrad
wrote:
> There are problem N clones of job boards built with django, this shouldn't
> affect your decision to create one.
>
> On Fri, Jun 21, 2019 at 10:59 AM Simon A wrote:
&
I think the except block won't trigger since if the code
Profile.objects.get(user=request.user) does not get any results, it will
return a null result, not throw exception.
instead of exception handling, just check if the return value is null or not
--
You received this message because you
On the last part of your stacktrace, there is a section
File "/usr/lib/python3.6/wsgiref/simple_server.py", line 35, in close
self.status.split(' ',1)[0], self.bytes_sent
could you please check this line out?
you can try to print what is *self.status *to check what it is trying to
split
hey guys,
I would like to develop a job board app based in django. I was wondering if
there is already an available job board app based in django like
jobberbase. There is a jobberbase clone made from django but its version
too old already.
thank you,
Simon
--
You received this message
sure the Country.objects.order_by('name') query is only
executed
when .widgets is accessed for the first time on a PlaceWidget instance
instead of at
initialization time.
Cheers,
Simon
[0]
https://docs.djangoproject.com/en/2.2/topics/performance/#cached-property
Le mercredi 19 juin 2019 09:40:23
It's hard to tell without the full traceback but Django 1.11 doesn't
support Python 3.7 so it'd
start by either using Django 2.2 or downgrading to Python 3.6
Cheers,
Simon
Le mercredi 19 juin 2019 08:16:51 UTC-4, Ezequias Rocha a écrit :
>
> Hi everyone
>
> I am doing a modeling of
= None
def save(self, commit=True):
instance = super().save(commit=False)
if commit:
update_fields = None if instance._state.adding else
self.update_fields
instance.save(update_fields=self.update_fields)
return instance
Cheers,
Simon
Le mardi 18
. A slower Django setup(), I think some changes were part of 1.8 -> 1.11
2. Reliance on now lazily loaded part of Django.
Cheers,
Simon
[0] https://docs.python.org/3/library/profile.html
Le samedi 15 juin 2019 11:25:10 UTC-4, Mark Jones a écrit :
>
> Ah, but the slowdown is happening from 1.
I meant Django 2.0 -> 2.1. As long as you are using Django 2.2 with SQLite
3.20+
the slowdown I mentioned should be effective.
Simon
Le samedi 15 juin 2019 08:32:56 UTC-4, Mark Jones a écrit :
>
> Maybe that's the case, I didn't build the python2.7 or 3.7, but I used
> pyenv to
Hi Mark,
It's hard to tell exactly what's going on without more details but assuming
you are running tests
against SQLite the 2.1 to 2.2 slowdown is likely caused by the fact
database constraints are
now checked of each TestCase[0].
Cheers,
Simon
[0] https://docs.djangoproject.com/en/2.2
Hi
Any one can help on how to save data using formtool wizard and Modelform
The view of my models and form and views and the error are here
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
I am trying to save data to db after all the three from have submited and
still getting and error, any work around
--
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
Have you tried putting the load_price() code inside the init code? like
def __init__(self, *args, **kwargs):
super(PlayerRegistrationForm, self).__init__(*args, **kwargs)
self.fields['club_id'].widget = forms.HiddenInput()
membership = request.GET.get('membership_title')
share the code here. I know django devs are lazy but don't be this lazy.
On Wednesday, May 22, 2019 at 8:07:08 PM UTC+8, Soumen Khatua wrote:
>
> Hi Folks,
>
> I'm getting len(cart) is 0 and after iterate *item is not coming from
> cart* in this project,plese tell me where is my problem.
> I'm
operation
request.session.get('key', None)
# set operation
self.request.session['key'] = value
Please also see https://docs.djangoproject.com/en/2.2/topics/http/sessions/ for
more information.
Regards,
Simon.
On Wednesday, May 22, 2019 at 9:26:15 PM UTC+8, Jean-Noël Colin wrote:
>
> Hi,
&
Hey David,
Could you try explicitly defining an objects manager on your User model and
see it if helps.
e.g.
from django.contrib.auth.models import UserManager
class User(AbstractUser):
... # fields
objects = UserManager()
I'm also having trouble reproducing locally though.
Simon
I assume you are either using a Subquery annotation that returns
multiple results or an __in lookup against a query with multiple columns.
I vaguely remember something changed in this area but it was documented
in one of the 2.0, 2.1 or 2.2 release notes.
Best,
Simon
Le mardi 23 avril 2019 10
Hello,
I am try to migrate users from an old project into a a new project i am
working on. I have extracted all the models from my old project into a
reusable app. I was able to connect to multiple database, but i wasn't able
to make my project be able to read the users and group from my old
ts. [1]
Cheers,
Simon
[0]
https://docs.djangoproject.com/en/2.2/releases/2.2/#merging-of-form-media-assets
[1]
https://docs.djangoproject.com/en/2.2/topics/forms/media/#assets-as-a-static-definition
Le mardi 9 avril 2019 11:02:35 UTC-4, Thorsten Sanders a écrit :
>
> Hello,
>
> I insert a
until built-in support is added.
Submitting a new Trac ticket so we don't loose track of the issue would
also be appreciated.
Cheers,
Simon
[0] https://github.com/django/django/pull/10796#discussion_r244216763
Le mardi 9 avril 2019 07:29:53 UTC-4, Ryan Jarvis a écrit :
>
> Hey there,
>
>
ake a look at
> https://github.com/speedy-net/speedy-net/blob/master/contrib/deploy.sh
> אורי
> u...@speedy.net
>
>
> On Tue, Apr 2, 2019 at 3:51 PM Simon A >
> wrote:
>
>> There is a workflow section in the migration page from the django project
>>
Ah I see. Thank you Jani for clearing that up.
--
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 group,
There is a workflow section in the migration page from the django project
documentation. But there are somethings I am confused about,
It says that the migrations need to be created in the non production
environment and then checked in to the repository along with the changes in
models.py.
My
] (with or without html=True) and
assertTemplateUsed[2] instead.
Cheers,
Simon
[0] https://docs.djangoproject.com/en/2.1/ref/csrf/#how-it-works
[1]
https://docs.djangoproject.com/en/2.1/topics/testing/tools/#django.test.SimpleTestCase.assertContains
[2]
https://docs.djangoproject.com/en/2.1/topics/testing
hi Cameron, as Eric said, by doing this you might not fully take advantage
of the features of django. But if you still want to proceed maybe you can
use the managed option for
models. https://docs.djangoproject.com/en/2.1/ref/models/options/#managed.
with this approach, you'll create the
but it was still missing
consensus about
what to do on other backends. If I remember correctly the two alternatives
were to defer the
field or perform an immediate SELECT.
Cheers,
Simon
Le jeudi 21 mars 2019 13:06:04 UTC-4, Dylan Young a écrit :
>
> For example using made-up
point to a model?
They point to models through the Permission.content_type foreign key;
ContentType have an (app_label, model_name)
unique tuple.
Best,
Simon
Le lundi 18 mars 2019 04:35:55 UTC-4, Yevgeny Bar Lev a écrit :
>
> Thanks Simon!
> Two questions:
> a) Would the following strateg
Hello Yevgeny,
I'd start by deleting your stale content types[0] which your permissions
are attached
to. That should deal with deleted model case.
For the renames I suggest you drop into a shell and manually edit the
Permission.name
of the misnamed instances.
Best,
Simon
[0]
https
Hello Yevgeny,
I don't have magic solution to suggest to you given the current state of
your
permission data after a few iterations but I just wanted to let you know
that
it's a known issue[0] and a contributor is actively working on getting it
fixed[1].
Cheers,
Simon
[0] https
Hello HM,
I know that some changes have been made to avoid unnecessary foreign key
rebuilds on some option changes.
Are you experiencing this on 2.1 and 2.2 pre release?
Simon
Le vendredi 1 mars 2019 02:40:01 UTC-5, HM a écrit :
>
> I added "related_name" to an exiting Foreig
= element.id
)
WHERE expenses.year = $year
GROUP BY area.name, element.name
ORDER BY area.name, element.name
Cheers,
Simon
Le mercredi 27 février 2019 14:04:21 UTC-5, Felix Lazaro Carbonell a écrit :
>
> Hi to everyone:
>
>
>
> Having models like these:
>
>
>
'
# get a session variable
self.request.session.get('key', None)
On Mon, Feb 18, 2019 at 3:10 PM Gavin Boyle
wrote:
> Hi Simon,
>
> That’s a great idea, I’ve only ever worked with built in sessions for
> logging in. Would you have a link to some documentation or an example that
> would
Just to add, please try to create a python file with the simplest
implementation of send mail just to check if it actually works.
On Monday, February 18, 2019 at 11:43:22 AM UTC+8, Sid wrote:
>
> can you check if you your email server is somehow blocking your emails?
> Have you enabled your
I think I had a similar scenario a few weeks ago. One option that you have
is to store the originally selected PK to the session object. Whenever you
load a page, for you can retrieve the PK from the session object. Most
likely you'll do this on the get_queryset function
On Sunday, February
nly executed when entries are iterated over.
Given the documentation clearly mentions "*Evaluating* a queryset" and
"Building a queryset"
I don't think it's worth amending it.
Cheers,
Simon
Le vendredi 15 février 2019 07:40:51 UTC-5, Philoj Johny a écrit :
&
I meant, and *not* "Building a queryset" in my previous reply.
Le vendredi 15 février 2019 14:18:27 UTC-5, Simon Charette a écrit :
>
> Hello Philoj,
>
> > Does this mean that the above code example will raise
> TransactionManagementError...
>
> It won't
This might not be a package but django allows to extend the User object via
a one to one relationship. Once extended, you can add as many fields as you
like. It will be better though if this will happen at the start of the
project. Using this method at the middle of the project might cause a
1 - 100 of 686 matches
Mail list logo