Django + uvicorn poor performance

2022-08-03 Thread Marcin Szpulak
I'm testing Django asgi performance using two very simple views. I'm running gunicorn and uvicorn in such a manner: 1. gunicorn core.wsgi --workers=1 --threads=1 --access-logfile=- core.wsgi:application uvicorn --workers 1 core.asgi:application 2. uvicorn --workers 1 core.asgi:application Vi

Re: Help me out please

2020-06-20 Thread Marcin Wiśniewsk
PISZCIE PO POLSKU Wysłane z aplikacji Outlook Mobile From: django-users@googlegroups.com on behalf of Alison Mukoma Sent: Saturday, June 20, 2020 11:30:50 AM To: django-users@googlegroups.com Subject: Re: Help me out please Hey, What y

Re: Want to add form to my Django-website

2020-06-16 Thread Marcin
Hi. You must just add a form to your's website and save collected data to the database. Hope this helps somehow. If not, I've found a nice tutorial here https://lmgtfy.com/?q=django+forms+save+to+database and there https://docs.djangoproject.com/en/3.0/intro/tutorial04/ Regar

Online documentation issues

2020-06-15 Thread Marcin
he doc is more difficult). Thanks. Marcin -- 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 discuss

Django model's field dynamic choices

2018-05-14 Thread Marcin
I'm using Django 1.11. I cannot set dynamic choices for model's field because: - choices must be iterable, not function, - choices iterable is always coverted to list, - iterable is evaluated oat the module import stage. The whole thing is about iterable evaluation time. The data sourc

Re: New to Django, Tutiorial01 not working,

2018-03-29 Thread Marcin Bacławski
u probably run http://localhost:8000/ ,u should run http://localhost:8000/polls -- 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...@googl

RE: How to use try..except, but when DEBUG is True, show the error?

2017-08-12 Thread Marcin Gałązka
> Hello, > > i have these code, for example: > > try: >x = parse_date('') > except TypeError: > return False > ​> > > It's ok for me code like these.. but, when DEBUG == True, I like to show the > django default error page... > > How can I do that? > > Regards Why not simply re-rai

Why does combining multiple annotations work in my case?

2017-08-11 Thread Marcin Gałązka
The documentation advises against combining multiple annotations in one query: https://docs.djangoproject.com/en/1.11/topics/db/aggregation/#combining-multiple-aggregations due to the infamous bug #10060: https://code.djangoproject.com/ticket/10060 And indeed, having tried the counter-example f

Re: Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
Thanks. Could you explain last point about 3 different sites? As I said I'd like to have separate middlewares and urls. Currently I have two Django projects defined, they share app paths and most of settings (middlewares are redefined and urls are separate). Marcin W dniu piątek, 26

Re: Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
oject environment. Models, registries, configuration should stay same. Middlewares, urls, views and anything related to http will be different. BR, Marcin W dniu piątek, 26 maja 2017 13:16:49 UTC+2 użytkownik Jani Tiainen napisał: > > Hi, > > Your requirements are a bit contradicting. > >

Multiple uwsgi apps in one project

2017-05-26 Thread marcin . j . nowak
te a new django projects and import/copy main app's settings. Is there an other way? BR, Marcin -- 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 e

Re: Alternative to celery

2017-05-11 Thread marcin . j . nowak
RQ is simple, stable and reliable. Redis is also a persistent storage, but you should read about this and use the best solution for your case: https://redis.io/topics/persistence You may also consider deploying a fault-tolerant Redis cluster (min. 3 nodes AFAIR) RQ has different architecture

Re: Angular 2 + Django + Postgresql

2017-05-09 Thread marcin . j . nowak
limitations. Just my 5 cents. Marcin -- 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 grou

Re: field cannot be specified for model form as it is a non-editable field

2017-05-09 Thread marcin . j . nowak
veloper. It was from v0.96 up to v1.4. The things started getting "worse" when builtin migrations and system checks framework were introduced. And the "worse" word is very subjective here. Anyway, thank you for a quick response and hint about changing auto_now_add to the `

field cannot be specified for model form as it is a non-editable field

2017-05-08 Thread marcin . j . nowak
verride it. How to achieve that? PS. Somebody asked me why I'm considering leaving Django, and this is a real example of worst changes in Django in last years. Breaking compatibility and blocking a dev to do what he want. There is nothing wrong with overriding such value. Marcin --

Re: Automatic content types removal

2017-05-05 Thread marcin . j . nowak
m/en/1.11/ref/django-admin/#django-admin-remove_stale_contenttypes> > command instead. > > In older versions of Django, stale content type deletion doesn't happen > unless you type "yes" to the prompt that happens after migrate. > > On Friday, May 5, 2017 at 8:4

Django forks / clones / wrappers

2017-05-05 Thread marcin . j . nowak
The core is highly based on models/db layer, and data input is based mostly on forms and modelforms. Everything else is easy to reimplement, relatively. Admin, postgis and most of contribs are not necessary. Thanks, Marcin -- You received this message because you are subscribed to the Google G

Automatic content types removal

2017-05-05 Thread marcin . j . nowak
know that clearing content types is OK, maybe required, but it SHOULD NOT to be run automatically! Deleting the data is a risky operation and should be called on demand. Is possible to disable automatic CT deletion? Marcin -- You received this message because you are subscribed to the G

OneToOne mappings

2017-03-13 Thread marcin . j . nowak
many assignments to the same column" (these values are same and will be always same, but "Django knows better"). So how to map a relation for my view? Is Django really so limited? Marcin -- You received this message because you are subscribed to the Google Groups "Djang

Re: Migrations

2017-03-13 Thread marcin . j . nowak
nd they work well there. These projects are rarely changed and I have no headache here. So the truth is - it depends. Think about maintaining the project and go with Liquibase (or something else) where long-term support is required. Marcin -- You received this message because you are subscri

Re: group by 3 fields

2017-03-01 Thread marcin . j . nowak
application's code changes (due to "freezing" class references). BR, Marcin -- 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-use

Re: group by 3 fields

2017-03-01 Thread marcin . j . nowak
to a unmanaged django model, but do not forget to add on_delete/on_update=DO_NOTHING for FKs. But I have no idea what Django migration system do with such mapped view - I kicked off builtin migrations completely and I am using Liquibase to manage dbs. Marcin -- You received this message becau

Re: Flattening model relationships (in APIs)

2017-02-27 Thread marcin . j . nowak
, Ankush Thakur wrote: > > Marcin, that's exactly where I'm stuck! I know endpoints should never be > 1:1 serialization of models, but I just don't know how to do that. I mean, > I've been able to create endpoints like "/customers/1/payments/" where I &g

Re: Flattening model relationships (in APIs)

2017-02-27 Thread marcin . j . nowak
edia and the state transfer. Marcin > -- 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 gr

Re: Flattening model relationships (in APIs)

2017-02-27 Thread marcin . j . nowak
ill work for you. Otherwise you're welcome to Restosaur community. BR, Marcin -- 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

Re: Flattening model relationships (in APIs)

2017-02-27 Thread marcin . j . nowak
ures like jsonld without any limitation, >> and apply validation in a controller: >> >> @payments.post(accept='application/json') >> def add_payment(ctx): >> form = PaymentForm(data=ctx.body) >> form.is_valid() and form.save(0 >> [...

Re: Flattening model relationships (in APIs)

2017-02-27 Thread marcin . j . nowak
rm may be a typical Django Form or ModelForm, or even a Colander Schema. There is more code to write, but implementation is more explitic. PEP20: Explicit is better than implicit. Simple is better than complex. Flat is better than nested. Readability counts. And so on... BR, Marcin On Monday

Re: group by 3 fields

2017-02-27 Thread marcin . j . nowak
ser` GROUP BY `auth_user`.`is_staff`, `auth_user`.`is_superuser` ORDER BY NULL You must tell Django that you need some aggregate, and then ask for selecting other values explicitely. These columns will be added to a group by. Please note that as a result you will get iterable of dicts instead of mo

Re: Flattening model relationships (in APIs)

2017-02-26 Thread marcin . j . nowak
th REST api. You may feel that DRF is limiting you. You'll be on a good path, if so. :) Good luck! Marcin -- 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

Re: group by 3 fields

2017-02-26 Thread marcin . j . nowak
data first, then about application layer. Data is most important. It's lifetime is much longer than any app. Continue thinking about grouping, windowing, indexing, fts and so on, and find a way how to handle such things using tools like Django. Good luck! Marcin -- You received this message

Re: Migrations with multiple databases

2016-10-27 Thread marcin . j . nowak
liar with Liquibase changesets syntax (XML, JSON or plain SQL files), and it requires JRE. But the good side is that you have independent, powerfull and rock-solid db migration subsystem with multidb support. It's worth trying. Marcin -- You received this message because you are subscribed

Re: Disabling migrations when running tests

2016-07-17 Thread marcin . j . nowak
ts > further: https://code.djangoproject.com/ticket/25388 > > Thanks. BTW: Would you consider bringing back patch https://github.com/django/django/commit/157d7f1f1de4705daddebb77f21bd7097a74513d ? This patch is what I've asking for months. Marcin -- You received this message because you are subscr

Re: Disabling migrations when running tests

2016-07-16 Thread marcin . j . nowak
lushing is not necessary and may be skipped for speed up. On Sunday, July 17, 2016 at 12:24:38 AM UTC+2, Fabio Caritas Barrionuevo da Luz wrote: > > try this library: > > https://github.com/henriquebastos/django-test-without-migrations/ > Thanks. I think it should be embedded with

Re: Disabling migrations when running tests

2016-07-16 Thread marcin . j . nowak
*Any migrations will also be applied in order to keep it up to date.*" Source: https://docs.djangoproject.com/en/1.9/topics/testing/overview/#the-test-database I don't need automatically created test databases nor migrations applied. Can I disable this? Marcin -- You received

Disabling migrations when running tests

2016-07-16 Thread marcin . j . nowak
Hi all. Is possible to disable migrations execution when running tests? Thanks, Marcin -- 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-user

Re: Django 1.9 Apps aren't loaded yet

2016-04-26 Thread marcin . j . nowak
On Monday, April 25, 2016 at 11:44:20 PM UTC+2, marcin@gmail.com wrote: > Just wondering about possibility to do some kind of late initialization. I've found Dectate <http://dectate.readthedocs.org/> library as a example of deferring configuration phase. I'm not tal

Re: Django 1.9 Apps aren't loaded yet

2016-04-25 Thread marcin . j . nowak
et app_name explicit, I suppose, I can encapsulate model imports in methods (quite ugly when readability counts), or build proxies. I'd glad to hear your suggestions for that. Thanks, Marcin -- You received this message because you are subscribed to the Google Groups "Django users&qu

Re: Django 1.9 Apps aren't loaded yet

2016-04-25 Thread marcin . j . nowak
s packages encapsulation or requires to move every models import into all functions. Should we stop importing models at the top of the modules, now? It seems like a next Django`s nightmare. Marcin -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Turn off migrations completely in Django 1.7

2016-04-22 Thread Marcin Nowak
slow cleaning. As a result test suites are running quite fast without switching to SQLite, so I don't have to wrap everything into ORM and I can use specific features of each db. Kind Regards, Marcin -- You received this message because you are subscribed to the Google Groups "Django users

Re: Turn off migrations completely in Django 1.7

2016-04-21 Thread Marcin Nowak
possibility to modify queries based on context variables, which is not flexible as querysets, but often good enough to do job well. But as a disadvantage you have to pay attention to SQL syntax and variables escaping. Kind Regards, Marcin -- You received this message because you are subscribed

Re: Turn off migrations completely in Django 1.7

2016-04-20 Thread marcin . j . nowak
tate to make diff using external tool. That' all. Marcin -- 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.

Re: Migrations force me to have, forever, any name/reference I use in field validators=, choices=, whatever, valid forever (even if the requirements change).

2016-04-18 Thread marcin . j . nowak
27;re getting rock-solid db schema management without python imports problem, without historical problems nor models, without strange squashing ideas, refactoring horror, and so on... Kind Regards, Marcin -- You received this message because you are subscribed to the Google Groups "Djan

Re: GROUP BY without using aggregate function

2016-03-03 Thread marcin . j . nowak
Maybe today query planners are smart enough, so the "group by" trick can be abadoned. The example of query is `select rel_id from some_table group by rel_id` (versus select distinct rel_id from some_table) Marcin -- You received this message because you are subscribed to the Goo

Re: GROUP BY without using aggregate function

2016-03-02 Thread marcin . j . nowak
ue years ago and I'm still using it. Marcin -- 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

GROUP BY without using aggregate function

2016-03-02 Thread marcin . j . nowak
cts.filter(...).group_by('my_column') ? Kind Regards, Marcin -- 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.co

How to disable atomic() in tests

2016-02-05 Thread marcin . j . nowak
est, which is terrible in terms of performance and flexibility. Databases should be created/cleaned/prepared before running test suite, and running tests shouldn't alter database` state. That's why every test should end with rollback for all transactions and all databases. Kind Rega

Re: [Django 1.8.6] How to dump sql from models

2015-11-16 Thread marcin . j . nowak
e only way... Thanks. Marcin -- 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 e

[Django 1.8.6] How to dump sql from models

2015-11-16 Thread marcin . j . nowak
I dump tables and indices creation sql from my models with new Django? 2. What was wrong with old-style method? Kind Regards, Marcin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: I'm a Flask/Android developer in need of advice. Is Django a good fit for my next project: a no-transaction marketplace website/mobile app?

2015-11-04 Thread marcin . j . nowak
support/future development plan, development time, current status of development, and your experience. Django + DRF should give you real RAD until you will try to force one of them to do something rare/custom/advanced (i.e. field level permissions). BR, Marcin -- You received this message becau

Re: can I write Django a client consuming RESTfull api from elsewhere

2015-11-04 Thread marcin . j . nowak
ould be stateless. BR, Marcin. -- 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

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-26 Thread marcin . j . nowak
ementation, then maybe I could give you some thoughts... Better support for monkeypatching is not very interesting. > > Right, Carl. And this wasn't my intention. You give me a hint in other thread and it was helpful, but MP has some side effects (with migrations, again). PS. I don

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-26 Thread Marcin Nowak
disadvantages: - the profile is not necessary now and will contain just one column (well, three when incl. PK and FK to user) - performance issues (joining table) I think that for this use case "Custom user" will not work. I was wrong. I must forget about "Custom user&

Re: Django 1.7 migrations: Adding one field to User`s model

2015-08-26 Thread marcin . j . nowak
;auth" as an argument). This is a Django migrations design problem... :( BR, Marcin -- 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-u

Re: Turn off migrations completely in Django 1.7

2015-08-26 Thread Marcin Nowak
project-wide and splitted by database. Developer should have possibility to change database schema as he need without forcing limitations of model-based migration system. Not every table is mapped to model. Kind Regards, Marcin -- You received this message because you are subscribed to the Google

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
is added complexity I would like to provide solid patch as a pull request, but I'm afraid that it will be rejected due to some kind of spirit, politics or something else. BR, Marcin -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
ecessary work. Something like 'disable all' is simplest solution, but naturally limited. Maybe there is a solution for both? BR, Marcin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receivi

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
template engine to Jinja2, or same as removing unnecessary middleware. I just thought that skipping some function calls is simplest than creating new feature for building workarounds, and even will be shorter than time for talking about it. But I was wrong. BR, Marcin -- You received this messag

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
ed > adding that flag to your models? Does something about that not work for > you? > Managed=False is not same. I.e. I can't set managed=False for 3rd party apps (including `django.contrib`) But to be honest I didn't tried iterate over all INSTALLED_APPS to patch meta option

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
est runner. But, for example, `runserver` complains about unapplied migrations (which is not true), and I don't know what else and when other db alterations can be executed. "Global turn off" should give us assurance that nothing would be changed in db automatically. BR, Marcin -- Y

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread Marcin Nowak
il > I'm speaking on behalf of a one of experienced developers, who knows that data is most important thing in IT. And this is not an implementation detail, because the bulit-in tool is forcing us to do things in the your way/workflow, and sometimes blocks us. Let the user decide which

Re: Turn off migrations completely in Django 1.7

2015-08-25 Thread marcin . j . nowak
fiction... this is a conceptual mistake. There are no models mapped to db tables - there are tables mapped to models. We're working with databases and their representations in application layer, and not vice versa. Thanks, Marcin -- You received this message because you are subscribed to

Django 1.7 migrations: Adding one field to User`s model

2015-08-25 Thread marcin . j . nowak
, in state_forwards state.models[app_label, self.model_name.lower()].fields.append((self.name, field)) KeyError: ('myapp', u'user') I need to add just one column using builtin migrations. How to do that? This is bug or feature? BR, Marcin -- You received this message

Re: Django 1.8, migrations and database views

2015-08-04 Thread marcin . j . nowak
Oh my s**t. Django generates operation but does not execute it when migrating. What a mess... Solved by Django itself... On Tuesday, August 4, 2015 at 5:21:07 PM UTC+2, marcin@gmail.com wrote: > > Hi, > > Who knows how to disable auto-making migrations for models mapped to

Django 1.8, migrations and database views

2015-08-04 Thread marcin . j . nowak
Hi, Who knows how to disable auto-making migrations for models mapped to database views? I've set managed=False but it does nothing. Django adds CreateModel operation to migration file, but it shouldn't do that. Can anyone help? Thanks. BR, Marcin -- You received this message b

Re: Django Migrations - Relation Already Exists

2015-04-26 Thread marcin . j . nowak
about builtins. BR Marcin On Thursday, April 23, 2015 at 9:18:35 PM UTC+2, Rick Weinberger wrote: > > I posted the same question on stack overflow, here: > http://stackoverflow.com/questions/29830928/django-db-utils-programmingerror-relation-already-exists > > I basically can't fig

Re: Migrations During Development

2015-04-26 Thread marcin . j . nowak
you're safe until you commit (& spread) changes. And you shouldn't rely on automatic squashing ;) BR Marcin On Saturday, April 25, 2015 at 2:26:47 PM UTC+2, Timothy W. Cook wrote: > > Django 1.8 Python 3.4 PostgreSQL 9.3 > > During development I am creating se

Re: Turn off migrations completely in Django 1.7

2015-04-26 Thread marcin . j . nowak
We're using better migration solution, which is project-wide and related only to databases. Django is a only small part of the project and it should not modify any table and any record outside our migrations system. /BR Marcin On Saturday, September 20, 2014 at 6:37:59 AM UTC+2, Anthony Tuin

Re: Model form with optional fields issue

2014-12-23 Thread marcin . j . nowak
simplification. But in the context of validation only HTML fields this is OK. Regards, Marcin -- 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 djang

Re: Model form with optional fields issue

2014-12-22 Thread marcin . j . nowak
for plain-old-html input I can't rely on Django as a web framework. That's sad, because I like it for rapid development. Kind Regards, /Marcin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Model form with optional fields issue

2014-12-19 Thread marcin . j . nowak
s. Where is admin?, you'll ask... And you'll hear a strange voice - "admin is cooking borscht with ravioli, dude!" What do you think - is this expected? /Marcin -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsu

Re: Prefetch object (django 1.7)

2014-01-30 Thread Marcin Szamotulski
r.objects.extra(select={'created': 'created'}).order_by('postauthor__created')) Post.objects.prefetch_related(p).all() I think it would be nice to add such examples to the docs. If that's the case I can write a paragraph with an example like the one I am using, i.e.

Re: Prefetch object (django 1.7)

2014-01-29 Thread Marcin Szamotulski
On 01:42 Mon 27 Jan , Marcin Szamotulski wrote: > Hello, > > I have a model > > class Post(models.Model): > > ... > authors = models.ManyToManyField('accounts.User', through='PostAuthor', > related_name='authors_posts

Prefetch object (django 1.7)

2014-01-26 Thread Marcin Szamotulski
n: django.core.exceptions.FieldError: Cannot resolve keyword 'authors_posts' into field. Choices are: created, id, post, post_id, user, user_id Thanks for help, Marcin Szamotulski -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Textarea and initial value

2013-09-30 Thread Marcin Szamotulski
Thanks, I thought I checked this. Marcin On 30 September 2013 18:22, Daniel Roseman wrote: > On Monday, 30 September 2013 18:18:00 UTC+1, Zoltan Szalai wrote: > >> try not to use the same value ('about') for the name attribute of the >> textarea and your submit

Re: Textarea and initial value

2013-09-30 Thread Marcin Szamotulski
ps. If I render the form with {{ form.as_ul() }} I get the same behaviour. Marcin On 30 September 2013 17:11, Marcin Szamotulski wrote: > Sure here it is how the form is render: > > > value='' /> > > Submit > >

Re: Textarea and initial value

2013-09-30 Thread Marcin Szamotulski
Input' -%} {{ render_boolfield(field, after) }} {%- else -%} {% if label -%} {{ field.label_tag() }} {%- endif %} {{ field.as_widget() }} {{ field.errors.as_ul() }} {%- endif %} {%- endmacro %} Thanks, Marcin On 30 September 2013 15:11, Daniel Roseman wrote: > On Monday, 30 September 2013 1

Re: Textarea and initial value

2013-09-30 Thread Marcin Szamotulski
On 06:38 Mon 30 Sep , Daniel Roseman wrote: > On Sunday, 29 September 2013 22:58:38 UTC+1, Marcin Szamotulski wrote: > > > Dear Django users, > > > > The short question is: How to use Textarea widget with initial value? > > The long version: I have a form

Textarea and initial value

2013-09-29 Thread Marcin Szamotulski
Playing with this I tried to remove the 'initial value' using javascript ($('textarea[name="f"]).html('')), but the submitted date (request.POST) was not affected. Thanks for help, Marcin -- You received this message because you are subscribed to the Goo

Re: Paginattion: How do I pass current page number around views, forms and templates?

2013-09-17 Thread Marcin Szamotulski
You can also pass it around as a GET argument. Best regards, Marcin On 02:10 Mon 16 Sep , DJ-Tom wrote: > > I think I could use the views name as the key to the current page - that > way the system "remembers" the page number for each view. > > Am Dienstag, 10. Se

Re: bad request 400

2013-09-09 Thread Marcin Szamotulski
The problem has solved somehow (reboot). Marcin On 19:08 Sun 08 Sep , Germán wrote: > If you don't post your code it's quite difficult to help yo > On Sunday, September 8, 2013 3:34:33 PM UTC-5, Marcin Szamotulski wrote: > > > > Hello, > > > > I s

bad request 400

2013-09-08 Thread Marcin Szamotulski
y settings which are almost the default ones and could not find anything special. Any ideas how to go through this. I also run django on pdb but I could not find anything leaeding to this error. Thanks for help, Marcin -- You received this message because you are subscribed to the Google Group

Re: db queries made twice

2013-08-31 Thread Marcin Szamotulski
Thanks, though disabling django_toolbar completely (removing the middleware, and the entry in INSALLED_APPS) did not helped. Regards, Marcin On 04:34 Sat 31 Aug , Tomáš Ehrlich wrote: > Other option is set SHOW_TEMPLATE_CONTEXT to False > in DEBUG_TOOLBAR_CONFIG. > > See https:

db queries made twice

2013-08-31 Thread Marcin Szamotulski
013-08-31 11:04:33.597734+00:00' ); args=('2dh8ly6cfqkyiauv8co5h1vossjg70ru', u'2013-08-31 11:04:33.597734+00:00') (0.001) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user&

Re: Django ORM: default value from sql query

2013-08-21 Thread Marcin Szamotulski
)) > > [1] > https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.Field.default > Le mercredi 21 août 2013 18:49:48 UTC-4, Marcin Szamotulski a écrit : > > > > Dear Django users, > > > > I am would like to set a default value on a model's

Django ORM: default value from sql query

2013-08-21 Thread Marcin Szamotulski
e and set this count as the default value. I know that this can be done in two steps first find the value then set it, but I would like to have it done automatically. Best regards, Marcin -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: jquery in django

2013-07-01 Thread Marcin Szamotulski
s.com. > Visit this group at http://groups.google.com/group/django-users. > For more options, visit https://groups.google.com/groups/opt_out. > If you will follow the advices to learn AJAX and jQuery and how to use them with Django then you can check if one of those plugins can help you:

Re: Missing peice before best practises

2013-06-26 Thread Marcin Szamotulski
p://gettingstartedwithdjango.com/en/lessons/microblog-kitchen-sink/ Best, Marcin -- 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...@g

Re: Registration error

2013-06-24 Thread Marcin Szamotulski
turned by TemplateView.as_view() call). The as_view function can set TemplateView class attributes (which is shared for all classed based views, since it is how the base View class behaves). Note also that only the TemplateView passes view arguments (the way you declared them) to the template con

Re: Sharing session among multiple domains (generic web development question)

2013-06-11 Thread Marcin Szamotulski
Hi, If you use db backend for sessions you could save the session in both databases. Check this: http://dustinfarris.com/2012/2/sharing-django-users-and-sessions-across-projects/ I hope this helps. Best regards, Marcin On 14:22 Tue 11 Jun , Tomas Ehrlich wrote: > Hi Avraham, > I kno

Re: dictionary update sequence

2013-06-10 Thread Marcin Szamotulski
the kwargs dictionary. Best regards, Marcin On 14:40 Fri 07 Jun , Rene Zelaya wrote: > Hi, > > I am getting the following error when the server tries to load one of my > templates and I am not sure what the problem is: > > dictionary update sequence element #0 has length 1

Re: Suggestions on caching queries for a single request on a subset of Views?

2013-06-10 Thread Marcin Szamotulski
Best regards, Marcin On 09:58 Mon 10 Jun , Kurtis wrote: > I have two views which perform a ton of DB queries. The views themselves > don't perform the queries; they simply call quite a few Model methods to > build the context data. I understand that I could simply build one meth

Re: Some problems with Paginator

2013-06-07 Thread Marcin Szamotulski
We all make mistakes, don't worry :) Best regards, Marcin On 00:02 Fri 07 Jun , Federico Erbea wrote: > I'm really stupid, why i never think to the easiest way, never...I wrong > "{% for film in attore.film_set.all %}" because i had write "{% for fil

Re: sphinx migration: addint m2m field

2013-06-04 Thread Marcin Szamotulski
The problem has resolved without my intervention :). Regards, Marcin On 22:29 Mon 03 Jun , Marcin Szamotulski wrote: > Hello, > > I need to add a m2m field to a model. So I did added it and then > I wanted to use south to migrate the app. Since this app was already > us

sphinx migration: addint m2m field

2013-06-03 Thread Marcin Szamotulski
ide db (with psql since I use postgres) the table is not there. How can I debug this? I did not have any problems with making migrations with this app before. Best regards, Marcin Szamotulski -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: django , python and ides

2013-06-03 Thread Marcin Szamotulski
checkout something in django internals or one of your apps. Best regards, Marcin Szamotulski On 08:23 Mon 03 Jun , Sergiy Khohlov wrote: > emacs + few plugin. For me it is a better choise > > Many thanks, > > Serge > > > > On Sun, Jun 2, 2013 at 12:01 AM, Doug Snyde

Re: middleware question

2013-05-25 Thread Marcin Szamotulski
I did some test myself and the best thing what I can do is to attach data to the request since its live cycle is what I actually need. Best regards, Marcin On 14:20 Sat 25 May , Marcin Szamotulski wrote: > Dear Django Gurus, > > I have a simple question about middleware.

middleware question

2013-05-25 Thread Marcin Szamotulski
regards, Marcin Szamotulski -- 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

Re: Development server won't work from a shared web host

2012-09-04 Thread Marcin Tustin
rs" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/django-users/-/UhMFGZB6YS0J. > > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegro

Re: Choosing a JS framework to go together with Django

2012-09-04 Thread Marcin Tustin
J. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >&

Re: Asking for your help: How do you develop apps today and in the future?

2012-08-19 Thread Marcin Tustin
his group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Marcin Tustin Tel: 07773 787 105 -- You received this message because you are subscribed to the Google Groups &quo

  1   2   3   >