Re: Is assertIs being misused in Tutorial Part 5?

2018-10-25 Thread Simon Charette
olean value you're better off using assertIs. Cheers, Simon Le jeudi 25 octobre 2018 15:42:00 UTC-4, John Meyer a écrit : > > tests.py in the tutorial > <https://docs.djangoproject.com/en/2.1/intro/tutorial05/> gives this > example: > > self.assertIs(future_questi

Re: race condition on post multiple files to the same folder

2018-11-01 Thread Simon Charette
Hello there, I think you just hit #29890[0], a bug present in Django in 2.0+ and fixed in Django 2.1.3 which should be released today[1]. Simply updating to 2.1.3 when it's released should address your issue. Cheers, Simon [0] https://code.djangoproject.com/ticket/29890 [1]

Re: Django Channels - core.py error

2018-11-07 Thread Simon Vézina
Hi, I'm coming back with this one as well. I managed to fix my problem. In my consumer, I was making normal Django database queries without the @database_sync_to_async decorator. As soon as I started wrapping my code properly with this decorator, everything started to work fine. See below.

Re: Setting up admin in visual studio

2018-11-09 Thread Simon McConnell
Times have changed -- 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, send email to django-users@g

Re: Migrations - moving model between apps

2018-11-15 Thread Simon Charette
operations = [ SeparateDatabaseAndState([], [ CreateModel('foo, ...) )]), ] Note that this will not take care of renaming the content types and permissions that might have been created for your old.Foo model definition. You could use a RunPython operation to rename them appropri

Re: Max function and grouping with Oracle

2018-11-27 Thread Simon Charette
through subquery that would have worked for your case[0] Parent.objects.annotate( child_updated_timestamp=Child.objects.filter( parent=OuterRef('pk'), ).aggregate(Max('updated_timestamp')) ) Cheers, Simon [0] https://code.djangoproject.com/ticket/28296 Le lund

Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-27 Thread Simon Connah
I'm in the process of building a website in Django and need to make a specific part of my application dynamic. Because of that I'd like to use a JavaScript frontend framework to build this portion of the site. I was wondering if anyone had any recommendations for which JavaScript framework I s

Re: Update of issue (Trac) rejected (SPAM ...)

2018-11-29 Thread Simon Charette
a lot of Django newcomers and questions about this behaviour came up quite a few time on this mailing list already. Being able to simply link to a detailed document about it would be great and probably help attentive readers figuring it out by themselves in the first place. Cheers, Simon [0

Re: Annotate giving back individual queries rather than results

2018-12-02 Thread Simon Charette
Hey there, I just wanted to clarify that the behavior of including the Meta.ordering fields in aggregation grouping been around for a while and Django 2.2 deprecates it to deal with the exact type of confusion you experienced here. Best, Simon Le dimanche 2 décembre 2018 08:51:17 UTC-5, Coder

Re: Unable to do the initial migrations with django-2.1.3 and "mysql 5.5.62-0+deb8u1 (Debian)"

2018-12-02 Thread Simon Charette
Hello there, Django 2.1 dropped support for MySQL 5.5[0] as the end of upstream support is December 2018. You'll have to update to a more recent version to use Django 2.1+. Cheers, Simon [0] https://docs.djangoproject.com/en/2.1/releases/2.1/#dropped-support-for-mysql-5-5 Le diman

Best way to structure this Django project

2018-12-02 Thread Simon Connah
Hi, I have a bit of a problem with structuring a Django project. I have a UserProfile app which stores extra information about users using a OneToOneField to the Django auth user model. I have a products app which has two models relating to two types of products and finally I have a payments

Re: Problmes

2018-12-03 Thread Simon Charette
Hello David, The current latest version of the Django 1.11 serie doesn't support Python 3.7[0] but 1.11.17, which is still unreleased[1], should per popular demand[2]. Until 1.11.17 is released I'd advise you either stick to Python 3.6 or upgrade to Django 2.0+. Cheers, Simon

Re: Use an aggregation function's filter with aggregate of a value from an annotation with a subquery

2018-12-05 Thread Simon Charette
d) GROUP BY comment.id HAVING COUNT(*) FILTER (WHERE ...) > 4 ) There's tickets tracking adding subquery support to aggregate functions but using subqueries doesn't seem to be necessary here? Cheers, Simon Le mercredi 5 décembre 2018 19:16:30 UTC-5, Daniel Gilge a écrit : >

Re: Order of migration dependencies when running makemigrations from scratch

2018-12-07 Thread Simon Charette
be a simple matter of using sorted in MigrationWriter.as_string[0]. Cheers, Simon [0] https://github.com/django/django/blob/79c196cfb287893aadc6b0e74603ffde1512170e/django/db/migrations/writer.py#L156-L164 Le vendredi 7 décembre 2018 00:51:58 UTC-5, Dakota Hawkins a écrit : > > We haven't

Re: Poor Performance for Form Rendering In Django 1.11

2018-12-07 Thread Simon Charette
Hello John, Did you try switching to the Jinja2 form renderer[0] to see if it helps? I've not tried it myself but I heard it makes a significant difference. Cheers, Simon [0] https://docs.djangoproject.com/en/2.1/ref/forms/renderers/#jinja2 Le vendredi 7 décembre 2018 08:30:48 UTC-5, J

Re: Order of migration dependencies when running makemigrations from scratch

2018-12-09 Thread Simon Charette
Hello Dakota, >From looking at the autodetector code in charge of generating these lists[0] and the loader code in charge of resolving them[1][2] I'm pretty confident their order doesn't carry any meaning. They should have been defined as a set from the beginning. Cheers, Simo

function get_form_kwargs() not being called

2018-12-10 Thread Simon A
I'm trying to pass a parameter from a redirect to the CreateView and to the form. I have no problem retrieving the value from the redirect to the CreateView. But my issue is when trying get the value to the form. I'm overriding get_form_kwargs function of my CreateView but when I try to do o

Re: Using reflection with Django models to determine module containing the choices?

2018-12-10 Thread Simon Charette
n one off debugging reflection though. Best, Simon Le lundi 10 décembre 2018 10:33:35 UTC-5, Stodge a écrit : > > Let's say I take the following code from the Django documentatation: > > > class Student(models.Model): > FRESHMAN = 'FR' >

Re: How to transfer django projects from one pc to another

2018-12-10 Thread Simon A
if you are really lazy, you can just zip your whole project. then transfer to another machine. I transfer my projects from work (using windows) to home (using ubuntu) then vice versa. I only had to manually install the necessary packages will be notified to you when you need to get them install

Re: function get_form_kwargs() not being called

2018-12-11 Thread Simon A
e class based. On Monday, December 10, 2018 at 8:47:28 PM UTC+8, Simon A wrote: > > I'm trying to pass a parameter from a redirect to the CreateView and to > the form. > > I have no problem retrieving the value from the redirect to the CreateView. > > But my issue

Re: function get_form_kwargs() not being called

2018-12-12 Thread Simon A
ith the same name? > > Especially since you do have other class-based views, you must know what > you’re doing. > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *Simon A > *Sent:* Tuesday, December 11, 2018 10:32 PM > *T

Re: python manage.py migrate failed

2018-12-13 Thread Simon Charette
It looks like you configured your CMS_CACHE_DURATIONS setting as an integer instead of a dict with a 'content' key pointing to an integer[0]. In other words you did CMS_CACHE_DURATIONS = 42 Instead of CMS_CACHE_DURATIONS = {'content': 42} Cheers, Simon [0] http://do

Re: function get_form_kwargs() not being called

2018-12-14 Thread Simon A
Just to add, I used a django-crud cookie cutter to generate codes for CRUD On Monday, December 10, 2018 at 8:47:28 PM UTC+8, Simon A wrote: > > I'm trying to pass a parameter from a redirect to the CreateView and to > the form. > > I have no problem retrieving the value from

Re: function get_form_kwargs() not being called

2018-12-14 Thread Simon A
Oh shoot, I think I know now why this isn't working for me. It is because I'm using vanilla for my views. I'll continue to test. On Friday, December 14, 2018 at 8:34:15 PM UTC+8, Simon A wrote: > > Just to add, I used a django-crud cookie cutter to generate codes fo

Re: function get_form_kwargs() not being called

2018-12-14 Thread Simon A
And it really is that. I had to follow the steps required by vanilla migration procedure to make it work like I want it to. On Friday, December 14, 2018 at 11:11:07 PM UTC+8, Simon A wrote: > > Oh shoot, I think I know now why this isn't working for me. > > It is because I&#x

Re: MySQL accepts 0 for a primary key but Django does not

2018-12-28 Thread Simon Charette
Hello Derek, There's no setting but this is controlled by the allows_auto_pk_0 feature flag [0]. Database feature are set to the default database configurations so Django can minimized the number of introspection queries required to work appropriately each time a connection is opened. In order

Re: MySQL accepts 0 for a primary key but Django does not

2018-12-30 Thread Simon Charette
Hello Derek, Not sure of your custom module structure but you'll want to point ENGINE to 'custom' and not 'custom.base' just like you were pointing to 'django.db.backends.mysql' and not 'django.db.backends.mysql.base'. Cheers, Simon Le dimanche 3

Re: Django ORM queryset substring on a column

2019-01-04 Thread Simon Charette
You can use a Func expression for this purpose[0] Employee.objects.annotate( emp_number_suffix=Func('emp_number', Value('-'), -1, function='substring_index'), ).filter( emp_number_suffix='111', ).values('emp_number') Cheers, Simon [0]

Re: select_for_update + select_related issue

2020-09-26 Thread Simon Charette
this case "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]

Re: Django Mysql Bulk_Create Ids

2020-09-28 Thread Simon Charette
s 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 do

Re: Replicating complex query with two dense_rank() functions using ORM

2020-11-04 Thread Simon Charette
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 2

Re: Questions about code coverage.

2020-11-09 Thread Simon Charette
ut you can 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 cov

Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-18 Thread Simon Lankwagh
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 subscr

Re: Please help, I can't install django after a fresh installation of python 3.9 on windows 10

2021-03-19 Thread Simon Lankwagh
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 : >

Re: Filtering OR-combined queries

2021-05-03 Thread Simon Charette
eant 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: >> >>

Re: MODEL CONSTRAINT (based on two dates)

2021-06-30 Thread Simon Charette
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

Re: counting the same words within a song added by a user using Django

2021-07-05 Thread Simon Charette
ry 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-positio

Re: NotImplemented error combining distinct with annotate

2019-07-21 Thread Simon Charette
tate( sum_sales_amount=Sum('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 sh

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Simon Charette
= (CASE WHEN id=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

Re: What's the best way to find the number of database accesses being done?

2019-07-23 Thread Simon Charette
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/t

Re: Recreating SQL query in ORM

2019-07-31 Thread Simon Charette
), ).order_by('-total') Using .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

Re: Duplicated django_content_type Query

2019-08-16 Thread Simon Charette
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

Re: Aggregating the results of a .union query without using .raw, is it possible?

2019-08-19 Thread Simon Charette
ity, weight in weights ) union = 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

Re: Error: Not able to create table using models (Backend mysql)

2019-09-03 Thread Simon Charette
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, johns

Re: MultipleObjectsReturned: get() returned more than one Site -- it returned 2!

2019-09-05 Thread Simon Charette
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/ap

Re: Django Foreign Object

2019-09-26 Thread Simon Charette
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

Channels chat consumer behaves differently in prodcution vs development

2019-10-06 Thread Adam 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 anyone

Re: QuerySet not iterable

2019-10-08 Thread Simon Charette
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. Be

Re: django 2.0 to django 2.2 migration

2019-10-17 Thread Simon Charette
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

Re: Performing a query returns an error

2019-11-13 Thread Simon Charette
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. Ch

Re: Django 2.2: how to use to a field "from a foreign model", in a CheckConstraint: ?

2019-11-14 Thread Simon Charette
nt(Func(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 > ag

Re: Django GIS query on annotated spatial field

2019-11-14 Thread Simon Charette
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

Re: Django 2.2: how to use to a field "from a foreign model", in a CheckConstraint: ?

2019-11-14 Thread Simon Charette
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

Re: Django 2.2: how to use to a field "from a foreign model", in a CheckConstraint: ?

2019-11-14 Thread Simon Charette
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

Re: Django GIS query on annotated spatial field

2019-11-15 Thread Simon Charette
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

Re: Conditional Order By

2019-11-15 Thread Simon Charette
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:3

Re: Django GIS query on annotated spatial field

2019-11-18 Thread Simon Charette
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. > &g

Re: pip install Django==3.0

2019-12-02 Thread Simon Charette
package available 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

Re: Influencing order of internal migration operations

2019-12-11 Thread Simon Charette
et 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

Re: FieldError at / Django models how to reslove this issue....

2019-12-19 Thread Simon Charette
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,

Re: Prefetching returning empty values for some object

2019-12-30 Thread Simon Charette
d where 'folder' might have 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): >

Re: UniqueConstraint rises fields.E310 error because of issue with backward compatibility with unique_together

2020-01-20 Thread Simon Charette
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

Re: Case-insensitve unique = True

2020-01-23 Thread Simon Charette
the appropriate 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

Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread Simon Charette
I would expect 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. >

Re: How to express `foo = (bar < quox)` as a constraint

2020-01-27 Thread Simon Charette
t all of it so 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

Re: Model uniqueness constraint with date extraction

2020-02-18 Thread Simon Charette
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/t

Re: How to store a boolean expression (parse tree) in a model?

2020-02-18 Thread Simon Charette
eSQL 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: &g

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
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

Re: How to store a boolean expression (parse tree) in a model?

2020-02-19 Thread Simon Charette
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 connector types such as

Re: Django queryset result and mysql query are wrong after updating from 3.0.2 to 3.0.3

2020-02-19 Thread Simon Charette
d` 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

Re: What IDE do you use? (semi-OT)

2006-10-09 Thread Simon de Haan
*kiss* TextMate!Very minimalist layout but an incredible feature set - still dazzles me. Kind regards,Simon de HaanEight Media[EMAIL PROTECTED]+31 (0)26 38 42 440 On Oct 9, 2006, at 1:50 PM, David Johansson wrote:I used to use emacs, but now it's either eclipse with pydev [1] or gedit.Two t

Re: remedial django - what IS a "site" exactly?

2006-05-23 Thread Simon de Haan
Hi Adrian, Thanks for the documentation. I, like david, was a little confused about the Sites stuff. A slight correction though: Under "How Django uses the sites framework", the "authentication framework" link in bullet 5 links to the "syndication framework&

Django default templates

2012-04-06 Thread Simon Boje Outzen
some default django ones there? Please help Regards, Simon B. Outzen -- 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

New library released: django-unaccent, adding unaccent operators to the Django ORM for unaccented search in PostgreSQL

2012-05-28 Thread djcoin [Simon Thépot]
/tests.py) to get the idea. Of course, any feedback and commits are most welcome (I am even looking for a maintainer as I'm not intensively using Django since a few months). Cheers ! Simon Thépot -- You received this message because you are subscribed to the Google Groups "Django users"

Re: How to perform a simple search ignoring characters with accents (á, é, í, ó, ú)

2012-06-04 Thread djcoin [Simon Thépot]
t;The book of Café", `Book.objects.filter(title__icontains_unaccent='Cafe')` will match Cheers, Simon On Jun 1, 7:03 pm, Joni Bekenstein wrote: > I need to do a simple search ignoring some characters with accents. The > idea would be that "hola" matches the search

Re: How to use django-facebook-graph

2012-06-13 Thread Simon Schmid | FEINHEIT
the user. Have fun with django-facebook-graph Simon [1] https://developers.facebook.com/docs/ [2] http://django-facebook-graph.readthedocs.org/en/structured/ 2012/6/13 Ada Pineda > > Hi > > I'm pretty new with django and I'm trying to connect an app that I've >

Re: Django for a large social networking or photo sharing site?

2011-11-22 Thread Simon Schmid | FEINHEIT
Hi Badlearner Basically, i totally agree with Russ. But i think, one question is not answered yet: There are many tools for django, that you can use and start to build up a social network style site. have a look at: http://pinaxproject.com/ My suggestion is: just start your project and do not car

Re: django-facebook-graph

2011-12-19 Thread Simon Schmid | FEINHEIT
ny question, feel free to write, open issues on github, etc. Have fun with Facebook Development Simon On Dec 19, 12:32 pm, Timothy Makobu wrote: > Hi All, > > Im looking to post to my facebook wall via django. Facebook have > discontinued the python-sdk. > > I th

Possible bug with Q objects

2022-05-19 Thread Simon Van De Keer
ed on the treenode, thus causing the EXISTS to yield a result if *one of the 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, he

Error on use django-fluent-dashboard app

2013-04-23 Thread Lucas Simon Rodrigues Magalhaes
Hi, I am using django-fluent-dashboard app instead grapelli but I got this error, and I do not know how to solve it. I follow these tutorial [1] and django version is 1.4.5 ImportError at /admin/ No module named menu Request Method: GET Request URL: http://localhost:8000/admin/ Django V

Problem to access admin url in server production

2014-07-06 Thread Lucas Simon Rodrigues Magalhaes
Hi, I has a problem when I access the admin url the nginx redirect my domain to https://xxx.com.br/admin. I can't fix this error, I try everything. So, How to disable it ? Forbidden (403) CSRF verification failed. Request aborted. Help Reason given for failure: Referer checking faile

Re: Problem to access admin url in server production

2014-07-06 Thread Lucas Simon Rodrigues Magalhaes
Nginx.conf and gunicorn.conf are int this link [1]. And I use Django - 1.6.5 https://gist.github.com/lucassimon/0b982d228490bbd263ce Em domingo, 6 de julho de 2014 21h39min28s UTC-3, Lucas Simon Rodrigues Magalhaes escreveu: > > > > Hi, > > I has a problem when

How to set response headers in DetailView

2014-08-22 Thread Lucas Simon Rodrigues Magalhaes
Hello, I see this tutorial [1] to control the response header and caching of pages in django. So I'm trying to enable this response header in a generic class DetailView. I did a search and found this code [2] at the end of the page and also the source code [3] of View. But are confused and

Re: How to set response headers in DetailView

2014-08-22 Thread Lucas Simon Rodrigues Magalhaes
22 18:55 GMT-03:00 Lucas Simon Rodrigues Magalhaes < > luca...@gmail.com >: > >> Hello, >> >> I see this tutorial [1] to control the response header and caching of >> pages in django. >> >> So I'm trying to enable this response header in a generic c

Error to customize a user

2014-04-30 Thread Lucas Simon Rodrigues Magalhaes
Hello, I have a problem when rendering my admin after creating a custom user. I followed the tutorial of Django [1] documentation and also Subclass AbstractBaseUser section of the book Twoo Scoops of Django. The error is described in this gist [2] and the code is in this repository [3]. Th

Problem UnicodeDecodeError when run createsuper

2017-02-04 Thread Lucas Simon Rodrigues Magalhaes
Hello everyone, I have a problem when run createsuperuser.py command in python 3.4. How can I solve it definitely? Look the code: https://gist.github.com/lucassimon/7837dce442e3a4a090ce4d155b4a2035 -- You received this message because you are subscribed to the Google Groups "Django users" gr

Building a modular app?

2023-04-02 Thread &#x27;Simon Connah' via Django users
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

Re: Django field model for HTML parser?

2017-11-18 Thread &#x27;Simon Connah' via Django users
The error message is pretty obvious. "You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path." Set the STATIC_ROOT setting in settings.py. https://docs.djangoproject.com/en/1.11/ref/settings/#static-root On Saturday, 18 November 2017, 20:12:52 GMT,

Some newbie questions on CBVs and FBVs

2017-11-23 Thread &#x27;Simon Connah' via Django users
and which methods it has available. Where as with FBVs I just write the code and everything works. Anyway, thank you for any help :). Simon. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Some newbie questions on CBVs and FBVs

2017-11-24 Thread &#x27;Simon Connah' via Django users
Hi, First of all thank you very much for the reply. It was very useful. I'll re-read the documentation and see what I was missing out on. The get_queryset() method was a very useful hint. That may well solve the issue I was having. Simon.On Friday, 24 November 2017, 06:20:35 GMT, Matem

Showing only current user in Django admin

2018-03-17 Thread &#x27;Simon Connah' via Django users
the admin panel widgets. Sorry if these questions are stupid. It has been a very long time since I last used Django and if memory serves, I never used the built-in admin panel at all. Thank you for any help. Simon. -- You received this message because you are subscribed to the Google Gr

Dealing with templates in an open source Django project?

2018-03-18 Thread &#x27;Simon Connah' via Django users
e while at the same time keeping it reasonably open so other people can use it as well. I'm probably missing something obvious here, but I'd appreciate some advice before I get too far into the project so any changes that need to be made will be smaller. Thank you. Simon. -- You received t

Re: Dealing with templates in an open source Django project?

2018-03-19 Thread &#x27;Simon Connah' via Django users
else, then please let me know if I have misunderstood what you mean. Simon.On Sunday, 18 March 2018, 23:39:47 GMT, Etienne Robillard wrote: Hi Simon, I'll try to help you out with that. Have you considered using Django models to allow end users to create, edit and customi

Re: Dealing with templates in an open source Django project?

2018-03-20 Thread &#x27;Simon Connah' via Django users
e the help :). Simon. On Monday, 19 March 2018, 15:27:40 GMT, Etienne Robillard wrote: Hey man, First of all you're definitely not stupid. :-) Second, I think you're starting pretty well to understand what I'm trying to explain. I do admit however t

Advertising a new Django open source project?

2018-03-24 Thread &#x27;Simon Connah' via Django users
vertise my open source project? Is there a decent place to make people aware of what I am doing? I'm fine doing all the backend tasks, but it would be great to have some help on the frontend design aspects. I can handle the JavaScript as well. I'm just not so hot on CSS. Any help i

Re: Advertising a new Django open source project?

2018-03-24 Thread &#x27;Simon Connah' via Django users
Hi Egor, Thank you for the reply. When I get a bit nearer to completion I'll certainly follow your advice. Thanks for the links. Simon. On Saturday, 24 March 2018, 20:03:41 GMT, Egor Smolyakov wrote: Hello, Simon. I had a similar question a few months ago when I advertised my pr

Re: Advertising a new Django open source project?

2018-03-26 Thread &#x27;Simon Connah' via Django users
orried about is the design since I suck at that sort of thing. The repo is here: https://gitlab.com/glamorous-systems/seductive On Sunday, 25 March 2018, 09:55:21 BST, Etienne Robillard wrote: Hi Simon, You can also consider setting up a official website for your project. Reg

Re: Advertising a new Django open source project?

2018-03-26 Thread &#x27;Simon Connah' via Django users
e and anyone who had the original URL will get a 404. Probably not want you want. Dylan On Mon, Mar 26, 2018 at 10:33 AM, 'Simon Connah' via Django users wrote: Well, I've opened up the repository if anyone is interested in taking a look. As I've said elsewhere, it is very

Creating a model instance using currently logged in user

2018-04-03 Thread &#x27;Simon Connah' via Django users
Hi, Apologies as this is a newbie question. I have a Model, a CBV CreateView and a ModelForm. The ModelForm is set to use the model, and the model has a field called author which is a ForeignKey to default Django auth User model. I have removed the author field from the ModelForm as if I allow

Re: Creating a model instance using currently logged in user

2018-04-04 Thread &#x27;Simon Connah' via Django users
7:34 UTC+1, Simon Connah wrote: > Hi, > > Apologies as this is a newbie question. > > I have a Model, a CBV CreateView and a ModelForm. > > The ModelForm is set to use the model, and the model has a field called > author which is a ForeignKey to default Django auth Us

<    2   3   4   5   6   7   8   >