MySQL error subquery returns more than 1 row

2009-11-17 Thread Ilya
I just developed some code like: MyModel.objects.filter(key_to_mymodel2 = MyModel2.objects.all())) This query produce SQL: SELECT * FROM `test_mymodel` WHERE key_to_mymodel2_id =(select `id` from `test_mymodel2`) It works fine on SQLLite, but in MySQL it produce error: OperationalError: (1242, 'S

Re: MySQL error subquery returns more than 1 row

2009-11-17 Thread Ilya
M, thanks. But should I create ticket on django trac about this issue? On 17 ноя, 17:29, Tom Evans wrote: > On Tue, Nov 17, 2009 at 3:17 PM, Ilya wrote: > > I just developed some code like: > >  MyModel.objects.filter(key_to_mymodel2 = MyModel2.objects.all())) > > T

Re: Accuracy of GeoIP?

2011-10-27 Thread Ilya
Alan, try out our geolocation solution: Geobaza. We recently updated our Python API and make Django app. High accuracy level for US & exUSSR. Install from PyPi: http://pypi.python.org/pypi/geobaza Docs here: http://geobaza.ru/docs/python/v1/ Demo: http://geobaza.ru/try/ Feel free to send me your

Re: Nested formsets at Django 1.3

2011-11-08 Thread Ilya
The validation error happens when the formset is passed an empty dictionary. The docs (release notes for 1.3) suggest passing None instead. So doing this should fix the problem: > > TenantFormset(data=self.data or None, instance=instance, prefix='TENANTS_%s' % pk_value) In my case, which is sim

Re: changing code = restarting django??

2008-09-05 Thread Ilya Braude
ation section for each project so that django doesn't mix requests between projects. Replace with any unique string. Ilya -- Ilya Braude Lead Software Engineer Drakontas LLC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Related set need some impovement

2009-07-16 Thread Ilya Novoselov
I'm sorry if this have been discussed before. I have table A, which have foreign key foo to model B. When I query B related set trough B.a_set.all(). When I iterate over b_instance.a_set.all() and access foo member, Django doesn't hesitate to make database query to retrieve B again and again. So

Django, Infobright: tables and keys

2009-05-15 Thread Ilya Musabirov
Hi! I'm developing some kind of Business Intelligence system, based on Infobright-Mysql Data Warehouse. One of our key needs --- simple and flexible reporting/dashboards engine. I'd looked up most open source reporting engines, but most of them Java-based, and I want to use something in Python, b

Re: MySQL error subquery returns more than 1 row

2009-11-17 Thread Ilya Polosuhin
found how to solve SQL-query (add ANY to subquery). But I not need SQL, I need django-ORM code that will do what I need ;) So I think this is the issue of django-ORM and should I report about it? On Tue, Nov 17, 2009 at 6:48 PM, Nick Arnett wrote: > > > On Tue, Nov 17, 2009 at 7:17 A

Re: Can I change the title of an admin page?

2009-11-17 Thread Ilya Polosuhin
The folder for admin template is path/to/your/project/templates/admin So in your case you should put your own template to ~/webapps/django/sw1/templates/admin/ On Tue, Nov 17, 2009 at 7:45 PM, lzantal wrote: > Don't copy the original change_list.html file over there. > Create a new empty change_

Re: Set model form initial value?

2009-11-18 Thread Ilya Polosuhin
Just use "initial" keyword on creation form class myForm(forms.Form): test = forms.CharField(label = _('test'), max_length=255, required = True) myForm(initial = {'test': 'test string'}). If you use form that generated from model: class myForm(forms.Form): class Meta: model = myMod

Re: Unique set of fields in a model

2010-04-30 Thread Ilya Kogan
Thank you very much, this is just what I needed! 2010/5/1 Karen Tracey > On Fri, Apr 30, 2010 at 5:08 PM, cornflake wrote: > >> Hello, >> I'm looking for a way to define uniquness for a set of more than one >> field in a model. >> For example: >> >> class Item(models.Model): >>order = m

problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
http://dpaste.com/168572/ The first call to blog.entry_set.get(id=None) returns entry2, while the second call correctly throws the exception, which is incorrect! I've been able to reproduce this with trunk as of today. Am I doing something wrong, or is there a bug? Thanks, Ilya -- You rec

Re: problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
Ilya Braude wrote: Hello! I've run into a problem when calling .get on a related field manager with id = None. As far as I understand, doing an objects.get(id=None) should throw a DoesNotExist exception. However, it seems that there is some caching going on, as demonstrated in this tr

Re: problem with objects.get(id=None)

2010-03-05 Thread Ilya Braude
L behavior should really be documented somewhere in Django. The solution of putting the following line in settings.py works for me: DATABASE_OPTIONS = {'init_command': 'set sql_auto_is_null=0'} from: http://www.mail-archive.com/django-users@googlegroups.com/msg74313.htm

Re: problem with objects.get(id=None)

2010-03-06 Thread Ilya Braude
Masklinn wrote: On 6 Mar 2010, at 05:43 , Ilya Braude wrote: Karen Tracey wrote: I'm guessing you are using MySQL That's just how it behaves, by default. See: http://dev.mysql.com/doc/refman/5.1/en/server-session-variables.html#sysvar_sql_auto_is_null Wow, thanks.

Re: Django User Registration tutorial

2010-03-06 Thread Ilya Braude
x27;users/register.html', { 'form': form, }) Looks like your view doesn't return anything when form.is_valid() returns False. That could be the problem. Ilya -- You received this message because you are subscribed to the Google Groups &quo

Re: Mysql sleeping queries

2007-06-20 Thread Ilya Semenov
Malcolm, I'm having exactly the same problem. Under Apache+mod_python, each HTTP request keeps a stale MySQL connection. I traced the changeset, it was 5481->4582. I put some logging to django.db.backends.mysql.base: self.connection = Database.connect(**kwargs) + log.msg("connected to %

Re: Mysql sleeping queries

2007-06-21 Thread Ilya Semenov
Malcolm, I traced the problem and submitted the patch, see details at http://code.djangoproject.com/ticket/4650 I'm not completely sure about the logic of signals though, the change may affect some middleware depending on it. --~--~-~--~~~---~--~~ You received th

@url tag - getting rid of urlpatterns

2007-08-29 Thread Ilya Semenov
I've been using django for almost a year and I was always frustrated by its cumbersome urlpatterns system. While it is really flexible, it doesn't provide any shortcuts for widely-used url and views naming schemes. Let me show in examples what I mean. As everyone, I started with the tutorial and

Re: @url tag - getting rid of urlpatterns

2007-08-30 Thread Ilya Semenov
Ivan, Thanks for reviewing the snippet. > While the decorator looks nice it creates in my opinion at least as many > problems as it solves. > > 1. You can apply decorators only to custom views, not to generic views. > And as generic views are commonly used one still should keep a separate > urls

select_related() and null=True

2007-03-05 Thread Ilya Semenov
Hello everyone, I've run into the problem which I believe is a common use-case and is already solved, but I can't seem to find the answer neither in documentation, nor in django-users or django-developers. Here it goes: how do I optimize a list query if I have null=True foreign key in my entity?

Re: select_related() and null=True

2007-03-06 Thread Ilya Semenov
David Cramer wrote: > but I strongly encourage you to find a > differently solution, as LEFT JOINs can be VERY costly on system > resources. I realize that under some circumstances, LEFT JOINs can be costly. However, I don't hink my case is such. Let me recall the (I believe very simple) model:

Does Django care about max_query_params? [feature request]

2022-06-27 Thread Ilya Gurov
Hi, all! Gotta problem with the number of query params. We're using a backend, which connects to a cloud database, and at some point we suddenly started getting such an error: *Number of parameters in query exceeds the maximum allowed limit of 950* Appearing on this step: *django/django/cont

Re: Does Django care about max_query_params? [feature request]

2022-07-05 Thread Ilya Gurov
It's Cloud Spanner. We're using `django_spanner` as a 3rd party connector: https://github.com/googleapis/python-spanner-django On Tuesday, June 28, 2022 at 11:36:08 AM UTC+4 Jason wrote: > > What db are you using? This might also be an issue for your db connector > lib > On Monday, June 27, 20

Re: Python / Django slow ? Deciding my next technological stack

2015-03-06 Thread Ilya Kazakevich
In modern world any heavy loaded site should have HORIZONTAL SCALING. That means it should support scale by adding new servers to cluster. With horizontal scaling you should not care about how python is slow on each node, until you have traffic like Facebook or Guthub have. I believe 99% website

Re: Future for Django, Jobs, Confused :/

2015-03-06 Thread Ilya Kazakevich
You never know what would be popular in next several years. In late 90th Perl was the main web development language. In 2000th it was PHP. Now it is Ruby and Python. If you love Python, use Django but study Ruby/RoR in background. Ruby is not rocket science and you should not have any serious t

Re: how to deal with not translated strings in html

2015-03-06 Thread Ilya Kazakevich
What is the point of NOT translating "month" to English? There are several solutions: 1) Create custom templates / custom tags and include them based on language. For example you may have "foo.nl.html" and "foo.en.html" and include "foo..html". But I believe using different HTMLs for different

Re: Fixing a poorly written Django website (no unit tests)

2015-03-06 Thread Ilya Kazakevich
You may start from highest level testing: 1) create "usage scenarios" for your website. Like "customer opens page 'foo', and should see 'bar'". You use such scenarios for manual testing, right? 2) code such scenarios against Django project. You may use BDD testing tools (like lettuce or behave)

Re: Sharing templates across multiple projects

2015-03-06 Thread Ilya Kazakevich
I like Simon's ideas about shared location and separate app (Django encourages us to use apps to share anything), but you also may share them on VCS level. SVN supports "external" checkout, in git you may add one repository to another. \project1\templates\shared_temps \project2\templates\share

Re: Django structure

2015-03-08 Thread Ilya Kazakevich
are architecutre. It is ok to refactor existing projects changing modules structure, because you never know if your layout is good until you try to support such project. Ilya. On Sunday, March 8, 2015 at 9:56:51 PM UTC+3, Gabriel Klein wrote: > > Hi there, > > I'm going to start

Re: django beginner

2015-03-13 Thread Ilya Kazakevich
django-admin creates infrastructure required for your project, and there should be more than 3 files. On *nix systems django-admin is py script with shebang, but due to windows command processor limitations (cmd) on windows there is executable file which actually calls django-admin. So, you sh

Re: {{STATIC_URL }} or {% static "...." %} What`s the correct to use?

2015-03-20 Thread Ilya Kazakevich
This one "{% static "" %}" is MUCH better than {{STATIC_URL }}. It is recommended way. You almost never need to use {{STATIC_URL }}. On Friday, March 20, 2015 at 3:59:08 AM UTC+3, Fellipe Henrique wrote: > > Hi, > > In my template, when I made a reference to my Static folder.. what's the >

Re: Enterprise software patterns for django/Python ?

2015-03-30 Thread Ilya Kazakevich
Hello. Django is full-stack *web* framework, so it has some web-specific shortcuts, and probably does not fit ideally in enterprise patterns. For example, it does not encourage you to have "backend server" and "frontend server" connected via SOAP/XML/ESB like in "classical" enterprise approach

Re: setup.py for project?

2015-04-01 Thread Ilya Kazakevich
Hello. What exactly are you trying to achieve? If you have some part of functionality that is interesting for other people/projects and hence should be shared via pypi, you should extract it as reusable app. Projects, how ever, are not reusable. If you need a fast way to install al project req

Re: encode url

2015-04-01 Thread Ilya Kazakevich
Why do you need it? Web-browser encodes your data using Percent-encoding (http://en.wikipedia.org/wiki/Percent-encoding) by default. You may base64 your code on client side using JS and decode it on server side using python, but it seems useless for me. base64 is used to eliminate special cha

Re: setup.py for project?

2015-04-02 Thread Ilya Kazakevich
Simon is right. I recommend this http://martinfowler.com/books/continuousDelivery.html On Thursday, April 2, 2015 at 1:57:40 PM UTC+3, guettli wrote: > > > > Am 02.04.2015 um 03:13 schrieb Ilya Kazakevich: > > Hello. > > > > What exactly are you trying to achie

Re: Saving Contionus Data through Django

2015-04-02 Thread Ilya Kazakevich
You can't just store stream in database. You need to buffer it first, and then save to field like blob: http://www.postgresql.org/docs/9.1/static/datatype-binary.html I am not sure that relational database is the best place to store binary data coming from devices. On Thursday, April 2, 2015 a

Re: best way to pass options to django views?

2015-04-02 Thread Ilya Kazakevich
This tutorial is about client-side (JavaScript) while Python/Django is server side:) What are you trying to do? Pass all options from HTML page to server side? What for? In most cases you want to pass the option selected by user to server. You must first read about HTML forms and how to submit

Form to create several objects with one-to-one relation

2015-04-21 Thread Ilya Kazakevich
s, validations and so on. I just want to list their names (like "fields" attibute). If you wonder why do I need one-to-one: Comments are used heavily in other places and have different relations with different models. Thank you. Ilya. -- You received this message because you are su

Re: Form to create several objects with one-to-one relation

2015-04-22 Thread Ilya Kazakevich
Wednesday, April 22, 2015 at 2:40:56 AM UTC+3, Vijay Khemlani wrote: > > What about and old-school DetailView? > > def get_context_data -> Creates the two forms and puts them in the context > > def post -> Validates and process the forms > > > > On Tue, Apr 21, 2015

Re: Best practice for passing JSON objects to a template

2015-04-22 Thread Ilya Kazakevich
What about putting it into ? On Thursday, April 9, 2015 at 8:50:50 PM UTC+3, Eric Plumb wrote: > > Hi Djangoers! > > Sometimes in the course of human events it becomes necessary to encode a > JSON object directly into a template. We all prefer AJAX and REST APIs and > the rest of the TOFLAs, bu

Re: Form to create several objects with one-to-one relation

2015-04-23 Thread Ilya Kazakevich
looks silly. I will create custom form or review my model structure. On Wednesday, April 22, 2015 at 3:38:30 PM UTC+3, Ilya Kazakevich wrote: > > Thank you, that may work, but I feel that I reinventing wheel here. > > Actually, there are inline_formset and CreateWithInlinesView (fr

forcing user model to return first_name last_name if exists

2015-04-28 Thread Ilya Kazakevich
Hello, I have many places in my app where user (from user model) is displayed: templates, forms, fliters, tables etc. It is displayed as username everywhere. I want it to be displayed as first_name/last_name. I can do that with monkey patching: @receiver(request_started) def patch(*args, **kwa

Re: What is the ideal web server to use with Django?

2015-05-15 Thread Ilya Kazakevich
Hi. I believe the best installation is Apache + wsgi and nginx for static. In some scenarios Apache performance may be your bottleneck, but: 1) there are a lot of ways to tune it. Read about "Multi-Processing Modules" for example. 2) 99% of web applications do have different bottlenecks, not th

Re: best way change template base my app

2015-05-15 Thread Ilya Kazakevich
You also may use widgets instead of "extends": http://sniplates.readthedocs.org/en/latest/ On Friday, May 15, 2015 at 6:50:40 AM UTC+3, sacrac wrote: > > Thank Andre Luis :) > > On Wed, May 13, 2015 at 1:41 PM, André Luiz > wrote: > >> extends should always be on first line of file and it accep

Adding a one field to user model: trying not to create custom one)

2015-05-18 Thread Ilya Kazakevich
Hello, I want to add just a one field to my model, and this field participates in user representation ( I use monkeypatch to change __str__). Django manual tells me to create profile with one-to-one relation in this case. Well, it may work. But if I have with 250 users, I face 250 "SELECT" qu

Re: Adding a one field to user model: trying not to create custom one)

2015-05-19 Thread Ilya Kazakevich
Hello. > I am not aware of a good solution to this problem other than manually > adding the .select_related() to your query on the list-of-users page. > Oh :(( > > > I am really unhappy with idea of using custom user model. > > Why? > > If it's because this is an existing project and the p

Re: Adding a one field to user model: trying not to create custom one)

2015-05-19 Thread Ilya Kazakevich
to add this app to INSTALLED_APPS and set FIELDS=["last_name", "first_name"] in my settings.py and it works. I have the same for "get_absolute_url" method as well. It is not very pythonic way to do something, but it works. > -James > On May 18, 2015

RE: Django newbie issues

2014-07-08 Thread Ilya Kazakevich
ht Commander. But I believe you need to read some books or tutorials about Ubuntu before. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >

RE: Django and Python-Ldap with Active Directory Question

2014-07-18 Thread Ilya Kazakevich
.48.45:389"; ldp = ldap.initialize(LDAP_URL) print ldp.bind(LOGIN, PASSWORD) for (dn, entry) in ldp.search_s(GROUP_DN, ldap.SCOPE_ONELEVEL): # Scope!!! print(entry) ldp.unbind() Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Dev

TEST_MIRROR not working?

2014-10-25 Thread Ilya Baryshev
Hey all! I was writing tests for queries that use replica database, so I tried using TEST_MIRROR setting. TEST_MIRROR promises "connection to slave will be redirected to point at default. As

Re: TEST_MIRROR not working?

2014-10-26 Thread Ilya Baryshev
>Ilya: Can you test if using TEST_MIRROR fixes the issue you are seeing? Both settings have same effect. I've slightly modified testcase to demonstrate replica queries are not the same as master queries (no fixtures): def test_fixture(self): MyModel.objects.using('def

Re: TEST_MIRROR not working?

2014-10-27 Thread Ilya Baryshev
I ended up opening a ticket https://code.djangoproject.com/ticket/23718 after fining my testcase actually works against Django 1.3.7 On Sunday, October 26, 2014 10:23:08 PM UTC+3, Ilya Baryshev wrote: > > >Ilya: Can you test if using TEST_MIRROR fixes the issue you are seeing? > B

RE: Http request with multiple files is not able to read by django server

2014-04-25 Thread Ilya Kazakevich
Hello, There may be some web-proxy between client and server that limits request size or time. Server may limit it as well. * Remove all proxies between client and server * Try to use different client (browser for example) * Check your server configuration for request size and timeout. Ilya

RE: Best practice - evolving from one to several sites using Django

2014-04-30 Thread Ilya Kazakevich
Django and try to move one site to it. Then, move next one. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googl

RE: function to create objects in a given model

2014-05-20 Thread Ilya Kazakevich
Hello, Try managers: https://docs.djangoproject.com/en/1.6/topics/db/managers/ Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[

RE: ASP .NET web service and Django

2014-05-26 Thread Ilya Kazakevich
Hello, For web services (I believe you speak about SOAP web services) check: * https://wiki.python.org/moin/WebServices (SOAP section). It has info about Python SOAP client and server libraries. * For .NET (client) : http://stackoverflow.com/questions/1302525/how-to-use-a-wsdl Ilya Kazakevich

RE: How to pass URL to a view

2014-05-28 Thread Ilya Kazakevich
http://stackoverflow.com/questions/12758786/redirect-return-to-same-previous-page-in-django See also: https://docs.djangoproject.com/en/dev/ref/request-response/ Be sure to check this header exists. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "De

RE: Adding models from one app to another app

2014-05-28 Thread Ilya Kazakevich
'app_name.model_class_name'. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegroups.com] On Behalf Of Inderpree

RE: [OT] Web application and image scanner

2014-05-28 Thread Ilya Kazakevich
Hello, * Silverlight * JavaFX * Flash * ActiveX (Windows only) Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@g

RE: Startproject opens django-admin.py

2014-06-03 Thread Ilya Kazakevich
Hello, Shebangs are not supported by windows command processor (cmd). Try: C:\Python27\python.exe django-admin.py Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >Fr

RE: newbie with models - user-defined function raised exception

2014-06-03 Thread Ilya Kazakevich
ly, you should start with Django 1.6 or even 1.7 (1.5 is outdated!) and use official Django tutorial (https://docs.djangoproject.com/en/dev/intro/tutorial01/) instead of this book. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pl

RE: URLs: mymodel_id vs object_id vs pk ....

2014-06-04 Thread Ilya Kazakevich
this field whatever you want. I believe "id" is nice. I use DetailView unless I need really custom logic, so I use "slug" almost always. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!"

RE: How to install psycopg2 using Pip?

2014-06-04 Thread Ilya Kazakevich
quot; to find your postgres installation. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegroups.com] On Behal

RE: safari ios 7 and django app - function not being called to serve video

2014-06-05 Thread Ilya Kazakevich
://httpd.apache.org/docs/2.2/logs.html ) 3) NEVER hardcode urls! Use URL tag (https://docs.djangoproject.com/en/dev/ref/templates/builtins/#url) Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Messa

RE: safari ios 7 and django app - function not being called to serve video

2014-06-05 Thread Ilya Kazakevich
What algorithm is used for keys in HTTPS on your installation? AFAIK, Safari@iOS does NOT support DSA keys (only RSA keys are supported). Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Messa

RE: Question about moving code to product from local or development server.

2014-06-09 Thread Ilya Kazakevich
Hello, There are a lot of ways to do that: from simple "rsync" or "checkout periodically with cron" (in both cases you need to move your settings to environment vars) to engines like Fabric. Even books are written: (http://continuousdelivery.com/) Ilya Kazakevich, Jet

RE: error

2014-06-11 Thread Ilya Kazakevich
Hello, Try to use debugger. https://docs.python.org/2/library/pdb.html or http://www.jetbrains.com/pycharm/features/#debugger Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >Fr

RE: Django Python roop

2014-06-11 Thread Ilya Kazakevich
Hello, What are you trying to do? Split string? Copy array? You probably need to use builtin functions for that. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >Fr

RE: implementing a ticket submission system

2014-06-11 Thread Ilya Kazakevich
Hello, Use Primary Key: https://docs.djangoproject.com/en/dev/topics/db/models/#automatic-primary-key-fields Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@

RE: NameError at /admin/ name 'HoleImage' is not defined

2014-06-11 Thread Ilya Kazakevich
To use any symbol (including " HoleImage" class) you need to import it first. You've imported Hole (from holes.models import Hole), but you forgot to import HoleImage. So, you got " name 'HoleImage' is not defined " error. It is better to use IDE, because it

RE: NameError at /admin/ name 'HoleImage' is not defined

2014-06-11 Thread Ilya Kazakevich
d PHP _before_ zend/phpcacke/joomla or wordpress, right?:) ) Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@googlegroups.com

RE: NameError at /admin/ name 'HoleImage' is not defined

2014-06-11 Thread Ilya Kazakevich
Instead of from holes.models import HoleImage write from holes.models import HoleImage, Hole Please read https://docs.python.org/2/tutorial/modules.html Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >

RE: Is it possible to get working django transaction with django multiple databases

2014-06-16 Thread Ilya Kazakevich
I believe you need software that supports distributed transaction coordination protocols ("X/Open XA" Is good example) and both DBs should support this protocol and two-phase commit. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ &qu

RE: Database problem in Django

2014-06-18 Thread Ilya Kazakevich
You probably need to have "insert_date" field and store entry created date there. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups

RE: Who are using Aptana Studio 3? Please respond.

2014-06-18 Thread Ilya Kazakevich
s download database drivers automatically (like 0xDBE or PyCharm), it is sad that Aptana does not do it) Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@google

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
depend on LANGUAGE_CODE. You should use get_language() to support I18N Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[mailto:django-users@g

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
LocaleMiddleware sets your language to one, provided by your webbrowser. Tty to disable LocaleMiddleware or configure your browser to use different language (http://stackoverflow.com/questions/7769061/how-to-add-custom-accept-languages-to-chrome-for-pseudolocalization-testing) Ilya Kazakevich

RE: Language code issue - Django thinks default is en-us?

2014-06-18 Thread Ilya Kazakevich
Oh, sorry, I forgot it is about manage command. Try to disable USE_I18N (USE_I18N = False) and check if it works. See "django\utils\translation\__ini__.py" in your site-libs for details (class Trans, its getattr and get_language() function) Ilya Kazakevich, JetBrains PyCharm (B

RE: Chat application

2014-06-19 Thread Ilya Kazakevich
Hello, You may use websockets on client and asyncio on serves as it is done here: https://github.com/throwable-one/chat-async/ But websockets require modern client and asyncio require python 3.4 (but asyncio is standard and worth using, anyway) Ilya Kazakevich, JetBrains PyCharm (Best Python

RE: Static Analysis Tool

2014-06-24 Thread Ilya Kazakevich
PyCharm will support DjangoLint inspections soon, I believe: http://youtrack.jetbrains.com/issue/PY-4554 Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@

RE: Multiple projects on one server

2014-07-02 Thread Ilya Kazakevich
Hello, Do you have different versions of python or libs? Use virtual env. Ilya Kazakevich, JetBrains PyCharm (Best Python/Django IDE) http://www.jetbrains.com/pycharm/ "Develop with pleasure!" >-Original Message- >From: django-users@googlegroups.com >[

Re: Using the Eclipse mysite>django>custom command(manage.py$(custom_command)) function

2016-06-25 Thread Ilya Boka
Click add. Enter your command( Ex: "runserver"). Click OK. Double click to run this. On Sat, Jun 25, 2016 at 10:07 PM, Gary Roach wrote: > Hi all: > > OS Debian Stretch > KDE Desktop > > I am using Eclipse Neon with the PyDev plugin for developing a django > application. At present I am running t

Re: Using the Eclipse mysite>django>custom command(manage.py$(custom_command)) function

2016-06-26 Thread Ilya Boka
onitor command line? > > Gary R. > > > On 06/25/2016 01:55 PM, Ilya Boka wrote: >> >> Click add. Enter your command( Ex: "runserver"). Click OK. Double >> click to run this. >> >> On Sat, Jun 25, 2016 at 10:07 PM, Gary Roach >> wrote: >&g

EmailValidator and ipv4 or ipv6 address

2016-10-07 Thread Ilya Deynega
tion fails: EmailValidator().validate_domain_part('8.8.8.8') is False. is it an error in validator or am I missing something? Source code: https://docs.djangoproject.com/en/1.9/_modules/django/core/validators/ Best regards, Ilya Deynega. -- You received this message because you are subscribed

EmailValidator and ipv4 or ipv6 address

2016-10-08 Thread Ilya Deynega
Thanks for your reply, now it's clear that I've misunderstood the format of an email with ip address instead of domain. -- 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 ema

"django.db.models.query.QuerySet" vs "django.db.models.QuerySet"

2015-09-29 Thread Ilya Kazakevich
In Django 1.6 it QuerySet was in package "django.db.models.query.QuerySet". But since 1.7 it also may be imported with "django.db.models.QuerySet". Is "django.db.models.query.QuerySet" deprecated since 1.7? What is the "official" way to import QuerySet? I can't find any documentation regard thi

Sending json data to postgres once received from API

2020-02-13 Thread Ilya Rustamov
Hey Devs, First time poster here, if I am missing anything or am not following general rules and practices feel free to let me know. I am in the process of building an app that asks user for a url and on submit makes post request to said url, receives json data and simply prints it in a new

Re: Sending json data to postgres once received from API

2020-02-13 Thread Ilya Rustamov
Thank you Jody, I will take a look at this and see how it goes. On Thursday, February 13, 2020 at 3:27:03 PM UTC-5, Jody Fitzpatrick wrote: > > Hello Ilya > > I would read the following: > > https://docs.djangoproject.com/en/3.0/topics/db/models/ > > Essentially, what you