Possible bug in Media class.

2019-10-08 Thread Roman Telezhynskyi
Hello, Today for my project I tried to find a solution for an issue with duplicate assets. Combining several approaches I managed to build an app to solve it. While debugging the app, I think, I found a bug in Media class. File *django/forms/widgets.py* @html_safe class Media: def

SocialAuth through Odnoklassniki: does not register new user

2019-03-03 Thread Roman Izutov
Hi mates, I read through the man , created an odnoklassniki app, received these things to email: Application ID NNN Публичный ключ приложения Секретный ключ приложения Ссылка на приложение https://ok.ru/game/

Improve for check "save() prohibited to prevent data loss due to unsaved related object"

2018-11-02 Thread Roman
and Order must take leading part in pairs. There are cases where i want keep "orphan" measurements. And looks like this is valid case as soon as save() will start respect field settings. Thank you in advice, Roman -- You received this message because you are subscribed to the Google G

Re: django autocomplete light

2017-09-17 Thread Roman Akopov
Hi, you probably need to filter results based on the value of other fields in the form http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#filtering-results-based-on-the-value-of-other-fields-in-the-form On Saturday, September 16, 2017 at 3:24:48 PM UTC+4, Ahmet Muazim Tunç

Talos - alternative authentication, authorization and accounting application

2017-09-15 Thread Roman Akopov
, but in general. Maybe something can be done in more djangonic, more pythonic way. Maybe there is some widely used scenario I missed. I want this application to be as good as it can be. Roman P. S. I am no native speaker. If something is written in bad/ambiguous English, I will be glad to correct that too

Re: Dynamic model, reverse foreign key not working

2017-09-05 Thread Roman Akopov
I have investigated a bit more and looks lite it is Options._relation_tree property, it's value is calculated by _populate_directed_relation_graph only once and it is @cached_property, so I see no valid way to reset value On Tuesday, September 5, 2017 at 4:40:02 PM UTC+4, Michal Petrucha wrote:

Re: Dynamic model, reverse foreign key not working

2017-09-05 Thread Roman Akopov
I call it on target model, the one with reverse relation missing. On Tuesday, September 5, 2017 at 4:40:02 PM UTC+4, Michal Petrucha wrote: > > On Tue, Sep 05, 2017 at 04:56:10AM -0700, Roman Akopov wrote: > > Unfortulately, it did not help. I have added > "model

Re: Dynamic model, reverse foreign key not working

2017-09-05 Thread Roman Akopov
On Tuesday, September 5, 2017 at 3:38:17 PM UTC+4, Michal Petrucha wrote: > > On Tue, Sep 05, 2017 at 03:47:37AM -0700, Roman Akopov wrote: > > So the deal is that each model's _meta caches a bunch of structures > storing the list of fields, reverse relations, and so on, the fi

Dynamic model, reverse foreign key not working

2017-09-05 Thread Roman Akopov
exactly I am doing wrong. I am trying to use reverse relation from custom view and admin, so everything should be pretty much initialized already. Roman -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

django behind squid

2016-12-26 Thread Roman
Hi, please, I have problem with DJANGO behind reverse proxy SQUID... Squid is set so that after recieve request it redirect me to another local port. This redirect works. From DJANGO I recieve ERROR 404 with this: Request Method: GET Request URL:

How to protect a REST API view with token authentication using django-rest-framework-social-oauth2?

2015-06-27 Thread Roman Onosovski
Thats about the most appropriate way to do it, just make sure its over https. -- 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

Re: [GSOC] Django-based project for the neuroinformatics community: neurostars.org

2015-02-22 Thread Roman Valls Guimerà
and therefore we need a talented student that can take care of the new challenges: http://x90.es/biostar2015 Anyone is up for the task? If you know someone willing to work on this summer project involving django, bittorrent and ansible, please, let me know! Best regards, Roman Den torsdag 20 mars 2014

Revisiting the case-sensitive login for the default user manager

2014-12-19 Thread Roman Onosovski
Hello fellow Djangoers, I am new to the framework and just recently built a site using it. However I was not aware of the username hurdle until just recently. I did some research and found that I can make my own user manager and etc. Now this is probably a bit of a hack, but tell me what you

Re: django user authenication form in modal form twitter bootstrap

2014-06-27 Thread Roman Klesel
I think the view function is wrong. This should do: from django.views.decorators.csrf import csrf_protect from django.shortcuts impor render @csrf_protect def login(request): return render(request, 'login.html') 2014-06-27 6:03 GMT+02:00 sarfaraz ahmed : > Hello >

Re: Unable to add CSRF token to the header

2014-06-26 Thread Roman Klesel
Hello, I'm not quite sure what you are trying to do, but with type: "GET" there is no need to worry about crfs_token. >From the link you posted: """ function csrfSafeMethod(method) { // these HTTP methods do not require CSRF protection return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));

Re: one form, many submits

2014-06-26 Thread Roman Klesel
>From your code: """ if request.method=='GET': if request.POST.get('accept'): bid = QuotedItem.objects.get(id=2) return render(request, 'bills/p_bill.html', {'bid' : bid}) """ if the method is "GET", you will never have any POST parameters. If you want POST

Re: testing equality in template tag

2014-06-26 Thread Roman Klesel
Ugh , sorry of course we know ... forget what i said ... 2014-06-26 9:48 GMT+02:00 Roman Klesel <roman.kle...@gmail.com>: > hard to tell since we do not know what values default_month and month.0 have > ... > try to print in the view and examine: > print type(month[0

Re: testing equality in template tag

2014-06-26 Thread Roman Klesel
hard to tell since we do not know what values default_month and month.0 have ... try to print in the view and examine: print type(month[0]), month[0], type(today.month), today.month 2014-06-25 20:34 GMT+02:00 Lee Hinde : > with view code like so: > > import calendar >

Re: Handling checkbox inputs

2014-06-26 Thread Roman Klesel
Hello, the {{j.i}} can not work as you expect. If i understand you correctly you would like to do something like getattr(list, i) in the template. In order to do this you have 2 possibilities: 1) Write a custom template tag like this

Re: How do I Iterate database object querysets

2014-06-24 Thread Roman Klesel
live in the form. https://docs.djangoproject.com/en/dev/topics/forms/ If the structure of the post data matches the structure of the database model closely, then a model form would be the easiest way. Regards Roman 2014-06-24 21:33 GMT+02:00 G Z <zuk...@gmail.com>: >

Re: [GSOC] Django-based project for the neuroinformatics community: neurostars.org

2014-03-21 Thread Roman Valls Guimerà
No, this is based on biostars.org from Istvan Albert: https://github.com/ialbert/biostar-central/ Den torsdagen den 20:e mars 2014 kl. 11:16:25 UTC+1 skrev Roman Valls Guimerà: > > Hello Django users, > > From django-developers mailing list I have been told that list is more

[GSOC] Django-based project for the neuroinformatics community: neurostars.org

2014-03-20 Thread Roman Valls Guimerà
;: http://www.google-melange.com/gsoc/homepage/google/gsoc2014 Time is really running out, tomorrow 21st at 13h google with close student applications. Feel free to contact me if you need more details! Best regards, Roman -- You received this message because you are subscribed to the Google

Re: Multiple SQLITE databases vs one BIG PostgreSQL database

2013-08-24 Thread Roman R
This applies to situations when lots of write requests are being made, right? Otherwise, SQLite can handle lots of concurrent connections. On Wednesday, May 4, 2011 7:40:18 AM UTC-5, bmbouter wrote: > > SQlite has issues with efficiently serving multiple database connections > simultaneously.

Re: Form validation vs. DRY

2013-07-03 Thread Roman Klesel
2013/7/3 Tomas Ehrlich : > you can use model validation > https://docs.djangoproject.com/en/dev/ref/models/instances/#validating-objects This sounds very good! :-) Thanks! -- You received this message because you are subscribed to the Google Groups "Django users"

Form validation vs. DRY

2013-07-03 Thread Roman Klesel
s there a good way to avoid this duplicate logic? Regards Roman -- 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.

Re: deprecation of DotExpandedDict announced?

2012-12-17 Thread Roman Klesel
2012/12/17 donarb > > > https://github.com/django/django/commit/c57abd3c29cedcca00821d2a0d5708f10977f3c6 > > ahh the commit, thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

deprecation of DotExpandedDict announced?

2012-12-17 Thread roman
Hello everyone, just trying 1.5 beta ... django.utils.datastructures.DotExpandedDict seems to be no longer there. Can't find where this has been announced. Did I miss something? Regards Roman -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: Custom option for Model Meta Options

2012-03-27 Thread Roman Klesel
to my Model class. However I droped the whole composite forreign key idea in favor of another solution. So: Problem solved! Thanks! Roman -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Custom option for Model Meta Options

2012-03-26 Thread Roman Klesel
d be quite easy to accomplish this by paching the django source. However I'd prefere to do this by subclassing. How to do this? Best regards Roman Klesel -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Optimization of a Large QuerySet iteration

2011-07-27 Thread Roman Klesel
things very efficiently. Regards Roman -- 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 to django-users+unsubscr...@googlegroups

Re: Optimization of a Large QuerySet iteration

2011-07-26 Thread Roman Klesel
tions etc. Some of the aggregation features are available through the django orm. But that's a design decision that may depend on various factors. If the db-host is powerful enough however it may speed up things quite a bit. Regards Roman -- You received this message because you are subscribe

Re: __unicode__() addition not working in basic poll application.

2011-05-17 Thread Roman Klesel
hmm... strange... the __unicode__ thing is nothing django-specific. It works in plain python as well: It's supposed to work like this: >>> class TestClass(object): ... def __unicode__(self): ... return "unicode" ... def __repr__(self): ... return "buh" ... def

Memcached backend - caching data with infinite timeout

2011-05-17 Thread Paweł Roman
Python-memcached docstring for set() says this: """ @param time: Tells memcached the time which this value should expire, either as a delta number of seconds, or an absolute unix time-since-the-epoch value. See the memcached protocol docs section "Storage Commands" for more info on . We default

Re: __unicode__() addition not working in basic poll application.

2011-05-17 Thread Roman Klesel
2011/5/16 maaz muqri <mmu...@mshahtech.com>: > I am getting this > >>>>Poll.objects.all() > [] What do you get when you do: print unicode(Poll.objects.all()[0]) ? Regards Roman -- You received this message because you are subscribed to the Google Groups &q

Re: Can django admin log be trusted?

2011-05-10 Thread Paweł Roman
You're right, I've just checked it and there's a gap for 100+ ids, so he must be right. But does that mean that the django admin log is broken and cant be trusted? How come there isnt any trace of adding those items? On May 10, 11:28 pm, Shawn Milochik wrote: > For what it's

Can django admin log be trusted?

2011-05-10 Thread Paweł Roman
This is serious. A customer I've been working for, claims that he had been adding data via django admin panel (100+ or so records, and one record is really big, using many 'inlines' each with its own formset etc. so adding 100 such records is quite an effort) and at some point of time, large part

Re: referencing fields on the model without F()

2011-04-13 Thread Roman Klesel
.filter(rack__he__isnull=False)\ .extra(where=['`hardware`.`he`=`hardware__rack`.`he`']) Seems to work. Regards Roman -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

referencing fields on the model without F()

2011-04-13 Thread Roman Klesel
? Regards Roman -- 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 to django-users+unsubscr...@googlegroups.com. For more opti

Re: confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
2011/2/18 Roman Klesel <roman.kle...@googlemail.com>: >> I would use pre_save signal for data modification did not really work. In any case I need to use to_python so that the ModelForm displays the right value, and then I'm in *BEEP*, since to_python not only receives the values

Re: confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
Hello Piotr, 2011/2/18 Piotr Zalewa <zal...@gmail.com>: > > I would use pre_save signal for data modification > hmm ... this sounds like a good idea. It would make the whole thing a lot more compact ... I'll give it a try. Thank's! Roman -- You received this mess

confused about ModelForm Field validation

2011-02-18 Thread Roman Klesel
be an easier one. Or a more stable one? There are quite some fields where I have to do such conversions. I'm really trying to find a clean solution which is not just tricking the framework. Looking forward to you comments... Regards Roman -- You received this message because you are subscribed t

Django + GWT

2011-02-12 Thread Roman
Is there a relatively painless way to integrate Django server side and GWT front-end? I'm new to Django (one simple project a year ago) and I've some experience with GWT. Anyone done it before and has a few tips where to start? -- You received this message because you are subscribed to the

Re: models.CharField.null=True ignored

2011-02-10 Thread Roman Klesel
2011/2/10 : ... Thanks for the kind words. Your comments are very welcome! -- 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

Re: models.CharField.null=True ignored

2011-02-10 Thread Roman Klesel
2011/2/10 : '' == None > False yes, makes sense ... I was thinking of things like: if '': if []: ... which probably lead me to a wrong conclusion. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: models.CharField.null=True ignored

2011-02-10 Thread Roman Klesel
ing, not NULL. """ You are right... that's how it's meant to be ... > Rather than patch Django, you could subclass CharField to do the conversion, Yes of course. If the behavior as is, is what is wanted, that's my way to go. I'm just wondering if this is really so... but it looks like it...

models.CharField.null=True ignored

2011-02-10 Thread Roman Klesel
alue): +if self.null and not value: +return None return self.to_python(value) def formfield(self, **kwargs): Bug or feature? Regards Roman -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to thi

Re: Get request object in class based generic view and form

2011-02-05 Thread roman
ded in the docs, by decorating the the dispatch() method: http://docs.djangoproject.com/en/dev/topics/class-based-views/#decorating-class-based-views Isn't that sufficient? Regards Roman -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Error when subclassing models.ForeignKey field

2011-01-28 Thread roman
On 26 Jan., 18:33, Roman Klesel <roman.kle...@googlemail.com> wrote: > Should I open a bug report? That's what I just did: http://code.djangoproject.com/ticket/15184 -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Error when subclassing models.ForeignKey field

2011-01-26 Thread Roman Klesel
Hello again, since no one responded untill now, I'd like to bring this back to attention. If no one knows an answer to my question, maybe some one could give me some hint what I could do? Should I open a bug report? Thanks in advance! Roman -- You received this message because you

Error when subclassing models.ForeignKey field

2011-01-25 Thread Roman Klesel
L:http://localhost:8000/path/id/ Django Version: 1.3 beta 1 SVN-15308 Exception Type: KeyError Exception Value: 'ip' Exception Location: /path-to_djanog/django/db/models/fields/subclassing.py in __get__, line 96 and further down: /home/roman/devel/django-trunk

I have an idea for a new tag

2010-11-19 Thread Paweł Roman
When rendering dictionary, there is absolutely no way to display values sorted by keys. The only workaround is to copy all the dict items to a sortable structure e.g. list and pass the list to the template, instead of the dictionary. Why not introduce a new tag to solve this problem: I say, it

Re: Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
Correct me if I'm wrong but this is hundred times more useful than current in_bulk() implementation. On Oct 6, 5:31 pm, Paweł Roman <romapa...@googlemail.com> wrote: > OK, I've got it. It's in_bulk() :) Nevermind the question. > > On Oct 6, 5:27 pm, Paweł Roman <romapa...@googlemail.c

Re: Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
OK, I've got it. It's in_bulk() :) Nevermind the question. On Oct 6, 5:27 pm, Paweł Roman <romapa...@googlemail.com> wrote: > I have a model which has a tree-like structure (not exactly a FK on > self but we can assume that's the case). > > I want to visualise this tree usin

Iterating tree-like data structures with django

2010-10-06 Thread Paweł Roman
I have a model which has a tree-like structure (not exactly a FK on self but we can assume that's the case). I want to visualise this tree using all records from the db. It seems impossible to do with QuerySet, if I have say 100 records (100 nodes in the tree) and I try building the tree

Re: bug in defaulttags.py ?

2010-04-21 Thread Paweł Roman
> 1.2 does not exist yet so I'm not sure what you mean when you say you > checked there. Current SVN is certainly different from 1.0 and 1.1 in this > area, see changeset 12654: > > http://code.djangoproject.com/changeset/12654 > > Does that change fix the problem you are referring to here? Yup.

bug in defaulttags.py ?

2010-04-21 Thread Paweł Roman
Hi I think I've found a bug in django.template.defaulttags.py get_nodes_by_type() is not implemented for IfEqualNode class. It seems like it should be implemented the same way as in IfNode. Check out this simple test: def test_get_nodes_by_type(self): template_string1 = "{%ifequal

Non-conventional use of django templates.

2010-04-16 Thread Paweł Roman
I'm writing an application which is kind of event handling app, and the important functionality is sending emails. User can create his own email template, and when an event occurs the email is built using this template and sent. An event is nothing but a python dictionary with some values. As you

Re: Running django on IIS

2010-04-14 Thread Paweł Roman
> I suspect it is trying to import Http but can't. > > Fire up python (Start -> Python Interactive Shell, or Start -> Run -> > cmd -> type python), and type: > > import Http > If that doesn't work, you haven't installed it properly. See the > following quote from the Django wiki: > > "•Go to

Running django on IIS

2010-04-14 Thread Paweł Roman
I'm trying to run django on IIS and SQL Server 2005. I've found this nice page with all instructions: http://code.djangoproject.com/wiki/DjangoOnWindowsWithIISAndSQLServer I followed all the instructions, installed PyISAPIe, created virtual directory, mapped the .py extension to the

Re: Why is django returning only naive datetimes?

2010-04-09 Thread Paweł Roman
> This reminds me that we need to open-source our time zone code.  We > track entertainment events across several time zones, and Django's > standard time handling can't cleanly deal with that.  Database > backends that store time zones as a UTC offset (e.g., PostgreSQL) > actually cause *more*

Why is django returning only naive datetimes?

2010-04-09 Thread Paweł Roman
I've noticed that django always fetches 'naive' datetimes from the database. Tzinfo property on a datetime object is always set to null, even if the database stores a value WITH a timezone. This is a bit tedious because such datetime cannot be later converted to any timezone. Each time I want to

Formatting datetimes - simple question

2010-04-06 Thread Paweł Roman
Hi all, Django has this DATETIME_FORMAT setting, which allows to format all datetime values, whenever they are displayed. But the problem is this is a _global_ setting, so whoever uses the application would see all the datetimes formatted exactly the same way. I'd like to allow individual users

Re: ANN: Django 1.1 released!

2009-07-29 Thread Roman Vorushin
> Tonight we're extremely proud to announce the release of Django 1.1, > the latest major milestone in Django's development. Nice work, guys! Thank you very much! Roman Vorushin On Jul 29, 10:23 am, James Bennett <ubernost...@gmail.com> wrote: > Tonight we're extremely pr

Re: Default mimetype

2009-04-13 Thread Roman Timushev
Thank you for your answers, I came to the same decision (that url cannot define mimetype), but have not thought about decorators. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Default mimetype

2009-04-11 Thread Roman Timushev
Hello, My application serves content with different mimetypes: 'application/ xhtml+xml', 'application/xml', 'application/json'. Specifying mimetype for every view is not DRY. Is it possible to define default mimetype for url groups? Roman

Formset for user-specific data

2009-01-24 Thread Roman Odaisky
re all operations are within that subset, and that fields not editable by users (the “user” field in my case) are correctly populated for newly created records. How does one do that in Django? -- TIA Roman. smime.p7s Description: S/MIME cryptographic signature

Re: Middleware, exceptions and POST

2009-01-04 Thread Roman Odaisky
raise return django.views.debug.technical_500_response(request, *sys.exc_info()) Hopefully it’s not too dirty a hack? -- TIA Roman. smime.p7s Description: S/MIME cryptographic signature

Middleware, exceptions and POST

2009-01-04 Thread Roman Odaisky
wait until bug #6094 is fixed?), and also whether there’s another approach to handling form submissions with the above benefits and less drawbacks? References: [1] http://docs.djangoproject.com/en/dev/topics/forms/#using-a-form-in-a-view -- TIA Roman. smime.p7s Description: S/MIME cryptographic signature

Re: status of per-object-level permission

2008-09-30 Thread Roman Chyla
I am planning to use it together with django - but not for the django site, as a general permission system for digital documents. Using spiff-guard for the backend, and django as an interface to set up the rules. But I haven't really started putting them together, maybe you have clearer ideas

Re: Tool recommendations

2008-02-05 Thread Roman Zechner
would take a look at Wicket, GWT, Grails (the Django equivalent on the Java side, ships with a GWT plugin) and Django of course :-) But combining GWT and Django? Hm ... Cheers, Roman http://en.wikipedia.org/wiki/List_of_web_application_frameworks http://en.wikipedi

Re: django using AJP with apache2 and mod_jk leads to HTTP 500 errors

2007-12-13 Thread Roman Zechner
another time. But thanks anyway, I didn't know that there's sth newer to `flup`. Cheers, Roman On 13 Dez., 15:27, iGL <[EMAIL PROTECTED]> wrote: > Hi Ramon, > As far as I understood the apache jakarta docs, the problem you > describe might be caused by using sethandlers. > Ther

django using AJP with apache2 and mod_jk leads to HTTP 500 errors

2007-12-13 Thread Roman Zechner
plemented. Looking forward for your answers - you other 2 AJP users out there. Cheers, Roman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: django admin

2007-11-27 Thread Roman Zechner
you're welcome :-) here's the relating django documentation for more http://www.djangoproject.com/documentation/tutorial02/#adding-related-objects -roman 2007/11/27, mike <[EMAIL PROTECTED]>: > > > Roman, That is EXACTLY what I needed, thx alot. > > On Nov 27, 12:45 pm, &q

Re: django admin

2007-11-27 Thread Roman Zechner
the following line: customer = models.ForeignKey(Customer, edit_inline=models.TABULAR, related_name="Customer") there's also the num_in option which determines the number of displayed INLINE customers customer = models.ForeignKey(Customer, edit_inline=models.TABULAR, num_in_admin=2, r

Re: django-admin and manage.py without shell-access

2006-04-05 Thread Roman
Thanks, it looks like a satisfactory decision for the "poor man's hosting" --~--~-~--~~~---~--~~ 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

django-admin and manage.py without shell-access

2006-04-05 Thread Roman
I need to place my django-powered web site on a server which haven't SSH-access (ftp only). Can I execute analogues of "django-admin" and "manage.py" through web interface? Is there something like web-wrapper for these commands?