Re: django context data into javascript

2020-02-25 Thread 'Artem Vasin' via Django users
.js files, even if linked in Django templates are not processed by template engine. To output value from context to file, this file should be an output from template engine. You have three ways to solve your problem: Make your myjs.js file generated by template processor. It’s most difficult and

Re: Request to disallow using django name in third party django packages name

2020-02-20 Thread 'Artem Vasin' via Django users
Hi! Tl;dr no I don’t think so, actually it’s very useful. IMHO, you are barking at the wrong tree. As I see it, and I think many would agree with me, using third-party libraries instead of implementing your own, are the way to go in Django and Python and open-source community in general. It gi

Re: How express SQL query using Django ORM?

2018-10-17 Thread Artem Malyshev
;category_id", "example_price"."from_date", "example_price"."cost", "example_price"."period" HAVING "example_price"."from_date" = (MAX("example_price"."from_date")) I

How express SQL query using Django ORM?

2018-10-14 Thread Artem Malyshev
HAVING "from_date" = MAX("from_date") ) GROUP BY "category_id" How I can express it with Django ORM? Regards, Artem. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s

'Question' object has no attribute 'choice_text'

2017-12-24 Thread Artem Tantsura
I've made anything by site tutorial, just repeat all steps and code. And when I wrote this: >>> from polls.models import Question, Choice # Make sure our __str__() addition worked.>>> Question.objects.all()]> # Django provides a rich database lookup API that's entirely driven by# keyword argum

Django runserver not working after installing redis for django channels

2017-09-11 Thread Artem Malyshev
Hi, Please check your redis installation. It should be at least minimum required version by redis-py. Regards, Artem. -- 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 i

Re: Channels vs Django-websocket-redis

2017-08-05 Thread Artem Malyshev
Hi, I look at django-websockets-redis really quickly. If you decide to use Redis ASGI layer it may look familiar. Main differences I notice so far: - ws4redis doesn't have concept of consumers and routing - it's coupled to the subset of WebSocket usage - it's propagate redis to the library api

Channels vs Django-websocket-redis

2017-08-05 Thread Artem Malyshev
Hi, thanks for feedback! I need some time to dig into django-websocket-redis. I'll come back to you soon. Regards, Artem. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Django Rest Framework Output as list of lists

2016-12-08 Thread Artem Bernatskyy
Hello, How can i change this output {"navs":[{"date":148098240,"price":86.57},{"date":148089600,"price":86.78},{"date":148063680,"price":87.29},{"date":148055040,"price":87.52},{"date":148046400,"price":87.19},{"date":148037760,"price":87.28},{"date":148029120,"price"

rewrite PostgreSQL query to Django ORM

2016-11-29 Thread Artem Bernatskyy
Hello, how to rewrite this PostgreSQL query to Django ORM with no raw SQL ? select * from finance_fund order by((select price from finance_nav where date='2016-11-08' and fund_id=finance_fund.id)/(select price from finance_nav where date='2016-11-07' and fund_id=finance_fund.id)) LIMIT 30; So

Re: Filtering in ListView

2016-11-26 Thread Artem Bernatskyy
If anyone is interested how i accomplished this without django-filter http://pastebin.com/6NLuM3eQ -- 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

ORM PostgreSQL stuff

2016-11-26 Thread Artem Bernatskyy
Hello Is it possible to do in ORM or in PostgreSQL Assume we have a table with date and price # class Item(models.Model): #price = models.DecimalField() #date = models.DateField() We need for every item in table find division of two prices by two dates and then order_by that result of

Re: Filtering in ListView

2016-11-25 Thread Artem Bernatskyy
Wow, tried it and it is working like a charm ! -- 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,

Filtering in ListView

2016-11-24 Thread Artem Bernatskyy
Hello, how can i accomplish filtering in ListView via GET ? Now i am trying it with ListView and FormMixin... To keep long story short: - we are visiting page and filling form (which are generating from forms.py) - than we are sending it via GET to the same page - and somehow we need to validate

Re: Bug ? | Django 1.9.11 | ManyToManyField with help_text

2016-11-11 Thread Artem Bernatskyy
Thanks On Friday, November 11, 2016 at 4:05:32 PM UTC+2, Artem Bernatskyy wrote: > > If i add ManyToManyField through intermediary table with "help text" and > run makemigrations > there will be created 'dummy migration' which doesn't have any sense > and

Bug ? | Django 1.9.11 | ManyToManyField with help_text

2016-11-11 Thread Artem Bernatskyy
If i add ManyToManyField through intermediary table with "help text" and run makemigrations there will be created 'dummy migration' which doesn't have any sense and when i call lt repeatingly for example './manage,py makemigrations && ./manage,py migrate' './manage,py makemigrations && ./manage

Re: Class Based Views VS DRY principle

2016-11-04 Thread Artem Bernatskyy
TNX On Friday, November 4, 2016 at 5:56:56 PM UTC+2, Artem Bernatskyy wrote: > > Hello. > > Suppose i have a code (http://pastebin.com/6rUqKD8q) > > And in CBV there are a bunch of methods with EXACTLY the same code. > > My question is - can i somehow inherit them from O

Class Based Views VS DRY principle

2016-11-04 Thread Artem Bernatskyy
Hello. Suppose i have a code (http://pastebin.com/6rUqKD8q) And in CBV there are a bunch of methods with EXACTLY the same code. My question is - can i somehow inherit them from ONE place, in order to be able to edit them from one place ? Thanks for replies. -- You received this message becau

Re: Bootstrap and Django together at last!

2013-06-01 Thread Artem Zinoviev
https://github.com/nigma/django-modern-template https://bitbucket.org/danjac/django-bootstrap-template https://github.com/estebistec/django-twitter-bootstrap https://github.com/rbrady/django-bootstrapped and all templates include bootstrap and other things: https://www.djangopackages.com/grids/g/p

Re: Bootstrap and Django together at last!

2013-06-01 Thread Artem Zinoviev
did you think about add requirements and README file in project? среда, 29 мая 2013 г., 0:44:58 UTC+3 пользователь Kevin написал: > > Hello everyone! > > I thought I'd provide a recently released Django app I built. I have > listed it on several Django communities including my blog, but I feel

Re: Django & Ember

2013-06-01 Thread Artem Zinoviev
It`s whery simple. https://github.com/noirbizarre/django-ember. суббота, 1 июня 2013 г., 8:34:01 UTC+3 пользователь JJ Zolper написал: > > Hello, > > So I'm thinking about bundling together Django and Ember. The reason is my > front end is going to be lots of data in realtime. Think like overlayi

Re: django , python and ides

2013-06-01 Thread Artem Zinoviev
vim is the best IDE for python/django. Second place i think is for sublime. пятница, 31 мая 2013 г., 13:54:42 UTC+3 пользователь tony gair написал: > > Python and Django are not my first languages and currently I am using it > like I would a compiled language inside gedit on debian wheezy. I was

Re: linux or windows

2013-06-01 Thread Artem Zinoviev
Django is a python. And nothing more... if you want be a python developer linux is must have. Of course you can develop in windows and play with you code some times... But a lot of python package don`t work in windows. if you want meet new problem every day - windows is your choice :) пятница,

Re: (error) tutorial 2: local admin page not working

2013-06-01 Thread Artem Zinoviev
Ok. so you have settings of your database... But did you do something for enabling admin ? (my answer is Nope.) See your urls.py file (there is a comment line - read it closely.) Then go to settings.py file and find INSTALLED_APPS dict(in comments here you can read all.) Only after it you nee

Re: save data using checkbox click an input

2013-06-01 Thread Artem Zinoviev
How you send your form? Checkbox don`t send your form... Why you duplicate logic in views and template? ( for type in typeList: if not type.parent_type_id: *** && {% for type in typeList%} {% if type.parent_type_id == None %} ). *** P.S. All this code is incorrect

Re: how to import excel file into django models?

2013-06-01 Thread Artem Zinoviev
Django models - it`s ORM to database, and exel is not database it`s only zipped xml file. You can convert your .xslt to .csv format and export it in db. суббота, 1 июня 2013 г., 12:21:33 UTC+3 пользователь Ali hallaji написал: > > > -- You received this message because you are subscribed to t

Re: no module name.models

2013-05-19 Thread Artem Zinoviev
try: from ecomstore import Category, Product this also can help http://stackoverflow.com/questions/6508545/importerror-no-module-named-models суббота, 18 мая 2013 г., 22:40:46 UTC+3 пользователь Kakar написал: > > I'm practicing from a book Begining django e-commerce and m stuck in one > p

Re: OperationalError: (1040, 'Too many connections')

2013-05-18 Thread Artem Zinoviev
ok at the > file, I see no duplicates. > > I am open to suggestions on converting. > > Thanks > > On Saturday, May 18, 2013 12:51:28 PM UTC-4, Artem Zinoviev wrote: >> >> use postgreSQL >> >> пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco нап

Re: Django in the Mac App Store with BitNami

2013-05-18 Thread Artem Zinoviev
sorry, but why you use apache? one-click deployment in local computer? or in heroku? Can i use createproject from template? why You don`t like old way by - mkvirtualenv spam && pip install django && django-admin.py startproject ?? Djang

Re: how to create google app for login in django project?

2013-05-18 Thread Artem Zinoviev
Hi Avnesh, you need google API consolefor creating app. docs . After you get your secret key use django-social-auth, or if you need login user only -use loginza пят

Re: Wrong formatting while using Tabular Inlines in Django admin

2013-05-18 Thread Artem Zinoviev
this can help? - http://www.codingnot.es/bootstrap-your-django-admin-in-3-minutes/ суббота, 18 мая 2013 г., 3:34:38 UTC+3 пользователь Nikos Delibaltadakis написал: > > I use Django 1.5.1 out of the box in a virtual environment in my Mac. I > just created an app with two models, so the one can

Re: Wrong formatting while using Tabular Inlines in Django admin

2013-05-18 Thread Artem Zinoviev
you see this in safari only or chrome do it exactly? суббота, 18 мая 2013 г., 3:34:38 UTC+3 пользователь Nikos Delibaltadakis написал: > > I use Django 1.5.1 out of the box in a virtual environment in my Mac. I > just created an app with two models, so the one can be used as inline in > the for

Re: OperationalError: (1040, 'Too many connections')

2013-05-18 Thread Artem Zinoviev
use postgreSQL пятница, 17 мая 2013 г., 21:24:10 UTC+3 пользователь frocco написал: > > Hello, > > How can I resolve this in django 1.5? > > webfaction allows max 90 connections. > > Thanks > -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: new to Django and building web applications. Advice with postgresql

2013-05-18 Thread Artem Zinoviev
this is the best way - https://django.2scoops.org/, and you can use something like this django template project for your task -h ttps://github.com/nigma/django-modern-template, it have memcached integrated AWS S3 for static files and so on... пят

Re: new to Django and building web applications. Advice with postgresql

2013-05-18 Thread Artem Zinoviev
you want learn django or postgres ? :-) postgres is cool stuff but it not requited... try this course - https://www.udemy.com/coding-for-entrepreneurs/, (in reddit you can find only 1$

Re: Trees in Django

2013-05-18 Thread Artem Zinoviev
first parameter of render() function must be request... try do it like this: * return render(request, "tree.html", {'annotated_list':annotated_list}) * пятница, 17 мая 2013 г., 17:28:12 UTC+3 пользователь Cody Scott написал: > > I am categorizing models in a tree. The tree is created based on a

Re: Template Inheritance doubt

2013-05-18 Thread Artem Zinoviev
if you have base.html and sidebar.html, base.html file just declare {% block sidebar %} section and sidebar.html make implementation of it, if you have SidebarView, then you load sidebar.html and this file take all from {% extends base.html %}. And if you try load base.html from SidebarView - yo

Re: Noob: How do I get this app to work :(

2013-05-18 Thread Artem Zinoviev
try use something like this - https://github.com/jtuz/django-events-calendar четверг, 16 мая 2013 г., 23:58:52 UTC+3 пользователь Todd Wickizer написал: > > Hello there, > > I just install Django yesterday. I am trying to take a calendar app and > edit it for my own means. Unfortunately I am a li

Re: Noob: How do I get this app to work :(

2013-05-18 Thread Artem Zinoviev
hi Todd, you try using generic views and you can`t :-) read this article - https://docs.djangoproject.com/en/1.5/topics/class-based-views/, it can help you. best regards, пятница, 17 мая 2013 г., 20:08:31 UTC+3 пользователь Todd Wickizer написал: > > Thanks Tom. I tried copying and pasting the

Re: Admin theme started reverting to default

2011-03-24 Thread Artem
; I went through and deleted all the pyc files and still seeing default > admin. > > On Mar 24, 10:11šam, Artem wrote: > > > > > I had something similar with several test projects running on my > > machine. > > The problem was - auto-generated .pyc files in djang

Re: High-level template and template tag organization

2011-03-24 Thread Artem
something like? {% if request.user.is_staff %} {% include 'smth.html' %} {% else %} {% include 'smth2.html' %} {% endif %} On 24 мар, 00:23, Mazery Smith wrote: > Hello, > I have a results.html page and mylibrary.html page on my site that > both display search information in a results box (bro

Re: Admin theme started reverting to default

2011-03-24 Thread Artem
I had something similar with several test projects running on my machine. The problem was - auto-generated .pyc files in django sources.. one project user precompiled\precached files from another.. I guess I mistakenly ran dev-servers with root account, so python could put .pyc files into that fold

Re: images in a template

2011-03-19 Thread Artem
Почемуб тебе сначала не разобратся как и что работает, и не задавать глупых вопросов, за тебя всеравно все не сделают. Почитай (вдумчиво) книжки и туторы по джанге, например мне сам больше помогла разобратся "Beginning Django E-Commerce [Jim McGaw] (2009)" -- You received this message because you

Re: What is it with Django and 2008?

2011-03-11 Thread Artem
I guess it's because of Django v1.0 release - people started to consider it like stable production-safe framework. So most of Django books came out after that, though most of them have few revisions to be up to date, but in searches first revision usually most noticeable. -- You received this mes

Re: File sharing service on Django?

2010-07-28 Thread Artem
nt-Disposition'] = 'attachment; filename=archive.rar' return response and it works fine on my desktop, but I don't know how it will go on server with large files. On 28 июл, 17:51, Christoph wrote: > Hi Artem, > > I don't know about it specifically but I hav

File sharing service on Django?

2010-07-27 Thread Artem
Is there any painless way to make Django able to serve files with one- time urls, like in RapidShare? First thought - use django.views.static.serve with some tweeks. But is there a way to track status of download (dropped\complited)? Thanks -- You received this message because you are subscribed

Re: Ajax with JSON-RPC -- new Django handler

2009-06-04 Thread Artem Egorkine
c or private. You will now need to look up all references to it and rename those calls as well... - Artem --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: forms/widgets media: position of 'class' directive

2009-01-12 Thread Artem Skvira
You are right - I have just omited "," in js = ('prototype.js', ) Thanks! On Jan 12, 2:04 am, "Ramiro Morales" wrote: > On Sun, Jan 11, 2009 at 10:33 AM, Artem Skvira wrote: > > > Hi all, > > > I've stumbled upon strange behaviour in dja

forms/widgets media: position of 'class' directive

2009-01-11 Thread Artem Skvira
Hi all, I've stumbled upon strange behaviour in django: when declaring form/ widget with class Media, ie.: class AddressForm(ModelForm): streetNo = forms.CharField() ... class Meta: ... class Media: js = ('prototype.js', ) I get tons of javascript inclusions re

Re: Permissions: is something wrong with them?

2009-01-06 Thread Artem Skvira
On Jan 6, 10:05 pm, "Russell Keith-Magee" wrote: > On Tue, Jan 6, 2009 at 4:26 AM, Artem Skvira wrote: > > On Jan 2, 6:26 pm, Artem Skvira wrote: > >> Would anyone be able to comment on the issues raised? > > Can I get Russell's comment on that? > > I&#

Re: Permissions: is something wrong with them?

2009-01-05 Thread Artem Skvira
Can I get Russell's comment on that? On Jan 2, 6:26 pm, Artem Skvira wrote: > Well, > > it's not the usage I'm not clear on but rather architecture. > Would anyone be able to comment on the issues raised? > > Thanks > > On Jan 2, 2:20 pm, Jeff Anderson

Re: Permissions: is something wrong with them?

2009-01-01 Thread Artem Skvira
Well, it's not the usage I'm not clear on but rather architecture. Would anyone be able to comment on the issues raised? Thanks On Jan 2, 2:20 pm, Jeff Anderson wrote: > Artem Skvira wrote: > > Is it worth asking this question is dev group? > > No. Your usage questi

Re: Permissions: is something wrong with them?

2009-01-01 Thread Artem Skvira
Is it worth asking this question is dev group? On Dec 31 2008, 1:56 am, Artem Skvira wrote: > Hi all, > > I have some issues with djangopermissionsmodel. Please bear in mind > that I have just started learning django so feel free to correct me if > I'm wrong :) > > F

Re: Permissions: is something wrong with them?

2009-01-01 Thread Artem Skvira
Is it worth asking this question is dev group? On Dec 31 2008, 1:56 am, Artem Skvira wrote: > Hi all, > > I have some issues with djangopermissionsmodel. Please bear in mind > that I have just started learning django so feel free to correct me if > I'm wrong :) > > F

Permissions: is something wrong with them?

2008-12-30 Thread Artem Skvira
Hi all, I have some issues with django permissions model. Please bear in mind that I have just started learning django so feel free to correct me if I'm wrong :) First of all it was hard to find how one can add a custom permission to list of permissions of a model instance. I ended up with a cod