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,
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
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
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
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
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
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
[[
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
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
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
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
','') ,
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
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 =
.
#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
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
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
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
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
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
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
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?
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
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
#
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
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
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
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
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
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
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
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 ##
>
> >
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}}
{%
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
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
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
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'
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
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.
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
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.
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
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.
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?
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.
>
&
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
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
=''
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
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
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
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,
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
&
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
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"),
"
;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
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?
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
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
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
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
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
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
",
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
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
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
64 matches
Mail list logo