Re: How to make jQuery sliders based on model IntegerField?

2011-07-27 Thread urukay
Hi, basically, it's not a Django issue. You can display standard integer field in your form, but in your template you will use JQuery Slider to alter it so the field will be displayed as a slider. And when user moves the slider, you will write down the value into the integer field. Radovan http:/

Re: Odp: Re: Django admin - utf8 filename

2011-07-20 Thread urukay
Why not to change filename during the upload? Radovan http://www.yau.sk On 19. Júl, 17:24 h., galgal wrote: > OK I managed to do that - I can upload utf8 files now. > But after uploading it i can't see file form field to change file:/ -- You received this message because you are subscribed to

Re: Model translation

2011-07-08 Thread urukay
Hi Tomas, i'm using transmeta in my project. But in the way you are/want. Just using it to translate some short strings (and longer in FAQ). And there's no problem to add another language inproduction server (see manage.py help for more info) Radovan http://www.yau.sk On 8. Júl, 18:56 h., Tomáš

Re: NoReverseMatch in django production server

2011-07-08 Thread urukay
Hi, try this in obras urls.py: obras urls.py: from django.conf.urls.defaults import * urlpatterns = patterns('obras.views', url(r'^presobra/$', 'pres_obra', name='pres_obra'), ) Radovan http://www.yau.sk On 7. Júl, 22:17 h., mf wrote: > The project is working fine in the dev server but

Re: Display FK List

2011-07-07 Thread urukay
Hi, maybe autocomplete will user frendly solution. Radovan http://www.yau.sk On 7. Júl, 10:39 h., Venkatraman S wrote: > i have 2 models: Items and a Transactions . > > Transactions has a fk to Items. Now, there can be millions of Items, and > when i render Transaction as a modelform, i see tha

Re: forms and form processing

2011-07-01 Thread urukay
typing import django django.VERSION on the python shell > > Jay k > > > > > > > > On Thu, Jun 30, 2011 at 3:36 AM, urukay wrote: > > Hi, > > have you got email settings set in your settings.py? > > What version of Django are you using? > > > Radova

Re: forms and form processing

2011-06-30 Thread urukay
Hi, have you got email settings set in your settings.py? What version of Django are you using? Radovan http://www.yau.sk On 29. Jún, 00:23 h., "jay K." wrote: > Hello, > > I need to add a form on my django website > > so far this is what i have: > > in my models.py: > > import statements no

Re: setlang using AJAX

2011-05-30 Thread urukay
hi, but you have to reload the whole page anyway or you want only part of the page to be translated? There's a way to change language without form. R. On 30. Máj, 13:07 h., Luca Casagrande wrote: > Hello everybody, > I'd like to use an AJAX request without any form to change the > language of m

Re: Django foreign key attribute in the model

2011-05-04 Thread urukay
Hi, try self.submitter.id Radovan On May 4, 10:58 pm, Ján Vorčák wrote: > Hi, > > I'd like to ask you for some help :) > > I have a model with one foreign key > > > from django.contrib.auth.models import User > > > class Task(models.Model): >     ... >     submitter = models.ForeignKe

Re: Odp: Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-04 Thread urukay
. Máj, 15:19 h., Ariel wrote: > And how can I change the filename of the image when it is uploaded ??? > > 2011/5/4 urukay > > > Or try to change the name of the file when uploading the image/file. > > That's how solved it. Had couple problems with it also in developmen

Re: Odp: Re: Problem uploading images and videos with filenames containing not ascii characters

2011-05-03 Thread urukay
Or try to change the name of the file when uploading the image/file. That's how solved it. Had couple problems with it also in development enviroment and now it's working ok. Haven't tested yet in production, but it should work too. Radovan On 3. Máj, 22:56 h., Tomasz Zieliński wrote: > W dniu w

Re: Can give each user a specific folder to upload to using an ImageField?

2011-04-12 Thread urukay
yes, this how you can upload image or whatever file to folder outside MEDIA..it uploads to PRIVATE_ROOT/... This is simple version of Image model in my project: from django.core.files.storage import FileSystemStorage from contrib.models.fields import CustomFileField fs = FileSystemStorage(locati

Re: Sharable permalinks

2011-03-09 Thread urukay
Hi, one way is to do it like google docs when you want to share your doc with other people for viewing only..generate link with unique key e.g. www.whatever.com/page/321fg6h4fgh321fdh654fh654fh/ You store the key in your DB and verify validity of the link. Then you can also restrict access to it,

Re: dependend fields

2011-03-08 Thread urukay
one way is to use Ajax call to get choices for dropdown menu. R. On 8. Mar., 09:42 h., "Szabo, Patrick \(LNG-VIE\)" wrote: > Hi, > > I want to make the choices of a dropdown menu dependend on what is > chosen from another field. > > One field is a normal Textfield and the other one is created by

Re: JavaScript Parameter

2011-03-03 Thread urukay
Hi, what script do you mean, how does it look like? If you are using JQuery, just use JQuery's UI autocomplete to do the same thing. Radovan On 3. Mar., 13:01 h., "Szabo, Patrick \(LNG-VIE\)" wrote: > Hi, > > I finally found a JavaScript that gives me autosuggest functionality for > a textfiel

Re: Admin-enabled glossary

2011-02-24 Thread urukay
Hi, maybe you can try to use autocomplete function with JQuery, but i don't fully understand what you mean. Radovan On 23. Feb, 20:02 h., yuri2k wrote: > Anyone? > > On 23 Fev, 10:14, yuri2k wrote: > > > I need to find a way to use a glossary (sort of > > likehttps://github.com/kcunning/djang

Re: Sitemap generation problem

2011-01-22 Thread urukay
Try something like this: def location(self, obj): return reverse('path.to.your.view.function', args=[category]) and put it into your sitemap.py On 21. Jan, 20:40 h., galago wrote: > I can't find out how to pass corrent location to the sitemap element. > I have declared: > def items(sel

Re: default _ storage path

2011-01-11 Thread urukay
One solution is to create your own storage to upload files outside MEDIA folder. Also you will have to write own views to rwtrieve and display these files. Or you have to configure your server to serve static files in the way you want. Maybe there's better solution, but i did it this way. Radovan

Re: script adding FileField, no attribute chunks

2010-12-15 Thread urukay
Hi, can any one help on this problem? pic_file = os.path.join(settings.MEDIA_ROOT, 'signature \invalid.png') f = open(pic_file, 'r') picture = InMemoryUploadedFile( file=f, field_name='image',

Re: help with model definition

2010-10-27 Thread urukay
well, u can add multiple FK relations to your model e.g.: company = models.ForeignKey(Company, blank=True, null=True) other_model = models.ForeignKey(OtherModel, blank=True, null=True) And then in form you just define clean method which will ensure that one and only one FK relation will be create

Re: Sending emails, threads, progress back to user

2010-07-22 Thread urukay
Hi, well there is solution that can be found by google because i did :-) Take a look here: http://ui.co.id/blog/asynchronous-send_mail-in-django This is how i did sending emails in my project, also sending mass emails. As in example, after calling the 'send_mail' function in your view or whatev

Re: Django Sphinx Foreign key search

2010-06-18 Thread urukay
ps. Sorry for the delay, but i needed to finish adding google maps to my project. Radovan yafeng wu wrote: > > Hi, > > I got the same problem when building my website. Have you solved it? > Please let me know. > > Thanks, > > On Apr 13, 4:04 am, urukay wrote: >&

Re: Django Sphinx Foreign key search

2010-06-18 Thread urukay
ay Sphinx works. Hope it helps. Sorry for the delay, but i needed to finish adding google maps to my project. Radovan On 19. Máj, 17:59 h., yafeng wu wrote: > Hi, > > I got the same problem when building my website. Have you solved it? > Please let me know. > > Thanks, > > O

Re: Django Sphinx Foreign key search

2010-05-22 Thread urukay
els ) you want it to search in. > > http://www.sphinxsearch.com/docs/current.html#ref-indexer > > On May 21, 8:47 am, urukay wrote: >> Well, still trying to solve it...maybe i found the right way to do it, >> but >> it's still in progress. If anything shows up,

Re: hyperlinks within admin interface

2010-05-21 Thread urukay
I did something similar in my project. Here is part of my admin.py class InvoiceAdmin(admin.ModelAdmin): def get_urls(self): urls = super(InvoiceAdmin, self).get_urls() my_urls = patterns('', url(r'^admin/invoice/view/(?P\d+)/$', self.admin_site.a

Re: Django Sphinx Foreign key search

2010-05-21 Thread urukay
my website. Have you solved it? > Please let me know. > > Thanks, > > On Apr 13, 4:04 am, urukay wrote: >> Hi, >> >> I'm trying to create full text search on model, everything goes fine >> when >> searching TextFields but I have a problem wit

Re: Django Sphinx Foreign key search

2010-05-21 Thread urukay
David De La Harpe Golden-3 wrote: > > On 13/04/10 09:04, urukay wrote: >> Hi, >> >> I'm trying to create full text search on model, everything goes fine >> when >> searching TextFields but I have a problem with ForeignKey field. >> >> How can i

Django Sphinx Foreign key search

2010-04-13 Thread urukay
Hi, I'm trying to create full text search on model, everything goes fine when searching TextFields but I have a problem with ForeignKey field. How can i do that? Can anyone point me to the right direction? Thanks Model example: class Model1(models.Model): text_field =models.TextField(max

Django Sphinx Foreign key search

2010-04-12 Thread urukay
Hi, I'm trying to create full text search on model, everything goes fine when searching TextFields but I have a problem with ForeignKey field. How can i do that? Can anyone point me to the right direction? Thanks Model example: class Model1(models.Model): text_field =models.TextField(ma

Ignore duplicty in compilemessages

2009-10-20 Thread urukay
Hi folks, is there a way how use compilemessages with ignoring duplicity translations? In my native language it's necessary to have more than one translation for particular strings. Thanks for help Radovan -- View this message in context: http://www.nabble.com/Ignore-duplicty-in-compilemessa

Re: Limiting the choice of ChoiceField if not in choices

2009-07-09 Thread urukay
Hi, how does your view looks like? why you're unable to set initial data for the form? Radovan firebug wrote: > > > Hi, > > I want to limit the choice of ChoiceField to a predefined value, if > the value from POST does not exist in given choices. How this could be > done easily? I don't wa

Re: deletion of multiple entries through CheckBox.

2009-07-09 Thread urukay
rimary key to checkbox. So when selected, > the particular DB entry is deleted. > > Thanks a lot for your help. > Sonal > > On Jul 8, 10:23 pm, urukay wrote: >> Sonal, >> >> i used Ajax, posted dict with id's that should be deleted. >> >> R.

Re: Problem with admin after moving to another machine

2009-07-08 Thread urukay
try deleting this table in you DB: django_admin_log this should erase all recent acions of admin, but i'm not sure, never done this :) R. diogobaeder-2 wrote: > > > No one? Just this: how do I delete my recent actions log? I think this > might be the problem... > > Thanks, > > Diogo > >

Re: Django way to design this model

2009-07-08 Thread urukay
Don't know if i understand you right, but you have to create two models (Species 1 & 2). And then you write a view, that will do the searching according parameters (Tolerance, pagination, species 1&2) But more details would help definetely. R. Divesh Gidwani wrote: > > > Hey, > > Newbie to

Re: deletion of multiple entries through CheckBox.

2009-07-08 Thread urukay
Sonal, i used Ajax, posted dict with id's that should be deleted. R. Sonal Breed wrote: > > > Hi all, > > I am trying to achieve the deletion of multiple comment/data entries > by selecting corresponding checkboxes like GMail or other mail apps. > These entries are stored individually as r

Re: Hi, im new with Django

2009-06-12 Thread urukay
why Django go into "site-package" ? - it's directory for 3rd party packages, Django is python framework For all your other questions, if you're running WINDOWS, the solution is to setup your Enviromental Variables-System variables or you have to write whole path to django-admin.py file R.

Re: error using ChoiceField

2009-06-11 Thread urukay
The problem is that, when you submit the form to your view, the form choices does not exist (the only exist only at client side, not server side). Before validating the form, you have to create appropriate choices for that choicefield. This should point you to the right direction: http://monogro

Re: how to import variable from view to form

2009-05-15 Thread urukay
Don't know if i understand you right, but maybe this could help: in form: class ContactForm(forms.Form): def __init__( self, user_choices_list, *args, **kwargs ): super( ContactForm, self ).__init__( *args, **kwargs ) self.fields['email'].choices

Re: Django

2009-02-20 Thread urukay
I think you need to write clean method for that form. If you meant anything else, then more information will be needed. http://docs.djangoproject.com/en/dev/ref/forms/validation/ Radovan Nalini-4 wrote: > > > While inputting an invalid username and password it should throw an > alert mes

Re: Form wizard back button

2009-02-16 Thread urukay
Maybe i don't have exact solution to your problem, because i've never user form wizard so far. I always create my own forms. During user's registraton process i save user.id in session and in every view i'm testing if this ID is in session (it menas, register process has not been finished) and if

Re: Compare the fields of the same model

2009-01-20 Thread urukay
Hi i would use raw SQL to retrieve models, that would be the fastest way i quess: http://docs.djangoproject.com/en/dev/topics/db/sql/ from django.db import connection cursor = connection.cursor() cursor.execute(...Sqlquery...) ... ... Other way could look like this: result = [] all_m

Re: html a-href

2009-01-20 Thread urukay
gt; > The current URL, page/templates/some_page.html, didn't match any of these. > > > > urukay wrote: >> >> try look at this: >> >> http://www.w3schools.com/html/html_links.asp >> >> R. >> >> >> >> lperkov wrote: >

Re: Can someone please recommend a book I should get?

2009-01-20 Thread urukay
When began with Django a read this book http://www.amazon.com/Sams-Teach-Yourself-Django-Hours/dp/067232959X Maybe reviews are not so good, but it gave me good start, but real learning began when I started to write own projects. And also it's little bit old (Django releases prior to the version 1

Re: html a-href

2009-01-19 Thread urukay
try look at this: http://www.w3schools.com/html/html_links.asp R. lperkov wrote: > > hi, i'm pretty new in django.. so i have basic problems :) > ..my index file (work in browser) don't want to link other pages.. i have > done all that stuff with registration template folder.. > {{include

Re: How add extra data to m2m-field before saving form?

2008-11-27 Thread urukay
I have never used ModelForms, but this line as you wrote will not work form.members.add(request.user) # THIS LINE DOESNT WORK try instead: form.managers.add(request.user) Or you can write your own save() function, that will do all the stuff (no need to call to saves function

Re: Custom Select widget choices - how to reuse choices?

2008-11-21 Thread urukay
u can use ModelForm and you don't have to write choices. Don't know any other way. But I don't suppose there is other way, these two "ways" can solve everything, I think. Or maybe someone else would help R. Donn Ingle wrote: > > > On Friday, 21 November 2

Re: Custom Select widget choices - how to reuse choices?

2008-11-20 Thread urukay
easy way how to solve it is to put definition of your choices out of model definition: CHOICES=((u'1','one'), (u'2',u'two')) class Movie( Relic ): disk_type = models.CharField( 'Type', max_length=8, choices=CHOICES) and then you can import CHOICES whereever you want and reuse it from ..mo

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-14 Thread urukay
ile_obj.city > } > form = form_class(data) > > @ MikeKJ: Maybe it works for you to (just defining your own > forms.Form). My example code should help. > > Thanks for all your help (especially to you, urukay)! > > Best regards, > Alex > > &g

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-13 Thread urukay
I always use my own forms (no ModelForms), because there is better control of the form (validation, save function). But definetely more of code will help (models, whole view function). We will work it out ;-) R. erdmaennchen wrote: > > > After the next night of coding, reading through docume

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread urukay
maennchen wrote: > > > Thanks for your answers! > > @ urukay: So you would use two profile forms (for the two models - so > I could use ModelForm) when you have one view that calls a template > displaying both? There is no way known to me to pass two form classes > to James Benn

Re: General question: Django-Profiles, auth.User and "merging" both data

2008-11-12 Thread urukay
Don't know if I fully understand what u want, but in my opinion, the best solution is to have two forms (first for User and second for UserProfile, don't forget to connect them in SETTINGS). Duplicationg data is really not the right way I think. I my project, I use User.email to confirm the regis

Re: Queries regarding Installation of Django.

2008-11-12 Thread urukay
1. download Django at http://www.djangoproject.com/download/ - file Django-1.0.tar.gz - or download SVN and use SVN to download latest Django version 2. download and install python 3. download and install SQL (MySQL, SQLite etc) guess, u'll be needing internet after all ;) R. sadeesh

Re: Problem saving form

2008-11-12 Thread urukay
what's your view function looks like? (also form's savefunction) R. Detlef Boddin wrote: > > > Hi, > > I'm quite new to Python and Django. > I realy really need help. > > I have the problem to save a form , > > I have 2 model classes. Item and detail. > The class detail has a one-to-o

Re: Where to put signals?

2008-10-29 Thread urukay
Benjamin, i did't have to use singnals so far, but when something is needed in various app (models), i create new app and put it there (e.g. signals.py). And you don't have to bother with cross imports exceptions, can change everything in one place for each model etc. Radovan -- View this mess

Re: Truncated incorrect DOUBLE value

2008-10-22 Thread urukay
ah...yes, I've missed that :-( Thanks a lot :-) -- View this message in context: http://www.nabble.com/Truncated-incorrect-DOUBLE-value-tp20113907p20115508.html Sent from the django-users mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You receive

Truncated incorrect DOUBLE value

2008-10-22 Thread urukay
Hi, v got this error, tried almost everything to get it right, but no effect. Can anynone pls help me with that? It happens when i submit the form: class AddPartnerForm(WTForm): def __init__( self, user, *args, **kwargs ): super( AddPartnerForm, self ).__init__( *args,

Re: viewdoesnot exist at /

2008-10-10 Thread urukay
ode and maybe try a django version prior to > 1.0. > > Greetings, > Arnoud > > > > > From: > urukay <[EMAIL PROTECTED]> > To: > django-users@googlegroups.com > Date: > 10-10-2008 09:50 > Subject: > Re: viewdoesnot exist at / > > >

Re: viewdoesnot exist at /

2008-10-10 Thread urukay
obile Data (Netherlands) B.V. > Statutair gevestigd te Utrecht > Handelsregisternr. 30115741 > > P please don't print this e-mail unless you really need to > > > > > From: > urukay <[EMAIL PROTECTED]> > To: > django-users@googlegroups.com >

Re: viewdoesnot exist at /

2008-10-10 Thread urukay
As Russell wrote, you need to change the way u're importing newforms: from django import forms R. ATijssen wrote: > > I > > > > > From: > urukay <[EMAIL PROTECTED]> > To: > django-users@googlegroups.com > Date: > 10-10-2

Re: viewdoesnot exist at /

2008-10-10 Thread urukay
looks like, the problem is in importing newforms. what django version are u using? Radovan ATijssen wrote: > > Hey, > > I`m a newbie when it comes to Django and python. > > I`m trying to install surftrackr, a squid and dansguardian log analyzer, > which uses the django framework. > Hopeful

Re: auth.login problems in Django 1.0

2008-10-09 Thread urukay
I would use HttpresponseRedirect instead of render_to_response after login. Try this: def login(request): news_list = New.objects.all().order_by('-date') if request.method == 'POST': username = request.POST['username'] password = request.POST['password'] user = auth.authenticate(

Re: using and displaying user info from django.auth

2008-10-09 Thread urukay
I don't know if I fully understand what is your problem. But I read your other conversation with Robocop. After auth.login(request, user) there should be HttpResponseRedirect() : if user.is_active: auth.login(request, user) return HttpResponseRedirect(' ') :

GenericRelation

2008-10-04 Thread urukay
Hi, could anyone help me with this please? I'm working on rating system. Each model that can be rated has ARating as a parent. My models: class ARating(models.Model): """Each model which is using ratings should extend this class. """ rates = generic.GenericRelation('Rating')

Re: manyTomany visibility in admin

2008-09-30 Thread urukay
Pavel, so if in tables there is everything ok (all ids match etc), then maybe problem is in browser itself. Or maybe try upgrade to django1.0. Sometimes when i'm looking at e.g. userprofile in Admin interface and i made some changes in templates and then when I only reload Admin view, M2M fields

Re: MySQLdb + AMD64

2008-09-25 Thread urukay
if you'r talking about developing pc, than it's no problem. I'm running xp64 with mySQL and no problem so far. Of course, it was little harder to get working apache, or eclipse or eclipse with svn, but with sql, there was no problem at all. Radovan theiviaxx wrote: > > > I understand this is

Re: manyTomany visibility in admin

2008-09-25 Thread urukay
you saved it in Admin or in your own form? If in form, problem could be your "def save()" function. did check table(s) of Book model? is it empty? Radovan [EMAIL PROTECTED] wrote: > > > sorry, i forgot to mention that i am using debian stable version > 0.95.1-1etch2 > >

Re: list_display a Many to Many field

2008-07-09 Thread urukay
this should work: def get_authors(self): return self.authors.all() list_display = ('title', 'Publisher', 'publicationDate', 'get_authors' ) Radovan Fernando Rodríguez wrote: > > > Hi, > > I'm trying to display a many to many field in the admin interface. > > This is my model: > > cl

Re: Still unable to log into the admin interface

2008-07-07 Thread urukay
never faced this kind of problem before :S..maybe if u write down or upload somewhere ur settings.py file Fernando Rodríguez wrote: > > > El lun, 07-07-2008 a las 04:24 -0700, urukay escribió: >> >> did u create user during SYNCDB? > > yes and i got no err

Re: Still unable to log into the admin interface

2008-07-07 Thread urukay
did u create user during SYNCDB? Fernando Rodríguez wrote: > > > Hi, > > I followed the advice I got here, and added > django.contrib.auth > django.contrib.contenttypes > django.contrib.admin > > to settings.py and included the following pattern to urlsp.py: > (r'^admin/', include('django

Re: choices

2008-07-03 Thread urukay
no, no i mean it otherway, just like Rajesh Dhawan wrote (link he sent). guess i'll have to find other way to that, not in Model level. but thanks Alessandro Ronchi-2 wrote: > > 2008/7/3, urukay <[EMAIL PROTECTED]>: >> >> >> yes, but it's only for l

Re: What part of Django source code should I read first?

2008-07-03 Thread urukay
i agree, the best way to learn Django is to start doing something Kenneth Gonsalves wrote: > > > > On 03-Jul-08, at 1:52 PM, Rit Lim wrote: > >> I'm a recent college graduate, and I haven't written any real program. >> I'm trying to learn the more advance topics in Python... Its >> impossib

Re: choices

2008-07-03 Thread urukay
s lists (i mena somethink like choices1 =..., choices2 = ... etc), is it? Or maybe completely misapprehended what u wrote me :D but really, thanks a lot anyway :) Malcolm Tredinnick wrote: > > > > On Wed, 2008-07-02 at 13:40 -0700, urukay wrote: >> >> is there a way how

Re: choices

2008-07-02 Thread urukay
thanks, but i was wondering if it's possible to do that in MODEL? Rajesh Dhawan wrote: > > > > > On Jul 2, 4:40 pm, urukay <[EMAIL PROTECTED]> wrote: >> is there a way how to create choices in Models in specific way, that some >> choices are not se

choices

2008-07-02 Thread urukay
is there a way how to create choices in Models in specific way, that some choices are not selectable (they only group and describe choices below)? e.g.: CHOICES = ( ('0', 'Basic Colors'), ('1', 'Red'), ('2', 'Green'), ('3', 'Blue'), ('4', 'Other Colors'), ('5', 'Br

Re: ManyToManyField in Admin list_display

2008-07-02 Thread urukay
solved urukay wrote: > > Hi, > > right now I'm working on one model and it looks like this > > class Area(models.Model): > > region = models.CharField(max_length = 2, choices = > SLOVAK_REGION_CHOICES, radio_admin = True, db_index = T

ManyToManyField in Admin list_display

2008-07-02 Thread urukay
Hi, right now I'm working on one model and it looks like this class Area(models.Model): region = models.CharField(max_length = 2, choices = SLOVAK_REGION_CHOICES, radio_admin = True, db_index = True, blank = True, null = True) city = models.CharField(max_length = 4, choi