django query, order results such that th128 > th99

2015-09-28 Thread gintare
Is it possible to order the query result strings in such a way that th128 string would be first comparing to th99. The query results contains 128 items in format: "th"+number. For instance, th1, th2, ...th80, ..th99, th100, th128. Than i order results, they go in the following order, th1,

NameError name 'lang' is not defined, corresponds to name 'polls' is not defined,

2014-07-06 Thread gintare
I am trying to create a project "lang" according Django documentation part 1-4 tutorial. Folder structure: Scripts\lang\lang\_init_.py Scripts\lang\lang\settings.py Scripts\lang\lang\urls.py Scripts\lang\langu\_init_.py Scripts\lang\langu\admin.py Scripts\lang\langu\models.py

not able to create a site, instead text document pops out.

2013-05-10 Thread gintare
Windows7 computer. Django 1.5.1 Python 2.7 Not able to create a site, instead text document pops out. Command: c:\Python27\Scripts>c:\Python27\Scripts\django-admin.py startproject mysite does not create folder 'mysite', instead (as any other commands like version, help..) commnad gives a

deleting my old messages

2011-12-02 Thread gintare
Hello, Could you please delete all my posts. I look through them and copied all needed information. I am not able to find the new questions among old messages. After deletion the search with my name as a keyword will give me the latest questions. regards, gintare statkute -- You received

Admin, Save

2011-11-29 Thread gintare
save changes at Model level, where i can edit tens of Instances and later press 'Save' for all of them. Maybe it is a bug, since the button "save exists", but it is not working. regards, gintare statkute -- You received this message because you are subscribed to the Google Groups

after making one choice in the list, the model instance would know about this and would offer certain kind of chices2.

2011-11-28 Thread gintare
institutions, i would get list of the institutions in the choice2. How to implement such choices? regards, gintare statkute -- 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@google

python, django, regex, θæŋkfəli

2011-11-21 Thread gintare
This is corrected question. The first time it was submitted on 2011.11.22 nd. I am not able to save string with special characters, such as θæŋ after re.search(string). #saving to the model Textfield does not work. Instead of θæŋkfəli, i am getting shown "\xce\xb8\xc3\xa6\xc5\x8bkf\xc9\x99li" in

Re: output as input *.html

2011-04-10 Thread gintare
[[ model.fieldValue_which_is_possible_to_edit_and_is_saved_BACK_automatically_to_model ]] On Feb 10, 8:21 am, gintare <g.statk...@gmail.com> wrote: > Now if i ^filter out and display model objects they come as a text > information. > I can only read it. It is not possible to make and save changes > directly in *.html. > > Mayb

ogg, audio,

2011-04-09 Thread gintare
pera 11 audio play icon appears in all cases, nevertheless it do not play the file. Other browsers on my computer do not support html5. Of course file works if i check in VCL player. regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users&q

model field assignment

2011-04-08 Thread gintare
I would like to remove multiplicative items in several fields of the model. I do not know how to save changes: for Lists in [a.SynGREn, a.SynGREnn]: ... .. make changes in field by editing Lists, i.e. cropping part of text: changed_text=crop(Lists, words) ...Lists=changed_text

output as input *.html

2011-02-09 Thread gintare
Now if i filter out and display model objects they come as a text information. I can only read it. It is not possible to make and save changes directly in *.html. Maybe there is some function which i overlooked by reading documentation, which displays model fields as input with initial values

where is a mistake in radio buttons

2011-02-08 Thread gintare
','') , request.POST.get('requalLkIn','') if (rcontainsLkIn)... gives none although it is already preselected initially. How i should read value from radio buttons? Check-boxes works perfectly. regards, gintare -- You received this message because you are subscribed to the Google Groups

answer to question related about the *.html filling with values

2011-02-06 Thread gintare
it is incredibly easy, just difficult to guess out without example. *.html {{Output}} # views.py def web(request): Out, Ww =request.GET.get('Output',''), request.GET.get('sWw','') Out='naujas zodis' sWw= 'off' t =

population of *.html fields from Django

2011-02-06 Thread gintare
. #Normally i should use {{ }} for variable output. #IS IT POSSIBLE TO USE HTML SYNTAX and populate textarea and checkboxes return render_to_response('x.html',{ 'LangFROMt', 'EN'}, ? regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: different length queries

2011-02-06 Thread gintare
Thanks a lot for the answers! I did not found that it is possible to use dictionaries and lists in query. In the end i used raw function to form string according form input. Lists and Dictionaries is much better way, since i am not tied to certain database. regards, gintare On Feb 3, 12:08 pm

checkbox, how to return state back to html

2011-02-03 Thread gintare
views.py "if statements" recognize that the box was checked. I am not able to return the checkbox state back to web.html I would like to see the last checkbox choices in my page. web.html views.py def xxx(request): cbSMWord = request.POST.get('cbSMWord ','') if (cbSMWord): print

different length queries

2011-02-03 Thread gintare
answer to my previous question about different length queries http://docs.djangoproject.com/en/dev/topics/db/sql/ #for p in Person.objects.raw('SELECT * FROM myapp_person') Is it possible to post all the question which i send immediately? Sometimes i find answer by myself. I also soon would

different length queries

2011-02-03 Thread gintare
Hello, Could you please advice if it is possible and where i could read OR at least that keywords should search for the following question. Is there a way to submit List = [Q(word__starts='search_input'), Q(date='search_input') ,] to model.objects.filter (List). How i have to formulate such

django OneToOne field may not be NULL

2011-02-02 Thread gintare
Hello, I would like to ask how i should correctly deal with OneToOne (OTO) relation field . When i create object from model with OTO fields i do not want to assign any model to them. Maybe i will do in future when appropriate object will appear. Django do not let me to have not assigned OTO

AttributeError 'module' object has no attribute '__path'

2011-02-01 Thread gintare
I searched all help, could not find a solution. Windows7 python and django runs from cmd 1) to run python c:\Python27\python 2)to run django and to create the project c:\Python27\python c:\Python27\Scripts\django-admin.py startproject Spokas THERE is an error while trying to create tables

memory, time, 1000 lines model or 100 models with 10 lines

2011-02-01 Thread gintare
models, than the number of entrances in database increase 100 times. What is better performance of the Django, Sqlite3. Have 20.000 entrances in the table with 1000 columns or 2.000.000 entrances in the table with 10 columns regards, gintare -- You received this message because you are subscribed

How to display empty custom or model based formset? form?

2011-01-30 Thread gintare
How to display empty custom or model based formset? form? I am able to display only formset filled with data. from django.forms.models import modelformset_factory wFormSet=modelformset_factory(Word, max_num=4, extra=2, fields=('Wordword', 'WordTranslEn') #uncomment one of formsets. THIS

example do not work, TypeError

2011-01-30 Thread gintare
simple question related to another example. Django Version: 1.2.4 Exception Type: TypeError Exception Value: 'WordFormFormSet' object is not iterable Exception Location: c:\Python27\Scripts\Finnish2\..\Finnish2\Fin \views.py in first, line 2492 #

simplest for example, Error object has no attribute 'cleaned_data'

2011-01-30 Thread gintare
Is it possible by making small change to resolve the error below: (I did not yet finished reading all manual, maybe the error disappears if i make custom code for every line in the model, but my model has over 30 fields thus i would like to have automated save and post of all these fields) Django

query did not work

2011-01-29 Thread gintare
would like to post one bug, since i was sitting 4h on it For some reasons query did not work. In the end appeared that it depends on how urls.py are formulated: urlpatterns = patterns('', (r'^searchbooks','Finnish2.Fin.views.searchbooks'), # page http://127.0.0.1:8000/searchbooks is

additional infor to startind Django on Windows7

2011-01-24 Thread gintare
I would lile to add information to unanswered thread http://groups.google.com/group/django-users/browse_thread/thread/6bdc81a65804fde2/f94f116fe77c0c97?lnk=gst=gintare+start#f94f116fe77c0c97 In the end on windows7 Django worked from comman line (start, print cmd): cd c:\Python27\Scripts c

urgent, undo delete

2011-01-17 Thread gintare
Is it possible to undo model.filter( field_gte = datemin ).delete() if it was the action, which happened from function in views.py, by accidentaly uncommenting the line regards, gintare statkute -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: list of lists in template

2011-01-16 Thread gintare
Thanks On Jan 7, 9:27 am, Chris Matthews wrote: > {%  for Ltarp in  smth.3 %} > SHOULD BE > {%  for Ltarp in  smth.2 %} > 'cos Lans only has 3 elements and Ltarp is Lans[2]. > > Chris > > -Original Message- > From: django-users@googlegroups.com

to iterate over two lists simultaneously in *.html

2011-01-16 Thread gintare
Hello, I am sorry for asking a simple question. (I read other answer bout iteration in several items in this user group - they are too complicated for me. I have no time to study Django deeper. ) I want to iterate over two lists simultaneously in form which is simple (.html), do not described in

Re: ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form.

2011-01-08 Thread gintare
I did not understand what was the a reason, but i changed order of items in admin.py fields to be similar to items order in the model. Maybe mistake was some mistyping. Anyway error disappeared. regards, gintare On Jan 2, 6:47 pm, Ramiro Morales <cra...@gmail.com> wrote: > On Sun, Ja

Re: form handling in views.py

2011-01-06 Thread gintare
n Tuesday, January 4, 2011 6:31:30 PM UTC, gintare wrote: > > > Maybe smbd could give advice how data submitted from custom.html to > > views.py are handled further? > > >   custom.html  with method  search1 ## > > >

list of lists in template

2011-01-06 Thread gintare
in view.py ... Ltarp.append([item.Wordword, item.WordTranslEn, item.WordNotesGram, item.WordConcl]) .. Lans.append([sen.Sent, sen.SentTransl, Ltarp ] ) in template.html {% if Lans %} {% for smth in Lans %} {{smth.0}} {% for Ltarp in smth.3 %} {{Ltarp.0}} {%

form handling in views.py

2011-01-04 Thread gintare
areas (how to relate several text areas in row with single button in that row ) . regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubs

Re: to execute executable.py from view.py

2011-01-03 Thread gintare
One more related question. Is it possible to use string in views.py as a function ( string from textarea (in search.html )) i.e. # search.html input function name this search.html after being registered in urls.py shows input text area. I prompt to write the name of function. I get this

render_to_response

2011-01-03 Thread gintare
How formulate correctly the code below: [code] #views.py def search(request): .. answ = my_fnc(roots) return render_to_response("my_fnc.html", { "answ" : answ } ) def my_fnc( roots ): FindWord=authors.objects.filter("name"__contains=roots) return

ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form.

2011-01-02 Thread gintare
I was changing models many times and deleting tables inbetween. New tables were generated to improved models and admin site worked perfectly. Now smth happened that i am getting error: ImproperlyConfigured: 'SentAdmin.fields' refers to field 'dateSent' that is missing from the form. 'dateSent'

constructor for model, automatically generate field, __init__

2011-01-01 Thread gintare
class Word: fWord=models.CharField(blank=True, default='') fsmth=models.CharField(blank=True, default='') def __init__(self, fWord): self.fWord=fWord self.fsmth=fWord+fWord I need to add entrance to fsmth automatically. The code above gives mistakes in sites.py about

to execute executable.py from view.py

2010-12-29 Thread gintare
I would like by using #in views.py def myfnc(): subprocess.Popen( '/polls/executable.py', executable='/usr/lib/ python') execute executable.py from views.py function. I am getting error that terminal is already taken. This is true - django manage.py runserver keeps django webpages ON.

Re: automatic addition of several ForeignKeys to model

2010-12-29 Thread gintare
error) > > 149 class Mentorship(models.Model): > 154     mentee = models.ForeignKey(User, related_name='menteeship_set') > 155     mentor = models.ForeignKey(User, related_name='mentorship_set') > > > > On Mon, Dec 27, 2010 at 10:00 AM,gintare<g.statk...@gmail.com> wrote: &g

custom function for Admin, submit_line.html, views.py

2010-12-29 Thread gintare
1) Where is the *.py file and what is his name, in which there are written functions related to 'Save and add another', 'Save and continue editting' buttons of Admin site. I do not understnad to which file i have to add custom functions for admin. 2) How to add a button to Admin (i.e.

add already existing items in database to field "synonims" as a hyperlinks

2010-12-27 Thread gintare
references to another words in the database? On 27 Gruo, 20:00, gintare <g.statk...@gmail.com> wrote: > Hello, > > I would like to add ForeignKey which would ass many items to class as > much i append-create-give. > > class word1(models.Model): >     item=mo

automatic addition of several ForeignKeys to model

2010-12-27 Thread gintare
Hello, I would like to add ForeignKey which would ass many items to class as much i append-create-give. class word1(models.Model): item=models.CharField(blank=True) class word2(models.Model): itemSynonims=models.ForeignKey(word1) i would like to add several word1 to the class word2.

Re: windows7, django-admin.py, system variables, no module named django.core

2010-09-03 Thread gintare
Hello, I mean the correct way of running django seems to be to add to windows environmental variable PATH c:/first/Python26/Lib/site-packages/ Django-1.2.1/django/bin and when run $ cmd $ django-admin.py startproject mysite the question, why importing management from django.core do not work?

Re: windows7, django-admin.py, system variables, no module named django.core

2010-09-03 Thread gintare
gt; should work fine assuming Django was installed using setuptools or > pip. If not, you should look into using that instead of manually > installing it. > > If you insist on doing it manually, you need to look into creating a > .pth file to add the packages into the PYTHONPATH. > &

windows7, django-admin.py, system variables, no module named django.core

2010-08-25 Thread gintare
I am not able to run django under windows7 python django-admin.py #is recognized if i paste it to c:/first/ Python26 together with python executable. I am getting error: No module named django.core File "django-admin.py", line2, in from django.core import management It seems the command line

Re: character , HTML textfield, sqlite3

2010-03-12 Thread gintare
If somebody knows how to answer my questions please let me know. It is very urgent. I will modify code by advice of Daniel as fast as i have time = "never" :) On Mar 11, 3:43 pm, Daniel Roseman <dan...@roseman.org.uk> wrote: > On Mar 11, 1:19 pm,gintare<g.sta

character , HTML textfield, sqlite3

2010-03-11 Thread gintare
='' transaction.commit_unless_managed() regards gintare statkute -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

gintare

2010-03-07 Thread gintare
of variable Rfirstauthor = 'John Smith' models.py class Aref(models.Model): Rfirstauthor=models.CharField(max_length=500, blank=True, default='') . thanks, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Sqlite3, saving many items simultaneosly

2010-03-07 Thread gintare
Thanks for both of you! On Mar 5, 6:37 pm, Atamert Ölçgen wrote: > On Friday 05 March 2010 18:09:22gintarewrote:> b = Blog(  [name, tagline] , > ['Beatles Blog', 'All the latest Beatles > > news]  ) > > > >>> b.save() > > How many items are you saving at once? Have you measured

Sqlite3, saving many items simultaneosly

2010-03-05 Thread gintare
ing Sqlite3 syntax, where i print all column and item names to one string. regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group,

Re: formatting results of search

2010-03-04 Thread gintare
into Ath_aref'+ ' ( ' + stitles + ' ) values ' + '(' + stLq+ '); ' cursor.execute(st2); transaction.commit_unless_managed() regards, gintare On Feb 22, 1:15 am, Dennis Kaarsemaker <den...@kaarsemaker.net> wrote: > On wo, 2010-02-17 at 05:32 -0800,gintarewrote: > > > @@in *.html &

Re: what has to be changed after project.db deletion and new empty project.db file creation manually

2010-03-04 Thread gintare
Thanks now it works, In time i posted the question syncdb did not generated database file "referenc.db". Thats i posted the question. Now it works normally again. regards, gintare On Mar 3, 6:02 pm, Matt McCants <mattmcca...@gmail.com> wrote: > For sqlite3, you don't

what has to be changed after project.db deletion and new empty project.db file creation manually

2010-03-02 Thread gintare
s" ("id"), UNIQUE ("aref_id", "devices_id") ) ; CREATE TABLE "Areferenc_aref_Rcalculation" ( "id" integer NOT NULL PRIMARY KEY, "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"), "

insert satement do not work, django can not find the column

2010-03-02 Thread gintare statkute
;id"), UNIQUE ("aref_id", "devices_id") ) ; CREATE TABLE "Areferenc_aref_Rcalculation" ( "id" integer NOT NULL PRIMARY KEY, "aref_id" integer NOT NULL REFERENCES "Areferenc_aref" ("id"), "calculations_id

mouse events and view.py

2010-02-20 Thread gintare
How correctly define syntax for the event in templates? I want that all text in the text area would be send to the python function "search2" after i paste text or click mouse. After making changes the text has to be pasted back to the same form. Is it possible with python or i need java script?

Re: simple, input from user and database earch result

2010-02-20 Thread gintare
line 2 user start search in database > > I would like to get the result of the search printed back in the same > > field on the line 1. >From the examples of Django the search result is printed below on the webpage, but not in the same field where search was performed. if you could pa

simple, input from user and database earch result

2010-02-17 Thread gintare
I would like to get the result of the search printed back in the same field on the line 1. regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubs

formatting results of search

2010-02-17 Thread gintare
y }) @@in *.html @@using line {{ word|escape }} @@i am getting printed answer :(u'moi',) instead of moi. @@I need only word moi (without any brakets, quatations) be visible in a webpage. How correctly format results of search in database when they are posted to *.html? regards, gintare

django_evolution evolve not found

2010-02-05 Thread gintare
mmand line parameters. regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.c

Re: how relate webpage with databse in my harddisk?

2010-01-07 Thread gintare
One more question: Is it possible to add "mysite" to some external server and be able to access it as a superuser for me or as normal users for others? How and where i could put "mysite"? On Jan 6, 11:31 pm, Kenny Meyer wrote: > > How other can access pages i generated

how relate webpage with databse in my harddisk?

2010-01-06 Thread gintare
to generated html pages through internet from remote computer, fill questionaries and leave or get data to/from database. regards, gintare -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

error in the example

2009-12-30 Thread gintare
", line 35, in import_module __import__(name) File "/mano/mysite3/../mysite3/polls/models.py", line 5 class Poll(models.Model): ^ IndentationError: unexpected indent regards, gintare g.statk...@gmail.com -- You received this message because you are subscribed to the Google Groups

Re: error haven't set the DATABASE_ENGINE setting

2009-12-30 Thread gintare statkute
Thanks, reinstalled :) gintare On 12/30/09, Ramiro Morales <cra...@gmail.com> wrote: > On Wed, Dec 30, 2009 at 4:22 PM, gintare <g.statk...@gmail.com> wrote: >> Hello, >> >> OS Debian Gnu Linux Lenny >> Python 2.5 >> Installed python-django_1

error haven't set the DATABASE_ENGINE setting

2009-12-30 Thread gintare
Hello, OS Debian Gnu Linux Lenny Python 2.5 Installed python-django_1.0.2-1+lenny2_all.deb with K-package instead of Django-1.1.1.tar.gz, it was configured according instalation site: http://docs.djangoproject.com/en/dev/topics/install/#installing-official-release working:/mano/mysite1# ln -s