Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
Awesome, then let me try these things you mentioned.. i let you know then.. 
thanks in tons for now 

On Tuesday, October 15, 2013 5:04:02 PM UTC+2, ke1g wrote:
>
> Yes, you should split the db activity into sensible transactions, since 
> information about how to roll back is being stored somewhere (though some 
> DBs may not have a problem with this.
>
> You've added a whole new dimension when you say that this data is not, in 
> fact, a local file that you are reading, but a network request.  There are 
> many more things between you and the data source that could have trouble 
> with the large data size.  I suspect that the most likely is that the 
> server limits the time allowed for the request to complete.  Hopefully a 
> server with such a limit provides for restarting the transfer from other 
> than the beginning.
>
> I'm sorry, but I don't have the spare cycles to debug this for you.  Try 
> instrumenting things to confirm whether it is a read on the source that is 
> hanging or something else.  Since it's hard to get data from a hung 
> process, this requires some imagination.  You could write to a file an 
> indication of the point in the code when you are about to read the source, 
> when the source completes, when you are about to talk to the database, when 
> that completes, etc., but note that you must close the file after each 
> write (and open it anew before the next) since otherwise the write may be 
> buffered in the process when it hangs.  All those opens and closes will be 
> slow, so if you feel adventurous, a write to a piece of shared memory, 
> shared with a monitoring process, might be better.
>
> If you find something other than the read on the source not returning, 
> write again and I, or someone else, with think with you some more.
>
>
>
> On Tue, Oct 15, 2013 at 9:59 AM, doniyor <doniy...@gmail.com 
> > wrote:
>
>> yes, db code is doin all these calls in single transaction, i mean, i am 
>> not using transactions, may be this is the reason? 
>>
>> this is my cron code: http://pastebin.com/Lrym1z8E i know, very ugly 
>> code, it is saving at least some objects into db
>>
>> this is url where i am reading my xml file from: 
>> http://www.bookatable.com/feed.aspx?channel=524=10F70A84-76D7-C56C-2350-779A1A849819=de-DE=restaurants
>>
>> also i noticed now that in db, there are objects whose some fields are 
>> not fully filled out even if the xml file does have those information. it 
>> means, this is a transaction issue, right? 
>>
>> could you please take a look at the code? would transaction solve this 
>> issue? 
>>
>>
>> On Tuesday, October 15, 2013 3:40:42 PM UTC+2, ke1g wrote:
>>
>>> One possibility is that your code keeps all that is read (or something 
>>> derived from it) in memory, and you are running out.
>>>
>>> E.g.; Is your database code trying to do all this in a single 
>>> transaction?
>>>
>>> Another possibility is that something in the file at that spot triggers 
>>> a but in your code that contains an infinite loop.
>>>
>>> There are other possibilities.  But there's no diagnosing it with the 
>>> information you've given.
>>>
>>> Can you, in python, read through the file, doing nothing with the data?  
>>> E.g.:
>>>
>>> f = open('your/file/path/here')
>>> n = 0
>>> s = True
>>> while s:
>>> s = f.read(1024*1024)
>>> n += len(s)
>>> print n
>>> print 'done'
>>>
>>> That should work.  If not, does your O/S not correctly handle files that 
>>> big?
>>>
>>> Bill
>>>
>>>
>>> On Tue, Oct 15, 2013 at 6:55 AM, doniyor <doniy...@gmail.com> wrote:
>>>
>>>> I am reading file from url and parsing it and saving some information 
>>>> out of this file into db - using cron job. 
>>>>
>>>> i am testing now in my local dev. 
>>>>
>>>> the problem is: job is reading file and saving into db without any 
>>>> problem but after some time, since file is very huge approx. >8GB, job 
>>>> doesnot do anything and freezes, without giving any error, 
>>>>
>>>> i am using django 1.4, python 2.7 and postgresql. is there any limit 
>>>> for writing into db? why is it freezing? 
>>>>
>>>>
>>>>  -- 
>>>> You received this message because you are subscribed to the Google 
>>>> Groups "Django users" group.
>>>

Re: django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
yes, db code is doin all these calls in single transaction, i mean, i am 
not using transactions, may be this is the reason? 

this is my cron code: http://pastebin.com/Lrym1z8E i know, very ugly code, 
it is saving at least some objects into db

this is url where i am reading my xml file from: 
http://www.bookatable.com/feed.aspx?channel=524=10F70A84-76D7-C56C-2350-779A1A849819=de-DE=restaurants

also i noticed now that in db, there are objects whose some fields are not 
fully filled out even if the xml file does have those information. it 
means, this is a transaction issue, right? 

could you please take a look at the code? would transaction solve this 
issue? 

On Tuesday, October 15, 2013 3:40:42 PM UTC+2, ke1g wrote:
>
> One possibility is that your code keeps all that is read (or something 
> derived from it) in memory, and you are running out.
>
> E.g.; Is your database code trying to do all this in a single transaction?
>
> Another possibility is that something in the file at that spot triggers a 
> but in your code that contains an infinite loop.
>
> There are other possibilities.  But there's no diagnosing it with the 
> information you've given.
>
> Can you, in python, read through the file, doing nothing with the data?  
> E.g.:
>
> f = open('your/file/path/here')
> n = 0
> s = True
> while s:
> s = f.read(1024*1024)
> n += len(s)
> print n
> print 'done'
>
> That should work.  If not, does your O/S not correctly handle files that 
> big?
>
> Bill
>
>
> On Tue, Oct 15, 2013 at 6:55 AM, doniyor <doniy...@gmail.com 
> > wrote:
>
>> I am reading file from url and parsing it and saving some information out 
>> of this file into db - using cron job. 
>>
>> i am testing now in my local dev. 
>>
>> the problem is: job is reading file and saving into db without any 
>> problem but after some time, since file is very huge approx. >8GB, job 
>> doesnot do anything and freezes, without giving any error, 
>>
>> i am using django 1.4, python 2.7 and postgresql. is there any limit for 
>> writing into db? why is it freezing? 
>>
>>
>>  -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/b567f273-508b-4f14-9d40-197af8c8a079%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b61fec61-7481-4113-ab8c-31b7143df3f5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


django cron job - stops after reading some portion of huge file - why is this?

2013-10-15 Thread doniyor
I am reading file from url and parsing it and saving some information out 
of this file into db - using cron job. 

i am testing now in my local dev. 

the problem is: job is reading file and saving into db without any problem 
but after some time, since file is very huge approx. >8GB, job doesnot do 
anything and freezes, without giving any error, 

i am using django 1.4, python 2.7 and postgresql. is there any limit for 
writing into db? why is it freezing? 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b567f273-508b-4f14-9d40-197af8c8a079%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


how to make distinct and order_by work together

2013-08-10 Thread doniyor
I am really stuck in this problem for a while. this is really challenging 
for me. .. tough one... 

i have two models. Location and Rate. 

each location has rates, possibly multiple rates.. let me give you my 
models: 

class Location(models.Model):
  name = models.TextField()
  adres = models.TextField()
class Rate(models.Model):
  location = models.ForeignKey(Location,related_name='locations_rate')
  rate = models.IntegerField(max_length=2)

the case is: 

I am trying to write the sort function which is called when user in resultpage 
the result items sorts e.g. by rate. then the results should be sorted 
ascendingly ordered by rate. 

I tried this: 

locations = 
Location.objects.filter(**s_kwargs).order_by('-locations_rate__rate')

but this is giving me duplicate items. then i tried this: locations = 
Location.objects.filter(**s_kwargs).distinct('id').order_by('-locations_rate__rate')

but i am getting error message saying this wont work as i read in every forum. 
what can i do so that i can sort the items ordering by rates and keeping them 
distinct set? 


please help me 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




how to render data coming from server to template using ajax!

2013-02-10 Thread doniyor
hey guys, i am stuck in this problem. i posted the problem on 
stackoverflow.com 
also, 
http://stackoverflow.com/questions/14787772/sorting-queryset-of-search-result-and-render-back-thru-ajax

but till now no one could answer there, so i am asking here again. anyone 
can help me? :( 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




how to deploy django project to lighttpd server

2013-01-04 Thread doniyor
Hi there, 

i am stumbling over this step: i have django project running at my pc 
local, i want to deploy it to server to see it online. I have bought the 
hosting service from djangoeurope.com. they have that one-click django 
installer, it installs the environment with its lighttpd settings. now i 
dont know where to upload my django files and where to set and how to get 
it running,

in the server i have this files which are installed by one-click django 
installer: 
under ~/projectname
*projectname, projectname.pid, projectname.sock, manage.py, RUN*

do i have to upload here? 

thanks a lot for help in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/U8n69IPW0kgJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Python IDLE

2012-05-30 Thread doniyor
i dont know, but that would be awesome, do you know if aptana has it? i 
never thought of key binding til now in aptana. 
 

Am Mittwoch, 30. Mai 2012 16:19:15 UTC+2 schrieb ke1g:

> Does it do emacs key bindings ;^) 
>
> On Wed, May 30, 2012 at 10:13 AM, Mario Gudelj <mario.gud...@gmail.com> 
> wrote: 
> > It's not free but they have a 30 day trial period 
> > 
> > 
> > On 31 May 2012 00:09, doniyor <doniyor@googlemail.com> wrote: 
> >> 
> >> @somecallitblues: pycharm is not free, right? but i am really willing 
> to 
> >> give a try for this. i am using for years Aptana studio which is 
> completely 
> >> fullfulling my wishes, but "pycharm loves django" sounds great! 
> >> 
> >> Am Mittwoch, 30. Mai 2012 15:59:13 UTC+2 schrieb somecallitblues: 
> >>> 
> >>> You seriously have to give PyCharm a go. It's everything IDE should be 
> >>> and loves django. 
> >>> 
> >>> On 30 May 2012 23:40, Bill Freeman <ke1g...@gmail.com> wrote: 
> >>>> 
> >>>> On Mon, May 28, 2012 at 12:25 PM, Dennis Lee Bieber 
> >>>> <wlfr...@ix.netcom.com> wrote: 
> >>>> > On Mon, 28 May 2012 05:37:43 -0700 (PDT), coded kid 
> >>>> > <duffleboi...@gmail.com> declaimed the following in 
> >>>> > gmane.comp.python.django.user: 
> >>>> > 
> >>>> >> I'm in a big mess now, I've lost my projects due to this errror. 
> I'm 
> >>>> >> on windows, This is how I encounter the problem; I try to edit my 
> >>>> >> settings.py in IDLE. After right clicking on the files, I choose 
> open 
> >>>> >> program with these default file. I choose idle window bat file, 
> and I 
> >>>> >> clicked Ok. It didn't open, I try to run manage.py runserver on my 
> >>>> >> DOS. Not working, it will pop up the IDLE Shell and mange.py 
> script 
> >>>> >> by 
> >>>> >> displaying it in IDLE. It didn't run the server. The logo of my 
> >>>> >> python 
> >>>> >> files have changed. How can I revert it back to open with IDLE? 
> And 
> >>>> >> use it as default for my python script? 
> >>>> > 
> >>>> >IDLE itself is a Python script; though it sounds like you 
> (or 
> >>>> > someone) created a Windows BAT file to act as an intermediate. 
> >>>> > 
> >>>> >The main problem appears to be that you've associated the 
> >>>> > "open" 
> >>>> > action with /IDLE/... The normal "open" action for Python (.py) 
> script 
> >>>> > files should be Python.exe (or Pythonw.exe for .pyw). For editing 
> you 
> >>>> > should have/create a "Edit" action that invokes your 
> IDLE 
> >>>> > BAT file. 
> >>>> > 
> >>>> >You'll need to work with the file association commands in 
> >>>> > Windows to 
> >>>> > reset things so that "open" means RUN the script. 
> >>>> > 
> >>>> >Unfortunately, different installations have used different 
> >>>> > names for 
> >>>> > the file types. Here are mine (I had to do "ftype" with no 
> arguments 
> >>>> > and 
> >>>> > scan the long output to find the Python entries): 
> >>>> > 
> >>>> > E:\UserData\Wulfraed\My Documents>ftype py_auto_file 
> >>>> > py_auto_file="E:\Python25\python.exe" "%1" %* 
> >>>> > 
> >>>> > E:\UserData\Wulfraed\My Documents>ftype pyw_auto_file 
> >>>> > pyw_auto_file="E:\Python25\pythonw.exe" "%1" 
> >>>> > 
> >>>> > 
> >>>> >Note that ftype only defines the "open"/"run" action for a 
> >>>> > file. 
> >>>> > (Interesting -- the .pyw doesn't take command line arguments, 
> probably 
> >>>> > to be expected for a double-click open). 
> >>>> > 
> >>>> >The other half of the basic equation is the file extension 
> to 
> >>>> > "file 
> >>>> > type" association: 
> >>>> > 
> >>>> > E:\UserData\Wulfraed\My Do

Re: Python IDLE

2012-05-30 Thread doniyor
@somecallitblues: pycharm is not free, right? but i am really willing to 
give a try for this. i am using for years Aptana studio which is completely 
fullfulling my wishes, but "pycharm loves django" sounds great! 

Am Mittwoch, 30. Mai 2012 15:59:13 UTC+2 schrieb somecallitblues:

> You seriously have to give PyCharm a go. It's everything IDE should be and 
> loves django.
>
> On 30 May 2012 23:40, Bill Freeman  wrote:
>
>> On Mon, May 28, 2012 at 12:25 PM, Dennis Lee Bieber
>>  wrote:
>> > On Mon, 28 May 2012 05:37:43 -0700 (PDT), coded kid
>> >  declaimed the following in
>> > gmane.comp.python.django.user:
>> >
>> >> I'm in a big mess now, I've lost my projects due to this errror. I'm
>> >> on windows, This is how I encounter the problem; I try to edit my
>> >> settings.py in IDLE. After right clicking on the files, I choose open
>> >> program with these default file. I choose idle window bat file, and I
>> >> clicked Ok. It didn't open, I try to run manage.py runserver on my
>> >> DOS. Not working, it will pop up the IDLE Shell and mange.py script by
>> >> displaying it in IDLE. It didn't run the server. The logo of my python
>> >> files have changed. How can I revert it back to open with IDLE? And
>> >> use it as default for my python script?
>> >
>> >IDLE itself is a Python script; though it sounds like you (or
>> > someone) created a Windows BAT file to act as an intermediate.
>> >
>> >The main problem appears to be that you've associated the "open"
>> > action with /IDLE/... The normal "open" action for Python (.py) script
>> > files should be Python.exe (or Pythonw.exe for .pyw). For editing you
>> > should have/create a "Edit" action that invokes your IDLE
>> > BAT file.
>> >
>> >You'll need to work with the file association commands in 
>> Windows to
>> > reset things so that "open" means RUN the script.
>> >
>> >Unfortunately, different installations have used different names 
>> for
>> > the file types. Here are mine (I had to do "ftype" with no arguments and
>> > scan the long output to find the Python entries):
>> >
>> > E:\UserData\Wulfraed\My Documents>ftype py_auto_file
>> > py_auto_file="E:\Python25\python.exe" "%1" %*
>> >
>> > E:\UserData\Wulfraed\My Documents>ftype pyw_auto_file
>> > pyw_auto_file="E:\Python25\pythonw.exe" "%1"
>> >
>> >
>> >Note that ftype only defines the "open"/"run" action for a file.
>> > (Interesting -- the .pyw doesn't take command line arguments, probably
>> > to be expected for a double-click open).
>> >
>> >The other half of the basic equation is the file extension to 
>> "file
>> > type" association:
>> >
>> > E:\UserData\Wulfraed\My Documents>assoc .py
>> > .py=py_auto_file
>> >
>> > E:\UserData\Wulfraed\My Documents>assoc .pyc
>> > File association not found for extension .pyc
>> >
>> > E:\UserData\Wulfraed\My Documents>assoc .pyw
>> > .pyw=pyw_auto_file
>> >
>> > (This is why I commented that the file type name may differ between
>> > installs -- the assoc is
>> ><.extension> = 
>> > and ftype is
>> > = 
>> > As long as the same  is used in both commands the linkage
>> > works)
>> >
>> >That SHOULD clear up the double-click/Open/command 
>> line
>> > running of Python scripts. Setting up an Edit action (on WinXP) requires
>> > going through either the registry by hand, or opening a directory
>> > window,
>> >
>> > Tools/Folder Options
>> > File Types (tab)
>> >scroll down to PY and PYW entries, select one
>> >Details should show "Opens with: python" (or pythonw)
>> > [Advanced]
>> >the default action should be "open" (bold). If there is no "edit"
>> > action, click [New...]
>> >
>> >Give it Action name "edit" (or "edit with IDLE")
>> >Application used to perform action: full path to the IDLE.BAT 
>> file
>> > (in quotes) followed by "%1" (with quotes) for the argument placeholder
>> > (the file to be edited).
>> >Might need to [x] Use DDE; set "Application" to IDLE, set Topic 
>> to
>> > System
>> >
>> > {NOTE: I'm paraphrasing from the edit action on my system which uses
>> > "E:\Python25\Lib\site-packages\pythonwin\Pythonwin.exe" "%1"}
>> > {I'm not sure if you could skip the BAT file and use
>> >"path/to/python.exe" "path/to/IDLE.py" "%1"
>> > instead}
>> >
>> > --
>> >Wulfraed Dennis Lee Bieber AF6VN
>> >wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>>
>> Last I used it (I've been blessedly Windows free for some time now),
>> IDLE's editor was fine for editing Python (everyone has their own
>> favorite code editor), at least giving nice syntax highlighting and
>> correct (for Python) treatment of the tab key.  But it is not really
>> an IDE (except maybe for projects that are one file, or maybe one
>> folder).
>>
>> I'm sure that there are many fine Windows specific solutions.
>> (Someone mentioned 

Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
what do you mean? should i do better chmod 755 which is more secure than 
777? 
 

Am Mittwoch, 30. Mai 2012 14:29:14 UTC+2 schrieb Thomas:

>  On 5/30/12 1:11 AM, doniyor wrote: 
>
> hey man, problem solved. i did *chown www-data. .  *then *chmod 777 
> dbfile *now everything is working fine. thank you so much for your time 
> and help. 
>
> I've lost track of the early parts of this thread, but chmod 777 on a 
> database rarely indicates that everything is fine. The chown did not matter 
> much once you gave everyone in the universe write access to the database.
>
> This issue started as a permissions problem and still is a permissions 
> problem. Figure out which user is actually accessing your database and get 
> the permissions you need.
>
> hth
>
>- Tom
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/UOlT738Mi6gJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
hey man, problem solved. i did *chown www-data. .  *then *chmod 777 dbfile *now 
everything is working fine. thank you so much for your time and help. 

r u from europe? 

 

Am Mittwoch, 30. Mai 2012 09:49:33 UTC+2 schrieb lawgon:
>
> On Wed, 2012-05-30 at 00:37 -0700, doniyor wrote: 
> > it says, invalid group www-data. but look, i am logged in as root 
> > with 
> > 'su'. and i am doing all the commands here. is it correct, or should i 
> > be a 
> > normal user? this doesnot make big difference right? 
>
> in that case there is no need to use sudo. Try: 
> chown -R www-data /directory_in_which_the_dbfile_is/ 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/WMNVgbKU0AQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
it says, invalid group www-data. but look, i am logged in as root with 
'su'. and i am doing all the commands here. is it correct, or should i be a 
normal user? this doesnot make big difference right? 


Am Mittwoch, 30. Mai 2012 09:00:49 UTC+2 schrieb lawgon:
>
> On Tue, 2012-05-29 at 23:29 -0700, doniyor wrote: 
> > okay, now it said nothing, the command went well. but the page is 
> > still 
> > showing me error: unable to open database file. 
>
> you need to chown -R 
> www-data:www-data /directory_in_which_the_dbfile_is/ 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/uGHT_50l140J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
okay, now it said nothing, the command went well. but the page is still 
showing me error: unable to open database file. 

Am Mittwoch, 30. Mai 2012 08:24:31 UTC+2 schrieb doniyor:
>
> if i do 'sudo chown www-data dbfile'  it says, the access is not permitted 
> to db file.. 
>
> Am Mittwoch, 30. Mai 2012 08:17:37 UTC+2 schrieb lawgon:
>>
>> On Tue, 2012-05-29 at 23:06 -0700, doniyor wrote: 
>> > now i did 'sudo chgrp www-data . dbfile' but it says: invalid group 
>> > www-data. do i have to create it first? 
>>
>> www-data is a user, not a group 
>> -- 
>> regards 
>> Kenneth Gonsalves 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/nRN3_NpKLYgJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
if i do 'sudo chown www-data dbfile'  it says, the access is not permitted 
to db file.. 

Am Mittwoch, 30. Mai 2012 08:17:37 UTC+2 schrieb lawgon:
>
> On Tue, 2012-05-29 at 23:06 -0700, doniyor wrote: 
> > now i did 'sudo chgrp www-data . dbfile' but it says: invalid group 
> > www-data. do i have to create it first? 
>
> www-data is a user, not a group 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/xXwHv9JodaQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-30 Thread doniyor
now i did 'sudo chgrp www-data . dbfile' but it says: invalid group 
www-data. do i have to create it first? 

Am Mittwoch, 30. Mai 2012 07:58:41 UTC+2 schrieb lawgon:
>
> On Tue, 2012-05-29 at 22:45 -0700, doniyor wrote: 
> > my browser isnot openning irc url, i dont know why. 
> > 
> > thing is, root is running the apache. it means, i should chown root to 
> > all 
> > my files right? 
>
> wrong - www-data is running apache, so you should give www-data write 
> access to the db. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/0kJDob5oa6IJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-29 Thread doniyor
my browser isnot openning irc url, i dont know why. 

thing is, root is running the apache. it means, i should chown root to all 
my files right? 

Am Dienstag, 29. Mai 2012 23:17:19 UTC+2 schrieb Rafael Durán Castañeda:
>
>  El 29/05/12 22:38, doniyor escribió: 
>
> hey thanks, but i still dont get the whole mass. look, i chown all folders 
> untill db file to root. nothing changed, the same error. i did ls -l but i 
> dont see any user named 'www-data', i see the user that i created as 
> superuser when i created the django project. how can i add this superuser 
> to apache user group or something like this. i am actually not a linux 
> guru, so i am really stuck here..  
>   
>
>
> Am Dienstag, 29. Mai 2012 21:59:53 UTC+2 schrieb Rafael Durán Castañeda: 
>>
>>  El 29/05/12 19:07, doniyor escribió: 
>>
>> i did 'top', and then " ps aux | grep apache " to see. the root is 
>> running the apache. what should i do now? chown root folder/dbfile   , 
>> right  ? 
>>
>> Am Dienstag, 29. Mai 2012 17:57:03 UTC+2 schrieb Rafael Durán Castañeda: 
>>>
>>>  El 29/05/12 16:56, doniyor escribió: 
>>>
>>> hey guys, i need your help again,  
>>>
>>>  after successful deployment, i wanted to do something with database 
>>> but it says: 
>>> DatabaseError at /ajax/
>>>
>>> unable to open database file
>>>
>>> because ajax is trying to write something to db. what can be the problem. 
>>> in my settings.py the path is this: 
>>>
>>>  PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
>>>
>>> ...
>>>
>>> 'NAME': os.path.join(PROJECT_PATH, 'stahlbank.db'),
>>>
>>>  i am using sqlite. OS is linux. 
>>>
>>>  thanks 
>>>
>>>  -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Django users" group.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msg/django-users/-/qkkO9dd9C7AJ.
>>> 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 options, visit this group at 
>>> http://groups.google.com/group/django-users?hl=en.
>>>
>>> I think it's just a permissions problem, did you check the user is 
>>> running apache has access to the database file? Anyway, it would easier 
>>> help you with a full traceback.
>>>
>>> HTH
>>>  
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/wfrNRrc9rSoJ.
>> 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 options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>> If you change the Apache user or chown your files is up to you, but 
>> Apache it's not recommended (I think even it's not possible, I'm not an 
>> Apache expert) running as root due to security holes. If you look again 
>> your ps you probably will see something like this:
>>
>> root 29833 1  0 May14 ?00:00:46   /usr/sbin/apache2 -k 
>> start
>> www-data 15726 29833  0 May27 ?00:00:00 /usr/sbin/apache2 -k 
>> start
>> www-data 15781 29833  0 May27 ?00:00:04 /usr/sbin/apache2 -k 
>> start
>> www-data 15782 29833  0 May27 ?00:00:04 /usr/sbin/apache2 -k 
>> start
>>
>> where the www-data user is running your web application.
>>  
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/zfL0OoG14rcJ.
> 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 options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
> I think I might help you better live (note as I said I'm not an Apache 
> expert), you can find me (rafaduran) at #django IRC channel, among a lot of 
> more people that probably can help you much better than me.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/CnnyjgrRaxQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-29 Thread doniyor
hey thanks, but i still dont get the whole mass. look, i chown all folders 
untill db file to root. nothing changed, the same error. i did ls -l but i 
dont see any user named 'www-data', i see the user that i created as 
superuser when i created the django project. how can i add this superuser 
to apache user group or something like this. i am actually not a linux 
guru, so i am really stuck here.. 
 


Am Dienstag, 29. Mai 2012 21:59:53 UTC+2 schrieb Rafael Durán Castañeda:
>
>  El 29/05/12 19:07, doniyor escribió: 
>
> i did 'top', and then " ps aux | grep apache " to see. the root is 
> running the apache. what should i do now? chown root folder/dbfile   , 
> right  ? 
>
> Am Dienstag, 29. Mai 2012 17:57:03 UTC+2 schrieb Rafael Durán Castañeda: 
>>
>>  El 29/05/12 16:56, doniyor escribió: 
>>
>> hey guys, i need your help again,  
>>
>>  after successful deployment, i wanted to do something with database but 
>> it says: 
>> DatabaseError at /ajax/
>>
>> unable to open database file
>>
>> because ajax is trying to write something to db. what can be the problem. in 
>> my settings.py the path is this: 
>>
>>  PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
>>
>> ...
>>
>> 'NAME': os.path.join(PROJECT_PATH, 'stahlbank.db'),
>>
>>  i am using sqlite. OS is linux. 
>>
>>  thanks 
>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/qkkO9dd9C7AJ.
>> 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 options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>> I think it's just a permissions problem, did you check the user is 
>> running apache has access to the database file? Anyway, it would easier 
>> help you with a full traceback.
>>
>> HTH
>>  
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/wfrNRrc9rSoJ.
> 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 options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
> If you change the Apache user or chown your files is up to you, but Apache 
> it's not recommended (I think even it's not possible, I'm not an Apache 
> expert) running as root due to security holes. If you look again your ps 
> you probably will see something like this:
>
> root 29833 1  0 May14 ?00:00:46   /usr/sbin/apache2 -k 
> start
> www-data 15726 29833  0 May27 ?00:00:00 /usr/sbin/apache2 -k 
> start
> www-data 15781 29833  0 May27 ?00:00:04 /usr/sbin/apache2 -k 
> start
> www-data 15782 29833  0 May27 ?00:00:04 /usr/sbin/apache2 -k 
> start
>
> where the www-data user is running your web application.
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/zfL0OoG14rcJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to tell apache to see my projects database file?

2012-05-29 Thread doniyor
i did 'top', and then " ps aux | grep apache " to see. the root is running 
the apache. what should i do now? chown root folder/dbfile   , right  ? 

Am Dienstag, 29. Mai 2012 17:57:03 UTC+2 schrieb Rafael Durán Castañeda:
>
>  El 29/05/12 16:56, doniyor escribió: 
>
> hey guys, i need your help again,  
>
>  after successful deployment, i wanted to do something with database but 
> it says: 
> DatabaseError at /ajax/
>
> unable to open database file
>
> because ajax is trying to write something to db. what can be the problem. in 
> my settings.py the path is this: 
>
>  PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))
>
> ...
>
> 'NAME': os.path.join(PROJECT_PATH, 'stahlbank.db'),
>
>  i am using sqlite. OS is linux. 
>
>  thanks 
>
>  -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/qkkO9dd9C7AJ.
> 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 options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
> I think it's just a permissions problem, did you check the user is running 
> apache has access to the database file? Anyway, it would easier help you 
> with a full traceback.
>
> HTH
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/wfrNRrc9rSoJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to tell apache to see my projects database file?

2012-05-29 Thread doniyor
hey guys, i need your help again, 

after successful deployment, i wanted to do something with database but it 
says: 
DatabaseError at /ajax/

unable to open database file

because ajax is trying to write something to db. what can be the problem. in my 
settings.py the path is this: 


PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))

...

'NAME': os.path.join(PROJECT_PATH, 'stahlbank.db'),


i am using sqlite. OS is linux. 


thanks 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/qkkO9dd9C7AJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-27 Thread doniyor
okay i solved it by rendering a list of names 



Am Sonntag, 27. Mai 2012 08:07:26 UTC+2 schrieb doniyor:
>
> yeah, you are right.. now i have another html-related problem. well, now i 
> have even all html fields created thru for-loop. but now all of them have 
> the same attr value: name="prod". and now i want to refer to all of them 
> and send all as email to the buyer. how can i make reference to all field 
> names or is there a way of giving names dynamically... i am stuck cos now 
> in my view i have this line which get the data from field.. 
>
> prod = request.POST.get('prod'). but it is getting only the first value in 
> the list, because others have also the same name 'prod'. i want to get all 
> of them.. 
>
> sorry for being dumb 
>
>   
>
> Am Sonntag, 27. Mai 2012 07:40:58 UTC+2 schrieb lawgon:
>>
>> On Sat, 2012-05-26 at 07:03 -0700, doniyor wrote: 
>> > for example: user has selected 3 items from products table and then 
>> > goes to 
>> > next step where he sees what he has selected and then he submits the 
>> > booking with some last information of his personal. the  point is that 
>> > if 
>> > he has selected 3 items, then there are 3 items in db, so i create 3 
>> > html 
>> > input fields for each selected item where i will render the data that 
>> > i get 
>> > from db. thats why i want to create these html input fields according 
>> > to 
>> > the number of items in db.. 
>>
>> this is easily done with a for loop in the template 
>> -- 
>> regards 
>> Kenneth Gonsalves 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/9ttON1EogFQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-27 Thread doniyor
yeah, you are right.. now i have another html-related problem. well, now i 
have even all html fields created thru for-loop. but now all of them have 
the same attr value: name="prod". and now i want to refer to all of them 
and send all as email to the buyer. how can i make reference to all field 
names or is there a way of giving names dynamically... i am stuck cos now 
in my view i have this line which get the data from field.. 

prod = request.POST.get('prod'). but it is getting only the first value in 
the list, because others have also the same name 'prod'. i want to get all 
of them.. 

sorry for being dumb 

  

Am Sonntag, 27. Mai 2012 07:40:58 UTC+2 schrieb lawgon:
>
> On Sat, 2012-05-26 at 07:03 -0700, doniyor wrote: 
> > for example: user has selected 3 items from products table and then 
> > goes to 
> > next step where he sees what he has selected and then he submits the 
> > booking with some last information of his personal. the  point is that 
> > if 
> > he has selected 3 items, then there are 3 items in db, so i create 3 
> > html 
> > input fields for each selected item where i will render the data that 
> > i get 
> > from db. thats why i want to create these html input fields according 
> > to 
> > the number of items in db.. 
>
> this is easily done with a for loop in the template 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/xPS7sMrHncAJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-26 Thread doniyor
oh yeah. thats true, i thought, that for-loop which Kenneth proposed 
doesnot create fields but it does, so in every loop there will be a new 
html field created if i do like this: 
{% for p in products %}
  {{p.arg1}} and {{p.arg2}}
{% endfor %}

thats the easiest way, great! i was thinking totally wrong and different. 
this is exactly what i want.  

Many thanks to you and Kenneth again 

 
Am Samstag, 26. Mai 2012 23:31:48 UTC+2 schrieb Daniel Roseman:
>
> On Saturday, 26 May 2012 15:03:47 UTC+1, doniyor wrote:
>>
>> the reason why i want to do this is this: 
>>
>> the user should be able to select products from products table as many as 
>> he wants, at each selection i will save the product information in db, then 
>> the user clicks on "book" button, which leads to another book.html template 
>> where extra fields should be created for data of each selected product. 
>>
>> for example: user has selected 3 items from products table and then goes 
>> to next step where he sees what he has selected and then he submits the 
>> booking with some last information of his personal. the  point is that if 
>> he has selected 3 items, then there are 3 items in db, so i create 3 html 
>> input fields for each selected item where i will render the data that i get 
>> from db. thats why i want to create these html input fields according to 
>> the number of items in db.. 
>>
>
> But that doesn't explain why you want to do it. Say you do as you 
> describe, and you've got x separate "htmls", however that happens. What do 
> you do with them now? They're of no use unless you show them to the user. 
> So you need to somehow concatenate them and include them into a surrounding 
> HTML page. Which is exactly what Kenneth's suggestion of doing it all in 
> the template would achieve.
> --
> DR.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/pJ_YB--TsBIJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-26 Thread doniyor
the reason why i want to do this is this: 

the user should be able to select products from products table as many as 
he wants, at each selection i will save the product information in db, then 
the user clicks on "book" button, which leads to another book.html template 
where extra fields should be created for data of each selected product. 

for example: user has selected 3 items from products table and then goes to 
next step where he sees what he has selected and then he submits the 
booking with some last information of his personal. the  point is that if 
he has selected 3 items, then there are 3 items in db, so i create 3 html 
input fields for each selected item where i will render the data that i get 
from db. thats why i want to create these html input fields according to 
the number of items in db.. 

  

Am Samstag, 26. Mai 2012 11:20:57 UTC+2 schrieb Daniel Roseman:
>
> On Saturday, 26 May 2012 09:08:47 UTC+1, doniyor wrote:
>>
>> Yeah, but then i dont create htmls. What i want is to create so many 
>> htmls as the number of objects in db. Is it possible to go around the 
>> “return“ till the end of loop? Then i will have all htmls created with 
>> rendered values. Is it possible to render a html particle wihthout return 
>> statement.. I am also thinking now.. 
>>
>> Thanks man ;)
>
>
> You haven't explained why you want to do this. What are you going to do 
> with all these "htmls"? What's the point of creating them individually? 
> Where will they be used?
> --
> DR. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/UTXU9srkV6wJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-26 Thread doniyor
Is it then possible to start ajax response from view function without any ajax 
request from client-site? but i think this wont solve the problem because even 
in ajax function i need return statement right? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/jy7p-Ce7oe4J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: how to do this?

2012-05-26 Thread doniyor
Yeah, but then i dont create htmls. What i want is to create so many htmls as 
the number of objects in db. Is it possible to go around the “return“ till the 
end of loop? Then i will have all htmls created with rendered values. Is it 
possible to render a html particle wihthout return statement.. I am also 
thinking now.. 

Thanks man ;)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/wL2MBz8EmHkJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to do this?

2012-05-26 Thread doniyor
Sorry i forgot my {{ col}} and {{row}} variables in template, please assume 
that it is there, i just forgot in posting in forum.. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/MtTg173wMOcJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



how to do this?

2012-05-26 Thread doniyor
hey guys, i need again a small help. i want to create so many htmls as the 
number of objects of my model in db. i am trying, but it is stopping after 
the first creation, because i am doing render_to_response and after the 
first render_to_response it is not going to the second loop, because i 
"return",  

how is it possible? 

this is my code.
 
for p in Produkt.objects.all():
col = p.arg1
row = p.arg2
t = Template(' test ')
c = Context({'col': col, 'row':row})
html = t.render(c)
return render_to_response('book.html', {'html': html}, 
context_instance=RequestContext(request))
return render_to_response('book.html', {'titel': titel}, 
context_instance=RequestContext(request))

thanks many 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/yFqONaxfSzQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: loop over model ids ? possible ?

2012-05-25 Thread doniyor
Cool, thanks, i will play with the advices given by you guys.. I will post the 
solution that has worked for my prob.. 

Thanks thanks 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/8Xd8ykLKh7YJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



loop over model ids ? possible ?

2012-05-25 Thread doniyor
hey guys, 
i need to loop over the number of ids of objects in my db table and create 
accordingly the same number of html fields. how can i do it.. my effort is 
this: 
 numberOfIds = Produkt.objects.count()
i = 1;
for i in range(0,numberOfIds):
p = Produkt.objects.get(id=i)
#lookup in db and create html input field depending on the #of 
ids. 
i=i+1

but it says: Produkt matching query does not exist. i know, obviously it is 
not right, but how is it possible? 

thanks for help 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/E1WSc-qMWyUJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: 'Settings' object has no attribute 'ROOT_URLCONF'

2012-05-19 Thread doniyor
solved, i uninstalled both python and django and then installed them again, 
now it is working... i think it was a misunderstanding for OS as it had 
several versions of django installed several times and it got confused may 
be... anyway.. for those who will meet the problem, this advice is given.. 



Am Samstag, 19. Mai 2012 07:52:58 UTC+2 schrieb doniyor:
>
> Hi 
>
> i have this problem, i dont why, i have root_urlconf in my settings.py. i 
> cannot figure out what it wants from me.. pls help 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/aAxIsZsc08UJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: CSRF verification failed. Request aborted.

2012-05-18 Thread doniyor
as Kurtis said, you need  {% csrf_token %}  and your rendering response 
should be something like this: 
return render_to_response('index.html', {'your_key': 
your_value},context_instance=RequestContext(request))   and those your 
value will be rendered thru youe_key tag. 

here is how your form should look like: 
text = """ *{% csrf_token %}* 
 +  
  
"""  





Am Samstag, 19. Mai 2012 04:20:39 UTC+2 schrieb plogu...@yahoo.com.cn:
>
> I find a code, but the Django version is 0.9, I am using 1.4 and I am 
> a new learner, I want to run below code but report CSRF verification 
> failed. 
>
> from django.http import HttpResponse 
>
> text = """ 
>  +  name="b" value="%d"> 
>   
> """ 
>
> def index(request): 
> if request.POST.has_key('a'): 
> a = int(request.POST['a']) 
> b = int(request.POST['b']) 
> else: 
> a = 0 
> b = 0 
> return HttpResponse(text % (a, b, a + b))

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/uOi0CuZcYgcJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



'Settings' object has no attribute 'ROOT_URLCONF'

2012-05-18 Thread doniyor
Hi 

i have this problem, i dont why, i have root_urlconf in my settings.py. i 
cannot figure out what it wants from me.. pls help 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/99LNudLYYB4J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: from django.http import HttpResponse: Unresolved Import. why ?

2012-05-18 Thread doniyor
okay, i solved the problem.. ctrl + 1. and import to parent modules.. and 
thats it.. 


Am Freitag, 18. Mai 2012 22:43:17 UTC+2 schrieb doniyor:
>
> hey guys, 
>
> i am getting this error when i try to write my view. 
>
> when i import this, from django.http import HttpResponse, the word 
> HttpResponse is red error. Unresolved Import: HttpResponse. 
>
> i dont understand why. i am using python 2.7 and django1.4. what i did 
> before this is, i changed from django1.3 to django1.4. 
>
> thanks for help 
>
> doni 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1b91ZxH1-lMJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



from django.http import HttpResponse: Unresolved Import. why ?

2012-05-18 Thread doniyor
hey guys, 

i am getting this error when i try to write my view. 

when i import this, from django.http import HttpResponse, the word 
HttpResponse is red error. Unresolved Import: HttpResponse. 

i dont understand why. i am using python 2.7 and django1.4. what i did 
before this is, i changed from django1.3 to django1.4. 

thanks for help 

doni 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/-cV9hoJd5I4J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: import error: no model named .....

2012-05-18 Thread doniyor
try this 

urlpattern = patterns(' ',
url('^hello/$,hello),
)


Am Donnerstag, 17. Mai 2012 20:58:23 UTC+2 schrieb Ali Shaikh:
>
> Hey... 
>
>
> I am practicing to implement simple examples in django... 
>
> started project with 
> 1.django-admin.py startproject wikicamp 
> 2.python manage.py startapp wiki 
> 3.editing the setting 
> 4.python manage.py syncdb 
> 5.python mange.py runserver 
>
>  till this stage its working fine:) 
>
>
> But after editing urls.py and views.py ...i run the server 
> again that time its showing this error 
>
> IMMPORTERROR at .// 
>
> NO module named views...:'( 
>
>
>
>
>
> help pls.!!! 
>
> am getting 
>
> ImoprtError at //


Am Donnerstag, 17. Mai 2012 20:58:23 UTC+2 schrieb Ali Shaikh:
>
> Hey... 
>
>
> I am practicing to implement simple examples in django... 
>
> started project with 
> 1.django-admin.py startproject wikicamp 
> 2.python manage.py startapp wiki 
> 3.editing the setting 
> 4.python manage.py syncdb 
> 5.python mange.py runserver 
>
>  till this stage its working fine:) 
>
>
> But after editing urls.py and views.py ...i run the server 
> again that time its showing this error 
>
> IMMPORTERROR at .// 
>
> NO module named views...:'( 
>
>
>
>
>
> help pls.!!! 
>
> am getting 
>
> ImoprtError at //

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/ft9YSeDKMkgJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Stuck in URL............!!! Help

2012-05-18 Thread doniyor
you need something like this *^wikicamp/* separately, because even if your 
url doesnot match anything for page_name, your url is still asking 
something for *^wikicamp/at_least_something/* . 




Am Freitag, 18. Mai 2012 10:02:37 UTC+2 schrieb Ali Shaikh:
>
> Using the URLconf defined in wikicamp.urls, Django tried these URL 
> patterns, in this order: 
>
> 1. ^wikicamp/(?P[^/]+)/edit/$ 
>
> 2. ^wikicamp/(?P[^/]+)/save/$ 
>
> 3. ^wikicamp/(?P[^/]+)/$ 
>
> The current URL, wikicamp/, didn't match any of these. 
>
> --- 
>
> Any ideas? I'm admittedly lacking in the regex department... but I 
> assume this is a syntax issue due to the tutorial being for an older 
> version of Django, as I also had to use 'max_length' rather than 
> 'maxlength', as others mentioned here.Am using Django 1.4...HOw to 
> overcome this.?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/spyQ6aF_58kJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



pkg_resources.distributionnotfound django==1.3.1

2012-05-17 Thread doniyor
Hey guys, 

i am getting this error while trying the command: django-admin.py 
startproject test

can it be that i am using 2 versions of django at the same time? first what 
i did was: i wanted to install django1.4 and i did. then many errors came, 
then i switched back to django1.3, in between i did this several times, 
once with easy_install and once right from package using python setup.py 
install. now this error, i cannot figure out what is happening actually.. 
can you please help me how to delete the version of django completely from 
my OS and the reinstall it.. 

thanks 
doni 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/SsHZm_5s3UcJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Pass data from html to views.

2012-05-15 Thread doniyor
ajax is not that different from dajax.. actually almost same logic.. but 
look, i try to explain how it should work.. 

your index.html

click me

and your ajaxfunction in the head of this index.html is this. 

function ajaxfunction(){
wanted_value = $("input[name='wanted_value']").val();
 $.ajax({
url: "/ajax/",
type: "POST",
data: {value_key: wanted_value}
 }).complete(function(){
alert('ajax worked yihuu!');
});
}

and what it does is: it sends the data to /ajax/ url, and you catch it in 
your urls and forward it to your views.. then process the data and you are 
lucky.. 


 

Am Montag, 14. Mai 2012 15:19:06 UTC+2 schrieb voss:
>
> Hi Am, this sounds like a good idea, and I think it may work in my case 
> (with dajax). Thank you!
>
> I have a question, though. I know that with dajax, the data is passed to 
> the ajax views in ajax.py, and the result is then sent back to the same 
> html page. But how exactly does your method work? (I have no experience in 
> ajax.)
> For example, how do you call an ajax function and how do you link it to 
> views.py? 
>
>
> On Saturday, May 12, 2012 12:16:45 AM UTC-5, doniyor wrote:
>>
>> just after your for loop, you can call ajax function which takes the 
>> values of your newly created lists and submits this further to your view. 
>> you dont need to load the whole page and the data will silently go to your 
>> view. 
>>
>>
>>
>> Am Freitag, 11. Mai 2012 23:37:08 UTC+2 schrieb voss:
>>>
>>> Hello,
>>>
>>> I have a list that is created dynamically, and the code looks like:
>>>
>>> 
>>> ...
>>> ...
>>> for (i=0; i<array.length; i++)
>>>  {
>>>   dojo.create("li", {innerHTML: array[i]}, 
>>> dojo.byId("test"));
>>>  {
>>> 
>>>
>>> 
>>> 
>>> 
>>>
>>> How to pass the list values (i.e.,array[]) to views for further work?
>>>
>>> Thanks!  
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/sUM1WT6axzAJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: syncdb not creating columns in postgresql database

2012-05-15 Thread doniyor
sorry for bad advice.. i thought i could work,, 

Am Dienstag, 15. Mai 2012 08:52:35 UTC+2 schrieb lawgon:
>
> On Mon, 2012-05-14 at 09:06 -0700, doniyor wrote: 
> > delete your app from INSTALLED_APPS and syncdb, AND list it again in 
> > INSTALLED_APPS and syncdb again.. 
> > 
> > if it doesnot work, do this: 
> > 
> > delete your db, then syncdb, then list your app in INSTALLED_APPS and 
> > syncdb again. 
>
> this is bad advice. Syncdb will not give effect to changes within a 
> model. You need to carry out the change manually, or use a migration 
> tool like south. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/EGUFvATrjO8J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: configure FileZilla upload destination!!

2012-05-15 Thread doniyor
okay thanks, but what about just pulling from repo instead of using ftp ? 
is it also a solution for this? 



Am Dienstag, 15. Mai 2012 10:53:32 UTC+2 schrieb @timkofu:
>
> You would configure the FTP daemon to allow that, yes. I use rsync or scp 
> and make sure the user I'm SSH-ing as has RW permissions on the desired 
> folder.
>
>
> On Tue, May 15, 2012 at 9:00 AM, doniyor <doniyor@googlemail.com>wrote:
>
>> Hi Nik, thanks for help, but look, is it possible to configure the 
>> httpd.conf or anything which is responsible for upcoming files so that all 
>> files which i upload thru filezilla comes directly to that new folder i 
>> created for my djangoproject code to live? or do i have to copy files 
>> everytime from the folder which gets the uploaded files thru filezilla to 
>> my django folder? 
>>
>> thanks 
>>
>> Am Dienstag, 15. Mai 2012 03:30:10 UTC+2 schrieb Nikolas Stevenson-Molnar:
>>
>>> You'll get used to the Linux folder structure ;) 
>>>
>>> As for your problem, it sounds like your FTP user doesn't have 
>>> filesystem permissions to the folder you're trying to upload to. I would 
>>> change either owner or group for the folder. 
>>>
>>> _Nik 
>>>
>>> On 5/14/2012 6:19 PM, doniyor wrote: 
>>> > hi there, finally i got my djangoproject running on apache server 
>>> > after 3 days of thinking and googling.. i should say, linux folder 
>>> > hierarchie is sometimes not really intuitive to grasp.. 
>>> > 
>>> > my last problem though: i created a folder outside of the docroot and 
>>> > now all files are there. so good so far. but, when i try to upload 
>>> > some file thru filezilla, it says 550 could change to folder or 
>>> > something like this.. 
>>> > 
>>> > is it possible to confiure it so that i can directly upload the site 
>>> > and apache finds it? 
>>> > 
>>> > thanks 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> > Groups "Django users" group. 
>>> > To view this discussion on the web visit 
>>> > https://groups.google.com/d/**msg/django-users/-/**uyCjvXLiZ8UJ<https://groups.google.com/d/msg/django-users/-/uyCjvXLiZ8UJ>.
>>> >  
>>>
>>> > To post to this group, send email to django-users@googlegroups.com. 
>>> > To unsubscribe from this group, send email to 
>>> > django-users+unsubscribe@**googlegroups.com<django-users%2bunsubscr...@googlegroups.com>.
>>> >  
>>>
>>> > For more options, visit this group at 
>>> > http://groups.google.com/**group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>.
>>> >  
>>>
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/1ViET_nP-qgJ.
>>
>> 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 options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Skn0cOAAkrEJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: configure FileZilla upload destination!!

2012-05-15 Thread doniyor
Hi Nik, thanks for help, but look, is it possible to configure the 
httpd.conf or anything which is responsible for upcoming files so that all 
files which i upload thru filezilla comes directly to that new folder i 
created for my djangoproject code to live? or do i have to copy files 
everytime from the folder which gets the uploaded files thru filezilla to 
my django folder? 

thanks 

Am Dienstag, 15. Mai 2012 03:30:10 UTC+2 schrieb Nikolas Stevenson-Molnar:
>
> You'll get used to the Linux folder structure ;) 
>
> As for your problem, it sounds like your FTP user doesn't have 
> filesystem permissions to the folder you're trying to upload to. I would 
> change either owner or group for the folder. 
>
> _Nik 
>
> On 5/14/2012 6:19 PM, doniyor wrote: 
> > hi there, finally i got my djangoproject running on apache server 
> > after 3 days of thinking and googling.. i should say, linux folder 
> > hierarchie is sometimes not really intuitive to grasp.. 
> > 
> > my last problem though: i created a folder outside of the docroot and 
> > now all files are there. so good so far. but, when i try to upload 
> > some file thru filezilla, it says 550 could change to folder or 
> > something like this.. 
> > 
> > is it possible to confiure it so that i can directly upload the site 
> > and apache finds it? 
> > 
> > thanks 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Django users" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/django-users/-/uyCjvXLiZ8UJ. 
> > 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 options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1ViET_nP-qgJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
can you pls give me your email? 

if possible, your skype also, if you can, i would love to discuss it in 
skype.. sofar it is working now, but there are still some questions and 
hesitations... 

thanks :) 


Am Dienstag, 15. Mai 2012 07:35:44 UTC+2 schrieb lawgon:
>
> On Mon, 2012-05-14 at 06:13 -0700, doniyor wrote: 
> > hey lawgon, one more question. i did the steps. but still not 
> > working. 
> > could you please take a look into my whole project on server if i give 
> > you 
> > the access thru PuTty? 
>
>
> no problem - send me the username, password and url offlist. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/6tipstj3ErMJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



configure FileZilla upload destination!!

2012-05-14 Thread doniyor
hi there, finally i got my djangoproject running on apache server after 3 
days of thinking and googling.. i should say, linux folder hierarchie is 
sometimes not really intuitive to grasp.. 

my last problem though: i created a folder outside of the docroot and now 
all files are there. so good so far. but, when i try to upload some file 
thru filezilla, it says 550 could change to folder or something like this.. 

is it possible to confiure it so that i can directly upload the site and 
apache finds it? 

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/uyCjvXLiZ8UJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Help - Which IDE is best to use.

2012-05-14 Thread doniyor
@Aaron: you are more than right, 



Am Montag, 14. Mai 2012 19:44:35 UTC+2 schrieb Aaron C. de Bruyn:
>
> Try here: 
>
>
> https://code.djangoproject.com/wiki/DjangoResources#IntegratedDevelopmentEnvironments
>  
>
> But keep in mind, a good carpenter can work with a $5 hammer or a $50 
> hammer.  The tools don't make the developer.  (Although they can make 
> the job of a good developer easier.) 
>
> -A 
>
> On Mon, May 14, 2012 at 10:39 AM, Sandro Dutra  wrote: 
> > Again... Please search before create one more of this messages about 
> "What's 
> > IDE is best?". The best IDE is the IDE you fell confortable using. There 
> 666 
> > topics about this here, search... 
> > 
> > 
> > 2012/5/14 Eneldo Serrata  
> >> 
> >> Aptana or Eclipse with PyDev Plugin 
> >> http://pydev.org/ 
> >> 
> >> El 14/05/2012, a las 11:56, Sanjay M escribió: 
> >> 
> >> I am new to Django, and I was confused in choosing a IDE between 
> Eclipse 
> >> and aptana studio 3 to edit source code. Kindly suggest me a good one. 
> >> 
> >> Thank you in advance, 
> >> Regards, 
> >> Sanjay M 
> >> 
> >> 
> >> 
> >> -- 
> >> You received this message because you are subscribed to the Google 
> Groups 
> >> "Django users" group. 
> >> To view this discussion on the web visit 
> >> https://groups.google.com/d/msg/django-users/-/2LIdVrSuFpQJ. 
> >> 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 options, visit this group at 
> >> http://groups.google.com/group/django-users?hl=en. 
> >> 
> >> 
> >> -- 
> >> 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 options, visit this group at 
> >> http://groups.google.com/group/django-users?hl=en. 
> > 
> > 
> > -- 
> > 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 options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/IBuwOYUQasQJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Help - Which IDE is best to use.

2012-05-14 Thread doniyor
aptana is the best, free and light. 

Am Montag, 14. Mai 2012 17:56:22 UTC+2 schrieb Sanjay M:
>
> I am new to Django, and I was confused in choosing a IDE between Eclipse 
> and aptana studio 3 to edit source code. Kindly suggest me a good one. 
>
> Thank you in advance,
> Regards,
> Sanjay M
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/vKr-_2Jcv1QJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: syncdb not creating columns in postgresql database

2012-05-14 Thread doniyor
delete your app from INSTALLED_APPS and syncdb, AND list it again in 
INSTALLED_APPS and syncdb again.. 

if it doesnot work, do this: 

delete your db, then syncdb, then list your app in INSTALLED_APPS and 
syncdb again. 



Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac:
>
> Every time I edit a model and run syncdb, I get a database error telling 
> me that the column doesn't exist.
>
> *#Error Message:*
> Environment:
> Request Method: GET
> Request URL: http://127.0.0.1:8000/tickets/2/
>
> Django Version: 1.4
> Python Version: 2.7.3
> Installed Applications:
> ('django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'tickets',
>  'django.contrib.admin')
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Traceback:
> File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" 
> in get_response
>   111. response = callback(request, 
> *callback_args, **callback_kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" 
> in view
>   48. return self.dispatch(request, *args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" 
> in dispatch
>   69. return handler(request, *args, **kwargs)
> File 
> "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in 
> get
>   98. self.object = self.get_object()
> File 
> "/usr/local/lib/python2.7/dist-packages/django/views/generic/detail.py" in 
> get_object
>   49. obj = queryset.get()
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in 
> get
>   361. num = len(clone)
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in 
> __len__
>   85. self._result_cache = list(self.iterator())
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py" in 
> iterator
>   291. for row in compiler.results_iter():
> File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" 
> in results_iter
>   763. for rows in self.execute_sql(MULTI):
> File 
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py" 
> in execute_sql
>   818. cursor.execute(sql, params)
> File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py" 
> in execute
>   40. return self.cursor.execute(sql, params)
> File 
> "/usr/local/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py"
>  
> in execute
>   52. return self.cursor.execute(query, args)
>
> Exception Type: DatabaseError at /tickets/2/
> Exception Value: column tickets_ticket.picture does not exist
> LINE 1: ...icket"."description", "tickets_ticket"."ranking", "tickets_t...
>  ^
> I also noticed that when I run syncdb, It tells me that no new objects 
> were installed. 
>
> But when i do python manage.py sql tickets, I get all my objects.
> *#python mange.py sql tickets*
> BEGIN;
> CREATE TABLE "tickets_ticket" (
> "id" serial NOT NULL PRIMARY KEY,
> "title" varchar(100) NOT NULL,
> "date_created" timestamp with time zone NOT NULL,
> "description" text NOT NULL,
> "ranking" integer CHECK ("ranking" >= 0) NOT NULL,
> "picture" varchar(100) NOT NULL
> )
> ;
> COMMIT;
>
> Is there a step I'm missing? I never had this problem while using sqlite, 
> only in postgresql.
> Any help is very much appreciated.
>
>
>
>
Am Montag, 14. Mai 2012 17:54:35 UTC+2 schrieb Mac:
>
> Every time I edit a model and run syncdb, I get a database error telling 
> me that the column doesn't exist.
>
> *#Error Message:*
> Environment:
> Request Method: GET
> Request URL: http://127.0.0.1:8000/tickets/2/
>
> Django Version: 1.4
> Python Version: 2.7.3
> Installed Applications:
> ('django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'tickets',
>  'django.contrib.admin')
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Traceback:
> File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" 
> in get_response
>   111. response = callback(request, 
> *callback_args, **callback_kwargs)
> File 

PLEAASSEE HEEELPP!!!!!!!!!!!

2012-05-14 Thread doniyor
hi there, please help me, i am just right on the coast of success, but 
cannot find the clue somehow.. this is my thread:  
https://groups.google.com/forum/?hl=de#!topic/django-users/0UYopuCkvXo

my only question is: What is Docroot and what should live there? 

my page is showing the files thru some wrong configuration of httpd.conf, 
why does this thing happen? what is responsible for this? 

many many thanks.. 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/XETFl3MtkHYJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
one more thing, there are wsgi.py and example.wsgi files. are they 
equivalent or they are different files? and where should they live ? 



Am Montag, 14. Mai 2012 15:13:03 UTC+2 schrieb doniyor:
>
> hey lawgon, one more question. i did the steps. but still not working. 
> could you please take a look into my whole project on server if i give you 
> the access thru PuTty? 
>
> now, there is nothing under docroot folder. just empty. and if i open 
> browser, it is trying to show again the content of project where files are 
> downloadable, but cannot show anything because the docroot is empty. why 
> isnot it working i am burning like anything. 
>
>
>
> Am Montag, 14. Mai 2012 14:56:51 UTC+2 schrieb doniyor:
>>
>> oh okay, many thanks.. 
>>
>>
>> Am Montag, 14. Mai 2012 13:37:48 UTC+2 schrieb lawgon:
>>>
>>> On Mon, 2012-05-14 at 01:22 -0700, doniyor wrote: 
>>> > by the way, i am just on terminal, accessing the remote server via 
>>> > PuTTy. 
>>> > so i should push the whole project to some repository and pull it into 
>>> > a 
>>> > project folder on server from repository, right? 
>>>
>>> right - but do not put the sensitive parts of your settings.py in the 
>>> repository - that is the only thing you need to edit manually on site. 
>>> -- 
>>> regards 
>>> Kenneth Gonsalves 
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/5II7omyNJQUJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
hey lawgon, one more question. i did the steps. but still not working. 
could you please take a look into my whole project on server if i give you 
the access thru PuTty? 

now, there is nothing under docroot folder. just empty. and if i open 
browser, it is trying to show again the content of project where files are 
downloadable, but cannot show anything because the docroot is empty. why 
isnot it working i am burning like anything. 



Am Montag, 14. Mai 2012 14:56:51 UTC+2 schrieb doniyor:
>
> oh okay, many thanks.. 
>
>
> Am Montag, 14. Mai 2012 13:37:48 UTC+2 schrieb lawgon:
>>
>> On Mon, 2012-05-14 at 01:22 -0700, doniyor wrote: 
>> > by the way, i am just on terminal, accessing the remote server via 
>> > PuTTy. 
>> > so i should push the whole project to some repository and pull it into 
>> > a 
>> > project folder on server from repository, right? 
>>
>> right - but do not put the sensitive parts of your settings.py in the 
>> repository - that is the only thing you need to edit manually on site. 
>> -- 
>> regards 
>> Kenneth Gonsalves 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/w2zfS7D8iJsJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
oh okay, many thanks.. 


Am Montag, 14. Mai 2012 13:37:48 UTC+2 schrieb lawgon:
>
> On Mon, 2012-05-14 at 01:22 -0700, doniyor wrote: 
> > by the way, i am just on terminal, accessing the remote server via 
> > PuTTy. 
> > so i should push the whole project to some repository and pull it into 
> > a 
> > project folder on server from repository, right? 
>
> right - but do not put the sensitive parts of your settings.py in the 
> repository - that is the only thing you need to edit manually on site. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iUxAz4t0DOAJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
by the way, i am just on terminal, accessing the remote server via PuTTy. 
so i should push the whole project to some repository and pull it into a 
project folder on server from repository, right? 



Am Montag, 14. Mai 2012 09:51:23 UTC+2 schrieb doniyor:
>
> hi there, i need your help again, 
>
> i configured my httpd.conf file, i told him where is my django.wsgi file. 
> the directory is this: /usr/local/django/mysite/myproject.   What i dont 
> understand is: during configuration, do i have to 'startproject'? or will i 
> just copy my djangoproject in this 'django' folder? 
>
> and.. my question is: how does apache finds my project actually? from 
> which file? from wsgi script file? there are too many steps and docs are 
> not clean to follow. what i did is this: 
> 1) installed mod_wsgi 
> 2) installed django
> 3) i created a folder 'django' under usr/local as shown in docs. 
> 4) in this django folder i did 'django-admin.py startproject mysite'
> 5) in this 'mysite' i created a folder 'apache', and in this apache folder 
> i created my django.wsgi script file. 
> 6) then i copied my actual django project which i developed locally into 
> mysite folder. 
>
>
> can you please tell me where to put my djangosite and what is document 
> root. if i put my djangosite on documentroot, files will be downloable, so 
> where to put then??? :(( 
>
> thanks 
>
>
>
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3DLV70Ix_6oJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
so the docroot should remain as it was, right? what is actually docroot? is 
it the folder which the www needs to open the webpage? 

Am Montag, 14. Mai 2012 09:51:23 UTC+2 schrieb doniyor:
>
> hi there, i need your help again, 
>
> i configured my httpd.conf file, i told him where is my django.wsgi file. 
> the directory is this: /usr/local/django/mysite/myproject.   What i dont 
> understand is: during configuration, do i have to 'startproject'? or will i 
> just copy my djangoproject in this 'django' folder? 
>
> and.. my question is: how does apache finds my project actually? from 
> which file? from wsgi script file? there are too many steps and docs are 
> not clean to follow. what i did is this: 
> 1) installed mod_wsgi 
> 2) installed django
> 3) i created a folder 'django' under usr/local as shown in docs. 
> 4) in this django folder i did 'django-admin.py startproject mysite'
> 5) in this 'mysite' i created a folder 'apache', and in this apache folder 
> i created my django.wsgi script file. 
> 6) then i copied my actual django project which i developed locally into 
> mysite folder. 
>
>
> can you please tell me where to put my djangosite and what is document 
> root. if i put my djangosite on documentroot, files will be downloable, so 
> where to put then??? :(( 
>
> thanks 
>
>
>
>
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/lGyOg3jKm0UJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Apache and wsgi => Where to put my djangoproject files? Please Help!

2012-05-14 Thread doniyor
hi there, i need your help again, 

i configured my httpd.conf file, i told him where is my django.wsgi file. 
the directory is this: /usr/local/django/mysite/myproject.   What i dont 
understand is: during configuration, do i have to 'startproject'? or will i 
just copy my djangoproject in this 'django' folder? 

and.. my question is: how does apache finds my project actually? from which 
file? from wsgi script file? there are too many steps and docs are not 
clean to follow. what i did is this: 
1) installed mod_wsgi 
2) installed django
3) i created a folder 'django' under usr/local as shown in docs. 
4) in this django folder i did 'django-admin.py startproject mysite'
5) in this 'mysite' i created a folder 'apache', and in this apache folder 
i created my django.wsgi script file. 
6) then i copied my actual django project which i developed locally into 
mysite folder. 


can you please tell me where to put my djangosite and what is document 
root. if i put my djangosite on documentroot, files will be downloable, so 
where to put then??? :(( 

thanks 





 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/OmdC_hrKwV8J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: files are downloadable in browser because of apache conf file! help!!!

2012-05-13 Thread doniyor
yeah, you are right, i realized this after having read the official docs 
with close focus for the 3rd time.. :) 

thanks thanks.. 




Am Sonntag, 13. Mai 2012 19:41:50 UTC+2 schrieb Jani Tiainen:
>
> You should deploy django files outside www directories. That way even 
> incorrect config shouldn't reveal any actual files.
>
> On Sat, May 12, 2012 at 8:20 AM, doniyor <doniyor@googlemail.com>wrote:
>
>> hey guys, i was configuring my django project on server, in httpd.conf 
>> file. suddenly i have 500 Internal Server Error. before that i had the page 
>> where files can be just downloaded. how can i fix this? apache2.2 is 
>> running and mod_wsgi is installed. i think, i dont know how to tell apache 
>> about my mod_wsgi and djangoproject. What i now have is: 
>>
>> a folder 'apache' next to my django project folder. Apache folder has: 
>> apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, 
>> settings_production.py
>>
>> and in httpd.conf i have this (stahlhandel is my djangoproject): 
>>
>> http://85.114.145.142/>>
>> RewriteEngine On
>> RewriteLog  /usr/local/httpd/logs/**rewrite.log
>> RewriteLogLevel 2
>> RewriteMap  low int:tolower
>> RewriteMap  subdom  txt:/usr/local/httpd/conf/**
>> subdomains.lst
>> RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
>> RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
>> DocumentRoot /usr/local/httpd/htdocs/admin
>> Servername admin.afect.stahlbaron.de
>> 
>>
>> http://85.114.145.142/>>
>> ServerAdmin webmaster
>> Servername afect.stahlbaron.de
>> Serveralias www.afect.stahlbaron.de
>> DocumentRoot /usr/local/httpd/vhtdocs/**stahlbaron/stahlhandel
>> SuexecUserGroup stahlbaron stahlbaron
>> ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/**stahlbaron/cgi-bin/
>> WSGIScriptAlias / /www/vhtdocs/stahlbaron/**
>> stahlhandel/apache/lastsite.**wsgi
>> 
>> Options SymLinksIfOwnerMatch Indexes
>> AllowOverride AuthConfig
>> Allow from all
>> 
>>
>> 
>> Order deny,allow
>> Allow from all
>> 
>>
>>   ScriptAlias /php/ 
>> /usr/local/httpd/conf/php/stah**lbaron.de/<http://stahlbaron.de/>
>>   AddHandler php-cgi .php
>>   Action php-cgi /php/php.cgi
>> # DocumentRoot /usr/local/httpd/htdocs/
>># Servername afect.stahlbaron.de
>> 
>>
>> can it be that i am missing  tag or is it here not relevant? 
>>
>> thanks
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/xXizu5s--zcJ.
>> 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 options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> -- 
> Jani Tiainen
>
> - Well planned is half done, and a half done has been sufficient before...
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3RMj_-IhkWwJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: during putting my djangosite on server, i cannot restart the apache server, apachectl nor apache2 is not found. why?

2012-05-12 Thread doniyor
:D yeah you are right, i am not pro in linux world.. how can i know the 
version of linux then ? 

 

Am Samstag, 12. Mai 2012 08:01:34 UTC+2 schrieb lawgon:
>
> On Fri, 2012-05-11 at 22:54 -0700, doniyor wrote: 
> > i think, i have SuSe. 
>
> there are only about a 100 rpm based distros, I listed the most likely 
> ones. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/jikRUKGTj4IJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: during putting my djangosite on server, i cannot restart the apache server, apachectl nor apache2 is not found. why?

2012-05-11 Thread doniyor
i think, i have SuSe. 

Am Samstag, 12. Mai 2012 07:51:23 UTC+2 schrieb lawgon:
>
> On Fri, 2012-05-11 at 22:45 -0700, doniyor wrote: 
> > hey, thanks, now i can with 'service httpd restart'. 
>
> so you have redhat, fedora or centos - mention this when you ask such 
> questions. 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/T35b9GjRu_0J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: scroll to form on error

2012-05-11 Thread doniyor
cannot you 'redirect' to the whole url like this:

if form.is_valid():
  thank you page
else:
  *return redirect('http://www.test.com/form#filled') *
*
*
or you can also redirect just to /form#form/ i think... 



*
*
*
*

Am Freitag, 11. Mai 2012 23:43:50 UTC+2 schrieb brian:
>
> I have form that is toward the bottom of a web page.  If someone 
> submits some bad data, I want the page to scroll to the form. 
> Currently if the data is bad, I can see the page get refreshed and the 
> browser scrolls to the top of the screen.  When I get an error in a 
> submitted form, how do I get it to scroll to the form? 
>
> I found this [1] where it scrolls after the form is submitted.  I only 
> want it to scroll when the form has an error.  After the form is 
> submitted successfully, I redirect to a thank you page. 
>
> One idea I had in the view was to do something like: 
> - 
> if form.is_valid(): 
>   …. 
> else: 
>   return HttpResponseRedirect(request.path + '#formId') 
> - 
> The form doesn't show the error fields when I do this.  Also this 
> seems to break the MTV model since I putting the div id in the view. 
>
> Brian 
>
> [1] 
> http://stackoverflow.com/questions/3036273/django-how-do-i-position-a-page-when-using-django-templates

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/WToV2i8r1_sJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: during putting my djangosite on server, i cannot restart the apache server, apachectl nor apache2 is not found. why?

2012-05-11 Thread doniyor
hey, thanks, now i can with 'service httpd restart'. now i have another 
problem 
here<https://groups.google.com/forum/?hl=de#!topic/django-users/X9naowRbdO8>,
 
may be you can help me. 

many thanks 

Am Samstag, 12. Mai 2012 07:25:19 UTC+2 schrieb lawgon:
>
> On Thu, 2012-05-10 at 13:01 -0700, doniyor wrote: 
> > Hi there, i need a small help. as the titel says, i cannot restart 
> > the 
> > apache, i can get the version of apache, so it is there, but i cannot 
> > restart it. OS is Linux. what can be the problem, anyone has had 
> > experience 
> > with this? 
> > 
> > 
>
> there are over 200 linux distros - which one do you have? 
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7hmRipbwMAMJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



files are downloadable in browser because of apache conf file! help!!!

2012-05-11 Thread doniyor
hey guys, i was configuring my django project on server, in httpd.conf 
file. suddenly i have 500 Internal Server Error. before that i had the page 
where files can be just downloaded. how can i fix this? apache2.2 is 
running and mod_wsgi is installed. i think, i dont know how to tell apache 
about my mod_wsgi and djangoproject. What i now have is: 

a folder 'apache' next to my django project folder. Apache folder has: 
apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, 
settings_production.py

and in httpd.conf i have this (stahlhandel is my djangoproject): 

http://85.114.145.142/>>
RewriteEngine On
RewriteLog  /usr/local/httpd/logs/rewrite.log
RewriteLogLevel 2
RewriteMap  low int:tolower
RewriteMap  subdom  txt:/usr/local/httpd/conf/subdomains.lst
RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
DocumentRoot /usr/local/httpd/htdocs/admin
Servername admin.afect.stahlbaron.de


http://85.114.145.142/>>
ServerAdmin webmaster
Servername afect.stahlbaron.de
Serveralias www.afect.stahlbaron.de
DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/stahlhandel
SuexecUserGroup stahlbaron stahlbaron
ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/stahlbaron/cgi-bin/
WSGIScriptAlias / 
/www/vhtdocs/stahlbaron/stahlhandel/apache/lastsite.wsgi

Options SymLinksIfOwnerMatch Indexes
AllowOverride AuthConfig
Allow from all



Order deny,allow
Allow from all


  ScriptAlias /php/ /usr/local/httpd/conf/php/stahlbaron.de/
  AddHandler php-cgi .php
  Action php-cgi /php/php.cgi
# DocumentRoot /usr/local/httpd/htdocs/
   # Servername afect.stahlbaron.de


can it be that i am missing  tag or is it here not relevant? 

thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/xXizu5s--zcJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Pass data from html to views.

2012-05-11 Thread doniyor
just after your for loop, you can call ajax function which takes the values 
of your newly created lists and submits this further to your view. you dont 
need to load the whole page and the data will silently go to your view. 



Am Freitag, 11. Mai 2012 23:37:08 UTC+2 schrieb voss:
>
> Hello,
>
> I have a list that is created dynamically, and the code looks like:
>
> 
> ...
> ...
> for (i=0; i  {
>   dojo.create("li", {innerHTML: array[i]}, dojo.byId("test"));
>  {
> 
>
> 
> 
> 
>
> How to pass the list values (i.e.,array[]) to views for further work?
>
> Thanks!  

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/3OPt0vln_rkJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to tell Apache to see my Djangoproject??

2012-05-11 Thread doniyor
hey thanks thanks, but now i have 500 Internal Server Error. What i now 
have is: 

a folder 'apache' next to my django project folder. Apache folder has: 
apache_django_wsgi.conf, myproject.wsgi, __init__.py, urls_production.py, 
settings_production.py

and in httpd.conf i have this (stahlhandel is my djangoproject): 


RewriteEngine On
RewriteLog  /usr/local/httpd/logs/rewrite.log
RewriteLogLevel 2
RewriteMap  low int:tolower
RewriteMap  subdom  txt:/usr/local/httpd/conf/subdomains.lst
RewriteCond ${subdom:%{HTTP_HOST}}  ^(/.*)$
RewriteRule ^/(.*)$   %1/$1 [E=SUBDOM:${low:%{HTTP_HOST}}]
DocumentRoot /usr/local/httpd/htdocs/admin
Servername admin.afect.stahlbaron.de



ServerAdmin webmaster
Servername afect.stahlbaron.de
Serveralias www.afect.stahlbaron.de
DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/stahlhandel
SuexecUserGroup stahlbaron stahlbaron
ScriptAlias /cgi-bin/ /usr/local/httpd/vhtdocs/stahlbaron/cgi-bin/
WSGIScriptAlias / 
/www/vhtdocs/stahlbaron/stahlhandel/apache/lastsite.wsgi

Options SymLinksIfOwnerMatch Indexes
AllowOverride AuthConfig
Allow from all



Order deny,allow
Allow from all


  ScriptAlias /php/ /usr/local/httpd/conf/php/stahlbaron.de/
  AddHandler php-cgi .php
  Action php-cgi /php/php.cgi
# DocumentRoot /usr/local/httpd/htdocs/
   # Servername afect.stahlbaron.de


can it be that i am missing  tag or is it here not relevant? 

thanks 


Am Freitag, 11. Mai 2012 16:21:10 UTC+2 schrieb Bolkin:
>
> Sorry, supposed to be on different lines:
>  
>Order deny,allow 
>Allow from all 
> 
>
> On Friday, May 11, 2012 10:19:24 AM UTC-4, Bolkin wrote:
>>
>> It looks close enough, but try commenting out other virtual hosts to 
>> reduce noise, and also comment out:
>>
>> #DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/
>>
>> You might need to add:
>>
>>  Order 
>> deny,allow Allow from all 
>>
>>
>> On Friday, May 11, 2012 7:25:59 AM UTC-4, doniyor wrote:
>>>
>>> i solved this, but not all. now i see the folders and files downloadable 
>>> in browser instead of a webpage. Why is this? 
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/hoza4E7Err8J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: is django for me?

2012-05-11 Thread doniyor
i should say, django is the most beautiful framework for working with big 
pages also. may be it is because i like python, language is not a chaos 
language, it is clean and powerful. and django can work with flash although 
flash is a different topic from django.. 





Am Samstag, 12. Mai 2012 04:08:29 UTC+2 schrieb giraffasaurus:
>
> Hi everyone, 
>
> i recently got my first web design job and i am wondering if django is 
> the software for me. I will be working solo, doing both the graphic 
> design and the coding. 
> i am interested in django because i can already use python. The 
> commission requires something highly customised, with a lot of inbuilt 
> video and audio which can be constantly updated. 
> The only website i have designed previously was built with Flash 
> because this was the only way i could find to achieve a high degree of 
> customisation and layout animation. But many people dislike flash 
> these days, although im not really sure what the alternatives are and 
> if any of the better ones are python based. 
> Can Django integrate Flash, or some alternative animation software to 
> help create a custom layout? 
> Most of the precedents seem to be text heavy news websites quite 
> different from my brief. 
> How does it perform compared to other software, regarding multimedia 
> and data structures? 
>
> thanks for your help, 
>
> regards, 
>
> giraffasaurus. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/uto6HAtsFJUJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to tell Apache to see my Djangoproject??

2012-05-11 Thread doniyor
i solved this, but not all. now i see the folders and files downloadable in 
browser instead of a webpage. Why is this? 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1mYWF2lwFbUJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to tell Apache to see my Djangoproject??

2012-05-11 Thread doniyor
hey guys, i am stuck here.. please help me :( i cannot serve my project on 
server, it says 403  You don't have permission to access / on this server. 
this is my httpd.conf file. 


ServerAdmin webmaster
Servername afect.stahlbaron.de
Serveralias www.afect.stahlbaron.de
DocumentRoot /usr/local/httpd/vhtdocs/stahlbaron/
SuexecUserGroup stahlbaron stahlbaron
WSGIScriptAlias / 
/usr/local/httpd/vhtdocs/stahlbaron_dj/apache/lastsite.wsgi
   # DocumentRoot /usr/local/httpd/htdocs/
   # Servername afect.stahlbaron.de



DocumentRoot /usr/local/httpd/htdocs/superuser/
Servername superuser.afect.stahlbaron.de



SuexecUserGroup httpd httpd
DocumentRoot /usr/local/httpd/htdocs/mysql/
Servername mysql.afect.stahlbaron.de



SuexecUserGroup httpd httpd
DocumentRoot /www/htdocs/webftp/
Servername webftp.afect.stahlbaron.de



SuexecUserGroup httpd httpd
DocumentRoot /www/htdocs/webmail/
Servername webmail.afect.stahlbaron.de



  Servername statistik.afect.stahlbaron.de
  DocumentRoot /usr/local/httpd/statistik/stahlbaron.de


LoadModule wsgi_module modules/mod_wsgi.so
Include "/www/vhtdocs/stahlbaron_dj/apache/apache_django_wsgi.conf"

is there any mistake? i cannot figure out any more what to do. it is too 
much mass inside there in server. i have never done django deployment on 
server. what files are to change actually? 

thanks for help 

OS is Linux. Apache2.2 is running. mod_wsgi is installed. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/mJNNTVdie-UJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



FileZille Djangosite upload => 550 error: failed to change directory?? why?

2012-05-10 Thread doniyor
Hi There, finally i tried to upload my djangosite, using filezilla. but 
during upload every file upload is throwing error saying: 550 failed to 
change directory. 

what can be the reason? can it be access right which i can change thru 
chmod or so? where is the problem, in my server or in my filezilla? 

thanks 


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/5ytvvCe9WvoJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



during putting my djangosite on server, i cannot restart the apache server, apachectl nor apache2 is not found. why?

2012-05-10 Thread doniyor
Hi there, i need a small help. as the titel says, i cannot restart the 
apache, i can get the version of apache, so it is there, but i cannot 
restart it. OS is Linux. what can be the problem, anyone has had experience 
with this? 

many thanks 

doni 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/nNNbz2XORWgJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to serve staticfiles with full URL for local development?

2012-05-10 Thread doniyor
if your problem is how to serve your static files, just create a folder 
with name static in your main app, then put all of your static files and 
and your STATIC_URL is /static/. 



Am Samstag, 5. Mai 2012 15:34:47 UTC+2 schrieb e.generalov:
>
> There was a snippet to display a content of response in browser during 
> debugging  http://miniblog.glezos.com/post/3388080372/tests-browser . 
>
> "One of the first issues you might face is seeing a style-less page. 
> This happens becuase the test server isn’t really a web server, and 
> you’re probably serving static files from something relative such as 
> '/ 
> site_media'. The solution is simple: Run a separate Django server and 
> tweak your development-only static URL to something like: 
>
> STATIC_URL = 'http://localhost:8000/site_media/ 
> " 
>
> but this doesn't works anymore, because django.contrib.staticfiles 
> doesn't serve static when STATIC_URL contains full URL. 
>
> I found the node at 
> https://docs.djangoproject.com/en/dev/howto/static-files/#serving-sta... 
> : 
>
> "That's because this view is grossly inefficient and probably 
> insecure. This is only intended for local development, and should 
> never be used in production. 
>
> Additionally, when using staticfiles_urlpatterns your STATIC_URL 
> setting can't be empty or a full URL, such as http://static.example.com/.; 
>
>
> Is there a way to omit this limitation for local development? 
>
>
> (reposted from 
>
> http://groups.google.com/group/django-developers/browse_thread/thread/2dcaab0939455308/c422ab645b335513#c422ab645b335513
> )

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1jmMtcCJ4owJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: i need to place my django site on a server, i dont know how to do it! help!!!

2012-05-10 Thread doniyor
many thanks eihli, i will follow the steps you gave.. cool, i let you know 
about how it worked..  

later 
 

Am Donnerstag, 10. Mai 2012 16:13:05 UTC+2 schrieb eihli:
>
> This won't be a complete list but it's what I can remember off the top of 
> my head.
> Things to do:
> Install Python
> Install Django
> Install database software (I chose Postgres. I guess you don't need this 
> if you are using SQLite3).
> Create database and users and assign permissions.
> Install mod_wsgi.
> Edit your apache httpd.conf file to use mod_wsgi: 
> http://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide
> If you are using apache to serve static html files (like your .css or 
> image files) then you'll need to add an Alias to your apache config. 
> Something like: Alias /myproject/static/ 
> /var/www/djangoapps/myproject/media/static
>
> Here are some links I bookmarked while trying to set up a VPS with Django:
>
> http://www.epicserve.com/blog/2011/nov/3/ubuntu-server-setup-guide-django-websites/
>  
>
> http://bailey.st/blog/2012/05/02/ubuntu-django-postgresql-and-nginx-a-rock-solid-web-stack/
>  
>
> http://blog.kevin-whitaker.net/post/725558757/running-django-with-postgres-nginx-and-fastcgi-on
>  
>
> http://brandonkonkle.com/blog/2010/jun/25/provisioning-new-ubuntu-server-django/
>  
>
>
>
> On Thursday, 10 May 2012 07:23:11 UTC-5, doniyor wrote:
>>
>> Hi there, 
>>
>> i need a small help: i have a django site, which is ready to test. now i 
>> talked to a hosting service, they had only php and mysql supporting server, 
>> but not django. they gave me a virtual server, where i can install django 
>> and put my site there. now i am stuck. i dont know how to install django on 
>> server and which python modules to install that run my site and where to 
>> install. is there any list of steps to do this kind of job? it would be 
>> very helpful. i just dont find a clue where to start. what i understand is: 
>> apache is webserver and it is there on server. so i need some module that 
>> supports python, right? i decided for mod_wsgi. i dont know why i decided 
>> for this. before that i installed easy_install then i installed all python 
>> packages including django. now when i log in to server thru Putty including 
>> switching to root, i land to: domainname: /www/vhtdocs/domainname # and 
>> this folder has some html files of my old site. they just copied from old 
>> server to this virtual one. now the question is: is it the place where i 
>> can just upload my whole django-site? 
>>
>> i would be very thanksful for some instructions.. 
>>
>> thanks thanks.
>>
>> Doni 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/n7QkL8SrRTYJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



i need to place my django site on a server, i dont know how to do it! help!!!

2012-05-10 Thread doniyor
Hi there, 

i need a small help: i have a django site, which is ready to test. now i 
talked to a hosting service, they had only php and mysql supporting server, 
but not django. they gave me a virtual server, where i can install django 
and put my site there. now i am stuck. i dont know how to install django on 
server and which python modules to install that run my site and where to 
install. is there any list of steps to do this kind of job? it would be 
very helpful. i just dont find a clue where to start. what i understand is: 
apache is webserver and it is there on server. so i need some module that 
supports python, right? i decided for mod_wsgi. i dont know why i decided 
for this. before that i installed easy_install then i installed all python 
packages including django. now when i log in to server thru Putty including 
switching to root, i land to: domainname: /www/vhtdocs/domainname # and 
this folder has some html files of my old site. they just copied from old 
server to this virtual one. now the question is: is it the place where i 
can just upload my whole django-site? 

i would be very thanksful for some instructions.. 

thanks thanks.

Doni 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/6eGZVixF1CYJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ajax call says: "NetworkError: 500 INTERNAL SERVER ERROR - http://127.0.0.1:8000/ajax/"

2012-05-05 Thread doniyor
great, thanks man. i didnot see it. 




Am Samstag, 5. Mai 2012 09:50:37 UTC+2 schrieb Alexandr Aibulatov:
>
> Your view should return an HttpResponse Object. Your view prints 
> 'test' and returns NoneType Object. 
> Yours view should be like this: 
>
> from django.http import HttpResponse 
>
> def ajax(request): 
>   return HttpResponse('test', mimetype="text/plain") 
>
> 2012/5/5 doniyor <doniyor@googlemail.com>: 
> > hi there, 
> > i have a small problem. i googled a lot, but couldnot find anything 
> which 
> > helps me. 
> > 
> > i have $.ajax call and before that i have included the js file where i 
> have 
> > that csrf-protection code from djangodocs. 
> > 
> > here is my ajax call: http://dpaste.com/hold/743156/ 
> > 
> > but once i click on the event, i get this error: "NetworkError: 500 
> INTERNAL 
> > SERVER ERROR - http://127.0.0.1:8000/ajax/;. 
> > my urls.py has: url(r'^ajax/', 'home.views.ajax'), 
> > 
> > and my ajax function is simply: 
> > 
> > def ajax(request): 
> > print 'test' 
> > 
> > i dont have any clues why this is happening. can someone please help me? 
> > 
> > many many thanks 
> > 
> > 
> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/django-users/-/1Y1E6RZOc7wJ. 
> > 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 options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/KN0ny68N3UYJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



ajax call says: "NetworkError: 500 INTERNAL SERVER ERROR - http://127.0.0.1:8000/ajax/"

2012-05-05 Thread doniyor
hi there, 
i have a small problem. i googled a lot, but couldnot find anything which 
helps me. 

i have $.ajax call and before that i have included the js file where i have 
that csrf-protection code from djangodocs. 

here is my ajax call: http://dpaste.com/hold/743156/

but once i click on the event, i get this error: "NetworkError: 500 
INTERNAL SERVER ERROR - http://127.0.0.1:8000/ajax/;. 
my urls.py has: url(r'^ajax/', 'home.views.ajax'),

and my ajax function is simply: 

def ajax(request):
print 'test'

i dont have any clues why this is happening. can someone please help me? 

many many thanks 


 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/1Y1E6RZOc7wJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dajaxice is not defined!!! please heelpppp!! :(

2012-05-04 Thread doniyor
if i call the dajaxice.core.js directly from address bar, it shows an error 
saying: ValueError at /dajaxice/dajaxice.core.js The view home.views.index 
didn't return an HttpResponse object.

so it means, i am serving dajaxice.core.js in a wrong way, right? 



Am Freitag, 4. Mai 2012 16:54:40 UTC+2 schrieb doniyor:
>
> hi 
> here is the url of dajaxice in my settings.py. url(r'^%s/' % 
> settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),
>
> it is so as given in the docs. or should i configure something somewhere? 
>  it seems that the problem is here.. 
>
>
>
> Am Freitag, 4. Mai 2012 10:10:25 UTC+2 schrieb doniyor:
>>
>> Hey, thanks, i will try today and let you know. Actually, i did just the 
>> same things shown in installation guide. It cannot find it thru this 
>> 127.0.0.1:8000/dajaxice/dajaxice.core.js  link. 
>>
>> What was the problem in your case?
>>
>> Thanks many
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/NnscECc9jhkJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dajaxice is not defined!!! please heelpppp!! :(

2012-05-04 Thread doniyor
hi 
here is the url of dajaxice in my settings.py. url(r'^%s/' % 
settings.DAJAXICE_MEDIA_PREFIX, include('dajaxice.urls')),

it is so as given in the docs. or should i configure something somewhere? 
 it seems that the problem is here.. 



Am Freitag, 4. Mai 2012 10:10:25 UTC+2 schrieb doniyor:
>
> Hey, thanks, i will try today and let you know. Actually, i did just the 
> same things shown in installation guide. It cannot find it thru this 
> 127.0.0.1:8000/dajaxice/dajaxice.core.js  link. 
>
> What was the problem in your case?
>
> Thanks many
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/tCiaajfdH4sJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dajaxice is not defined!!! please heelpppp!! :(

2012-05-04 Thread doniyor
Hey, thanks, i will try today and let you know. Actually, i did just the same 
things shown in installation guide. It cannot find it thru this 
127.0.0.1:8000/dajaxice/dajaxice.core.js  link. 

What was the problem in your case?

Thanks many

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7cRGVzDVr9YJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Dajaxice is not defined!!! please heelpppp!! :(

2012-05-03 Thread doniyor
hey, 
i did what you told me. i put the dajaxice.core.js in one nude html file, 
where i dont have other js files almost, then i opened the js console and i 
have done the input "Dajaxice", then it stil says there, 

ReferenceError: Dajaxice is not defined
   

Dajaxice


look, i hope, i am taking the up-to-date dajaxice.core.js file, since it is 
from the official dajaxproject site.. i have both dajaxice and dajax also 
in my settings.py. i took it out and tested, error message, so it means, it 
was right in settings.py. i am now thinking about using only jquery-ajax to 
get the work done. is it possible in this way? i can get the form values 
sent by jquery in my view without loading the page, this is actually what i 
wanted to do with dajax. is it a good go-around for the problem? 

thanks 



Am Donnerstag, 3. Mai 2012 21:04:33 UTC+2 schrieb Kurtis:
>
> Hey,
>
> Try taking a practically-empty HTML page that only includes that 
> dajaxice.core.js file. Open up Firebug or some other Javascript console and 
> type in "Dajaxice;" to see if you get the same error. This definitely 
> sounds like a javascript problem since you're getting a "Dajaxice is not 
> defined" error.
>
> As far as the other problem (Missing file), read up the docs on serving 
> Static Media with the Django runserver. You need to make sure dajax is 
> included in your settings.py as an application. That's most likely a whole 
> different problem from the "Dajaxice is not defined" issue.
>
> On Thu, May 3, 2012 at 2:01 PM, doniyor <doniyor@googlemail.com>wrote:
>
>> Hi There, i need really your help 
>>
>> i have been having this problem since 3 days.. it is really annoying me, 
>> i dont know why it is happening. The Problem is: 
>>
>> i am trying to use dajax in my page and i followed all steps several 
>> times as given hier: http://dajaxproject.com/
>>
>> but once i click on onclick="Dajaxice.home.**randomize(Dajax.process), 
>> nothing is happening and i saw in console of firefox, there it says, 
>> "Dajaxice is not defined". but i included the {% dajaxice_js_import %} in 
>> the head, and even i linked the dajaxice.core.js file statically from my 
>> STATIC_URL. but it still says the same error. how can i go around this 
>> problem? is there any way of getting this work? 
>>
>> when i link this {% dajaxice_js_import %} in the head, it says the error 
>> in console: *"NetworkError: 500 INTERNAL SERVER ERROR-
>> http://127.0.0.1:8000/dajaxice/dajaxice.core.js"*  
>> when i delete this  {% dajaxice_js_import %} and serve statically from 
>> dajaxice.core.js file from STATIC_URL, it shows nothing in console, but 
>> once i click on onlick event, it says: *Dajaxice is not defined*
>> *
>> *
>> {% dajaxice_js_import %} this will look for dajaxice.core.js in dajaxice 
>> folder in site-packages, right? the file is there, why it cannot find the 
>> Dajaxice object? 
>>
>> thanks for help in advance, 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/UGUTBZj9O_4J.
>> 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 options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/w3WjwsCwpdEJ.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Dajaxice is not defined!!! please heelpppp!! :(

2012-05-03 Thread doniyor
Hi There, i need really your help 

i have been having this problem since 3 days.. it is really annoying me, i 
dont know why it is happening. The Problem is: 

i am trying to use dajax in my page and i followed all steps several times 
as given hier: http://dajaxproject.com/

but once i click on onclick="Dajaxice.home.randomize(Dajax.process), 
nothing is happening and i saw in console of firefox, there it says, 
"Dajaxice is not defined". but i included the {% dajaxice_js_import %} in 
the head, and even i linked the dajaxice.core.js file statically from my 
STATIC_URL. but it still says the same error. how can i go around this 
problem? is there any way of getting this work? 

when i link this {% dajaxice_js_import %} in the head, it says the error in 
console: *"NetworkError: 500 INTERNAL SERVER ERROR-
http://127.0.0.1:8000/dajaxice/dajaxice.core.js"*  
when i delete this  {% dajaxice_js_import %} and serve statically from 
dajaxice.core.js file from STATIC_URL, it shows nothing in console, but 
once i click on onlick event, it says: *Dajaxice is not defined*
*
*
{% dajaxice_js_import %} this will look for dajaxice.core.js in dajaxice 
folder in site-packages, right? the file is there, why it cannot find the 
Dajaxice object? 

thanks for help in advance, 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/UGUTBZj9O_4J.
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
hey Amao, great help :))) i really didnot see this dummy mistake..
thanks great and chrs

On 4 Mrz., 15:53, Amao Zhao <amaoz...@gmail.com> wrote:
> the APP_INSTALLS in your settings.py is a list. please recheck your 'filer'
> and so no.
> 在 2012-3-4 下午10:07,"doniyor" <doniyor@googlemail.com>写道:
>
>
>
>
>
>
>
> > Hi there,
>
> > i need your help, i am trying to setup cms of my webpage, but
> > everytime i run the "python manage.py syncdb" the error comes:
> > django.core.exceptions.ImproperlyConfigured: ImportError filer
> > cmsplugin_filer_image : no module named filer
> > cmsplugin_filer_image
>
> > i have installed all possible django-cms plugins, i have django 1.3.1
> > running and python 2.7.
>
> > why is this error, as a result i dont have a available plugins in
> > cmspage to select.
>
> > please help me, is it a django version problem ?
>
> > this is my settings.py:
>
> >http://pastebin.com/K0VaK62K
>
> > thanks alot..
>
> > --
> > 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 options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
by the way, i am using django-cms-2.2

On 4 Mrz., 15:07, doniyor <doniyor@googlemail.com> wrote:
> Hi there,
>
> i need your help, i am trying to setup cms of my webpage, but
> everytime i run the "python manage.py syncdb" the error comes:
> django.core.exceptions.ImproperlyConfigured: ImportError filer
> cmsplugin_filer_image : no module named filer
> cmsplugin_filer_image
>
> i have installed all possible django-cms plugins, i have django 1.3.1
> running and python 2.7.
>
> why is this error, as a result i dont have a available plugins in
> cmspage to select.
>
> please help me, is it a django version problem ?
>
> this is my settings.py:
>
> http://pastebin.com/K0VaK62K
>
> thanks alot..

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django-cms plugins - ImportError no module named: cmsplugin_filer_file....

2012-03-04 Thread doniyor
Hi there,

i need your help, i am trying to setup cms of my webpage, but
everytime i run the "python manage.py syncdb" the error comes:
django.core.exceptions.ImproperlyConfigured: ImportError filer
cmsplugin_filer_image : no module named filer
cmsplugin_filer_image


i have installed all possible django-cms plugins, i have django 1.3.1
running and python 2.7.

why is this error, as a result i dont have a available plugins in
cmspage to select.

please help me, is it a django version problem ?

this is my settings.py:

http://pastebin.com/K0VaK62K

thanks alot..

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Using query set in views.py

2012-02-27 Thread doniyor
yes, as Ian said, you need name attr in your input so that you can
navigate to the real string input the user gives..



On 27 Feb., 08:38, Ian Clelland  wrote:
> On Sunday, February 26, 2012, Stanwin Siow wrote:
> > Ok disregard my previous question.
>
> > Here's the latest one.
>
> > I have the following form in my HTML:
> > * *
> > * Keyword: *
> > * *
>
> Your immediate problem here is that your  element has an id, but no
> name attribute. That is why you are getting None when you try to retrieve
> it from the POST dictionary -- the browser never sent it to the server.
>
> I'm certain that you have additional issues with your view function, but
> this is the reason for the error that you are seeing right now.
>
> Ian
>
>
>
>
>
>
>
>
>
> > * *
> > * *
> > * *
>
> > when the user presses the submit button, it will go to the method
> > keyword_subscribe in views.py
>
> > The method is as shown:
>
> > *def keyword_subscribe(request):*
> > *    if request.POST:*
> > * username = UserProfile.objects.all()*
> > * #userid = username.objects.all()*
> > *    subscription_days = "7"*
> > * new_keyword = request.POST.get('myTextField')*
> > * print new_keyword*
> > *    new_keyword_subscribed =
> > subscribe_keyword(username,subscription_days,new_keyword)        *
> > *                                                *
> > *        response = simplejson.dumps({'new_keyword':
> > new_keyword_subscribed})       *
> > * print new_keyword_subscribed                                      *
> > *    else:*
> > *       # html = form.errors.as_ul()*
> > *        response = simplejson.dumps({'success':'False'})*
> > * return HttpResponseRedirect("/accounts/login/")*
> > *    #if request.is_ajax():*
> > *     #   return HttpResponse(response, mimetype='application/json')*
> > *    #else:*
> > *     #   return HttpResponseRedirect("/")*
>
> > Once in this method, i'm supposed to extract the word which the user
> > entered in the textfield and store it in a variable called new_keyword
>
> > However, i've been getting NONE which means there's something wrong
> > somewhere and i do hope someone can help me.
>
> > In addition, i would like to get the username which is stored in the
> > UserProfile table in my database to be passed as a parameter to the next
> > function too.
>
> > How then do i implement the queryset needed?
>
> > This should be clearer.
>
> > Thank you.
>
> > Best Regards,
>
> > Stanwin Siow
>
> > On Feb 26, 2012, at 6:25 PM, Daniel Roseman wrote:
>
> > Your question is not at all clear. You can use whatever you like in your
> > view. What problem are you having?
> > --
> > DR.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To view this discussion on the web visit
> >https://groups.google.com/d/msg/django-users/-/1N2Cz2nv9wQJ.
> > To post to this group, send email to 
> > django-users@googlegroups.com > 'django-users@googlegroups.com');>
> > .
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com  > 'django-users+unsubscr...@googlegroups.com');>.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> >  --
> > 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 > 'django-users@googlegroups.com');>
> > .
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com  > 'django-users%2bunsubscr...@googlegroups.com');>.
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Regards,
> Ian Clelland
> 

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to come to #anchor After Form Submit with message rendering..

2012-02-26 Thread doniyor
oh okay, i will try it... there are jquery ajax form submit versions
too, but it is a good idea

thanks

On 26 Feb., 15:30, bb6xt  wrote:
> Hi,
> You could also pass a variable in the response's dictionary and use
> javascript to check this variable and navigate appropriately. This
> variable should indicate if postback or new request.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to come to #anchor After Form Submit with message rendering..

2012-02-25 Thread doniyor
hey Lokesh,

good point, i didnot think about this.. thanks..



On 25 Feb., 19:30, lokesh <slokesh...@gmail.com> wrote:
> hi,
>
>   You should use .ajax() to submit your form.That way your page does
> not load and you need not worry about where the page is pointing.
>
> Lokesh
>
> On Feb 25, 3:03 am, doniyor <doniyor@googlemail.com> wrote:
>
>
>
>
>
>
>
> > hi there,
> > i have a small problem...
>
> > i am rendering a success message "Registration Done!" to the site, i
> > am able to do it, but after submisson, the browser goes to the
> > startposition, not to the place where i filled out the registration
> > form.. how can i go to this part of the page directly after submission
> > with rendering this message next to registration field. here is my
> > view function..
>
> > 
> > def register(request):
> >     name = request.GET.get('name')
> >     surname = request.GET.get('surname')
> >     email = request.GET.get('email')
> >     geb = request.GET.get('geb')
> >     addr = request.GET.get('addr')
> >     plz = request.GET.get('plz')
> >     country = request.GET.get('country')
> >     tel = request.GET.get('tel')
>
> >     user = User(u_name = name, u_nachname=surname, u_email=email,
> > u_birth=geb, u_addr=addr, u_plz=plz, u_country=country, u_tel=tel)
> >     user.save()
>
> >     success = "Registration Done!"
> >     return render_to_response('index.html', {'registered':
> > success},context_instance=RequestContext(request))
> > 
>
> > is it possible to give some another parameter to render_to_response
> > indicating the url ?
>
> > thanks for help !

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to come to #anchor After Form Submit with message rendering..

2012-02-25 Thread doniyor
hi there,
i have a small problem...

i am rendering a success message "Registration Done!" to the site, i
am able to do it, but after submisson, the browser goes to the
startposition, not to the place where i filled out the registration
form.. how can i go to this part of the page directly after submission
with rendering this message next to registration field. here is my
view function..


def register(request):
name = request.GET.get('name')
surname = request.GET.get('surname')
email = request.GET.get('email')
geb = request.GET.get('geb')
addr = request.GET.get('addr')
plz = request.GET.get('plz')
country = request.GET.get('country')
tel = request.GET.get('tel')

user = User(u_name = name, u_nachname=surname, u_email=email,
u_birth=geb, u_addr=addr, u_plz=plz, u_country=country, u_tel=tel)
user.save()

success = "Registration Done!"
return render_to_response('index.html', {'registered':
success},context_instance=RequestContext(request))


is it possible to give some another parameter to render_to_response
indicating the url ?

thanks for help !

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Server impacts path-rules ???

2012-02-04 Thread doniyor
now i created a folder named static and put all my media resource
there.

the change is here:
-- transfer
 -- contact (das ist app)
 -- __init__
 -- models.py
 -- tests.py
 -- views.py
 -- static
 -- js
 -- images
 -- css
 -- template
 -- index.html
 -- transfer
 -- __init__
 -- settings.py
 -- urls.py
 -- wsgi.py



On 5 Feb., 06:02, doniyor <doniyor@googlemail.com> wrote:
> can you please take a look, here is my 
> settings.py.http://pastebin.com/GSUb2k2e
> thanks
>
> On 5 Feb., 05:58, doniyor <doniyor@googlemail.com> wrote:
>
>
>
>
>
>
>
> > yes, but here you see:
> > For local development, if you are using runserver or adding
> > staticfiles_urlpatterns to your URLconf, you’re done with the setup –
> > your static files will automatically be served at the default (for
> > newly created projects) STATIC_URL of /static/.
>
> > On 4 Feb., 19:58, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
> > > On Saturday, 4 February 2012 18:48:08 UTC, doniyor wrote:
>
> > > > Hi everyone,
>
> > > > i have a small problem which makes me worry. i have a normal html file
> > > > with fotos to see in. and i have created a project and started the
> > > > server with "manage.py runserver". this is the point! :
>
> > > > if i open the html file just normal from the folder by doubleclick,
> > > > the browser shows the page very perfectly with fotos and so. just as
> > > > normal..
>
> > > > but my problem is that if i start the server and open the index.html
> > > > in my 127.0.0.1:8000, i see only text and no fotos are there. fotos
> > > > are even not downloadable, so the media resource is not reachable, but
> > > > why ? from the folder it finds the resources but not in
> > > > 127.0.0.1:8000.
>
> > > > i will give my actual case here:
>
> > > > this is the project hierarchie i have:
>
> > > > -- transfer
> > > >  -- contact (das ist app)
> > > >      -- __init__
> > > >      -- models.py
> > > >      -- tests.py
> > > >      -- views.py
> > > >  -- media
> > > >      -- js
> > > >      -- images
> > > >      -- css
> > > >  -- template
> > > >      -- index.html
> > > >  -- transfer
> > > >      -- __init__
> > > >      -- settings.py
> > > >      -- urls.py
> > > >      -- wsgi.py
>
> > > >   and how i give the src path in my index.html is here:
> > > >  > > > media="all">
>
> > > > can you please help me with that, is it possible that django 1.4 looks
> > > > for path differently from last ones.. ?
>
> > > > thanks
> > > > doni
>
> > > Have you set anything up to serve media and images? Have you looked at the
> > > documentation on how to do that?
> > >  https://docs.djangoproject.com/en/1.3/howto/static-files/
> > > --
> > > DR.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Server impacts path-rules ???

2012-02-04 Thread doniyor
can you please take a look, here is my settings.py.
http://pastebin.com/GSUb2k2e
thanks

On 5 Feb., 05:58, doniyor <doniyor@googlemail.com> wrote:
> yes, but here you see:
> For local development, if you are using runserver or adding
> staticfiles_urlpatterns to your URLconf, you’re done with the setup –
> your static files will automatically be served at the default (for
> newly created projects) STATIC_URL of /static/.
>
> On 4 Feb., 19:58, Daniel Roseman <dan...@roseman.org.uk> wrote:
>
>
>
>
>
>
>
> > On Saturday, 4 February 2012 18:48:08 UTC, doniyor wrote:
>
> > > Hi everyone,
>
> > > i have a small problem which makes me worry. i have a normal html file
> > > with fotos to see in. and i have created a project and started the
> > > server with "manage.py runserver". this is the point! :
>
> > > if i open the html file just normal from the folder by doubleclick,
> > > the browser shows the page very perfectly with fotos and so. just as
> > > normal..
>
> > > but my problem is that if i start the server and open the index.html
> > > in my 127.0.0.1:8000, i see only text and no fotos are there. fotos
> > > are even not downloadable, so the media resource is not reachable, but
> > > why ? from the folder it finds the resources but not in
> > > 127.0.0.1:8000.
>
> > > i will give my actual case here:
>
> > > this is the project hierarchie i have:
>
> > > -- transfer
> > >  -- contact (das ist app)
> > >      -- __init__
> > >      -- models.py
> > >      -- tests.py
> > >      -- views.py
> > >  -- media
> > >      -- js
> > >      -- images
> > >      -- css
> > >  -- template
> > >      -- index.html
> > >  -- transfer
> > >      -- __init__
> > >      -- settings.py
> > >      -- urls.py
> > >      -- wsgi.py
>
> > >   and how i give the src path in my index.html is here:
> > >  > > media="all">
>
> > > can you please help me with that, is it possible that django 1.4 looks
> > > for path differently from last ones.. ?
>
> > > thanks
> > > doni
>
> > Have you set anything up to serve media and images? Have you looked at the
> > documentation on how to do that?
> >  https://docs.djangoproject.com/en/1.3/howto/static-files/
> > --
> > DR.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django Server impacts path-rules ???

2012-02-04 Thread doniyor
yes, but here you see:
For local development, if you are using runserver or adding
staticfiles_urlpatterns to your URLconf, you’re done with the setup –
your static files will automatically be served at the default (for
newly created projects) STATIC_URL of /static/.



On 4 Feb., 19:58, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Saturday, 4 February 2012 18:48:08 UTC, doniyor wrote:
>
> > Hi everyone,
>
> > i have a small problem which makes me worry. i have a normal html file
> > with fotos to see in. and i have created a project and started the
> > server with "manage.py runserver". this is the point! :
>
> > if i open the html file just normal from the folder by doubleclick,
> > the browser shows the page very perfectly with fotos and so. just as
> > normal..
>
> > but my problem is that if i start the server and open the index.html
> > in my 127.0.0.1:8000, i see only text and no fotos are there. fotos
> > are even not downloadable, so the media resource is not reachable, but
> > why ? from the folder it finds the resources but not in
> > 127.0.0.1:8000.
>
> > i will give my actual case here:
>
> > this is the project hierarchie i have:
>
> > -- transfer
> >  -- contact (das ist app)
> >      -- __init__
> >      -- models.py
> >      -- tests.py
> >      -- views.py
> >  -- media
> >      -- js
> >      -- images
> >      -- css
> >  -- template
> >      -- index.html
> >  -- transfer
> >      -- __init__
> >      -- settings.py
> >      -- urls.py
> >      -- wsgi.py
>
> >   and how i give the src path in my index.html is here:
> >  > media="all">
>
> > can you please help me with that, is it possible that django 1.4 looks
> > for path differently from last ones.. ?
>
> > thanks
> > doni
>
> Have you set anything up to serve media and images? Have you looked at the
> documentation on how to do that?
>  https://docs.djangoproject.com/en/1.3/howto/static-files/
> --
> DR.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django Server impacts path-rules ???

2012-02-04 Thread doniyor
Hi everyone,

i have a small problem which makes me worry. i have a normal html file
with fotos to see in. and i have created a project and started the
server with "manage.py runserver". this is the point! :

if i open the html file just normal from the folder by doubleclick,
the browser shows the page very perfectly with fotos and so. just as
normal..

but my problem is that if i start the server and open the index.html
in my 127.0.0.1:8000, i see only text and no fotos are there. fotos
are even not downloadable, so the media resource is not reachable, but
why ? from the folder it finds the resources but not in
127.0.0.1:8000.

i will give my actual case here:

this is the project hierarchie i have:

-- transfer
 -- contact (das ist app)
 -- __init__
 -- models.py
 -- tests.py
 -- views.py
 -- media
 -- js
 -- images
 -- css
 -- template
 -- index.html
 -- transfer
 -- __init__
 -- settings.py
 -- urls.py
 -- wsgi.py

  and how i give the src path in my index.html is here:


can you please help me with that, is it possible that django 1.4 looks
for path differently from last ones.. ?

thanks
doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Images in html nicht erreichbar durch Django server warum ???

2012-02-04 Thread doniyor
Hallo zusammen,

ich habe kleines problem mit pfadangabe. ich habe eine ganz normale
einfache index.html mit bilder drin. ich projekt angelegt in django
mit Aptana. Also mein problem taucht da auf wenn ich die Seite
aufmache.

1) wenn ich die index.html vom Ordner aus direkt mit doppelklick
aufmache, ist alles in ordnung, bilder sind da und alles perfekt.

2) aber wenn ich mit manage.py runserver mache und in localhost
aufmache die seite, dann ich sehe keine bilder, anstatt bilder sind
komische platzhalter vom bild, wenn ich das zeig durch rechte
maustaste "bild speichern" mache, dann speichert er zwar irgendwas,
aber das bild ist nicht da.

woran kann es liegen ?

ich geb mal ganze hierarchie hier an:

-transfer
  - contact (das ist app)
 - __init__
 - models.py
 - tests.py
 - views.py
  - media
 - js
 - images
 - css
  - template
 - index.html
  - transfer
 - __init__
 - settings.py
 - urls.py
 - wsgi.py


z,b, in index.html habe ich so getaggt das bild
  


bitte um Hilfe !!

Doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: "app_index.html" = i want to be in admin...

2011-08-20 Thread doniyor
thanks but these links are not for overriding the app_index.html in
order to show the APP in adminsite. i know how to override a template
but dont know how to override APP_INDEX.html which is supposed to show
my app in adminsite.

thanks for help in advance..



On 20 Aug., 04:31, Nan  wrote:
> > where should i change
>
> https://docs.djangoproject.com/en/dev/topics/templates/#template-inhe...
>
> > and where to put this file..?
>
> https://docs.djangoproject.com/en/dev/ref/templates/api/#loader-types

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



"app_index.html" = i want to be in admin...

2011-08-19 Thread doniyor
hi there,

i have a litle problem in bringing my app to admin. the thing is, i
dont use models, so the talk about 'setting.py' would be wasty. what i
dont understand is how to override the app_index.html and where to put
it sothat my app can be seen in admin page..

i give the code of app_index.html

{% extends "admin/index.html" %}
{% load i18n %}
{% if not is_popup %}

{% block breadcrumbs %}

{% trans "HOME" %}
{% for app in app_list %}
{% blocktrans with app.name as name %} {{ name }} {% endblocktrans %}
{% endfor %}{% endblock %}

{% endif %}
{% block sidebar %}{% endblock %}

where should i change and where to put this file..?

best thanks,

doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



custom template tag. success message after form-submit in the same .html file

2011-08-15 Thread doniyor
Hi There,

I am heading well now, but have still some confusing things here..

this is my html file, where i want to get a success message after the
form is submitted:

__

{% load forms %}
{% if submitted %}
{{ success }}
{% else %}

{% endif %}
Clear cache:  Cache leeren 

-
this is my def  in templatetags folder:

success = 'Cache erfolgreich geleert'

def submitted(self):
if request.method == 'GET':
return True

register.tag('submitted', submitted)





BUT i dont see anything after submission of the form. where is my
mistake, can you please help ?,

thanks in advance..

Doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template tag: how to output success message above input field

2011-08-14 Thread doniyor
oh thats right, thanks man

On 14 Aug., 12:18, Andrew <andrew.mark.sc...@gmail.com> wrote:
> I use the messages framework (https://docs.djangoproject.com/en/dev/
> ref/contrib/messages/#module-django.contrib.messages) to display
> messages after handling a post. My base template displays the messages
> meaning I can redirect to any page after the post and know that the
> message will be displayed. You could process the post and redirect
> back to the page containing the form if you want to.
>
> Regards,
> Andrew
>
> On Aug 14, 5:52 pm, doniyor <doniyor@googlemail.com> wrote:
>
>
>
>
>
>
>
> > Hey Guys,
>
> > i need a litle help in working with forms. i have a button and i want
> > to output a success text above the button if the user presses the
> > button. how to do this ? is there any template tag like  {% if
> > form.is_submitted %} or so?
>
> > main point is that i dont want to write another html file only to show
> > the success message.
>
> > thanks in advance..
>
> > Doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Template tag: how to output success message above input field

2011-08-14 Thread doniyor
thank you much,

but let me ask you again in detail.

i have this html:


  
Cache leeren:   Cache clear 


and this view:

def clear_it(request):
b = Command()
b.clear_cache()
#
# here i dont know what to write...
#
#
success_msg = 'Cache cleared successfull'
return render_to_response('clicks/index.html')

thanks again for help,

Doni





On 14 Aug., 10:53, Subhranath Chunder <subhran...@gmail.com> wrote:
> Setting a simple context variable in your view would solve your purpose.
>
> Thanks,
> Subhranath Chunder.www.subhranath.com
>
>
>
>
>
>
>
>
>
> On Sun, Aug 14, 2011 at 1:22 PM, doniyor <doniyor@googlemail.com> wrote:
> > Hey Guys,
>
> > i need a litle help in working with forms. i have a button and i want
> > to output a success text above the button if the user presses the
> > button. how to do this ? is there any template tag like  {% if
> > form.is_submitted %} or so?
>
> > main point is that i dont want to write another html file only to show
> > the success message.
>
> > thanks in advance..
>
> > Doni
>
> > --
> > 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 options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Thanks,
> Subhranath Chunder.www.subhranath.com

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Admin app_index.html

2011-08-14 Thread doniyor
Hey Guys, i have here another problem..

i wrote an app, without models, the whole thing happens in views.py
and functions are coming from another file. so the thing i want is
that my app should be visible in admin site. i read about overriding
the app_index.html and put it under admin directory in my template
directories. my problem is i dont know where to change in
app_index.html sothat i see my app in admin.

here is the app_index.html file in row view. i didnot change here
anything yet.

{% extends "admin/index.html" %}
{% load i18n %}
{% if not is_popup %}

{% block breadcrumbs %}

{% trans "Home" %}
{% for app in app_list %}
{% blocktrans with app.name as name %} {{ name }} {% endblocktrans %}
{% endfor %}{% endblock %}

{% endif %}
{% block sidebar %}{% endblock %}


thanks

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Template tag: how to output success message above input field

2011-08-14 Thread doniyor
Hey Guys,

i need a litle help in working with forms. i have a button and i want
to output a success text above the button if the user presses the
button. how to do this ? is there any template tag like  {% if
form.is_submitted %} or so?

main point is that i dont want to write another html file only to show
the success message.

thanks in advance..

Doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird: PDF Upload

2011-05-12 Thread doniyor
Hallo,

i have got small problem. i try to upload a pdf but i get this error
all the time.
The process can not access the file because it is being used by
another process: 'file location...'

my code is here:

pdf_file = self.cleaned_data.get('pdf_file')
  if (pdf_file.name[-3:] == u'pdf' or pdf_file.content_type in
['application/pdf', 'application/x-pdf'])):
  return self.cleaned_data
  else:
  raise forms.ValidationError(u"Die hochgeladene Datei ist
keine gültige PDF Datei.")

can someone tell me why that is and where my problem is?

huge thanks

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to get view

2011-05-04 Thread doniyor
Hi there,
my problem is simple, i cannot redirect /wiwi/ to  /s/?o=key=./
because the second request does not have a view, but i set its view in
this way:

 View, args, kwargs = resolve(“/s/?o=key“)
 Kwargs['request']= request
 Return view(*args,**kwargs)


Why cannot i get now the view of second request ?

Thanks,
Btw, i am novice in django.

Doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: What is Module and where to use them wisely

2011-05-03 Thread doniyor
ok it was stupid question, i wanted to ask some other thing

On May 3, 1:09 pm, Tom Evans <tevans...@googlemail.com> wrote:
> On Tue, May 3, 2011 at 10:17 AM, doniyor <doniyor@googlemail.com> wrote:
> > Hey guys,
>
> > i have got a simple but sometimes confusing issue:
>
> > what is module and can i use it both in global urls.py  and in local
> > urls.py ? i wonder, which one is a wise way ?
>
> > thanks much,
>
> > doni
>
> Your question makes no sense. A module is a python file - eg urls.py
> is a python module named 'urls'.
>
> Cheers
>
> Tom

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



What is Module and where to use them wisely

2011-05-03 Thread doniyor
Hey guys,

i have got a simple but sometimes confusing issue:

what is module and can i use it both in global urls.py  and in local
urls.py ? i wonder, which one is a wise way ?

thanks much,

doni

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Overwriting the handler404

2011-05-03 Thread doniyor
hey, yes, sure, i import all the necessities.

but the default handler404 seems to be called all the time. i cannot
control it somehow.



On May 2, 6:11 pm, Jason Culverhouse <ja...@mischievous.org> wrote:
> On May 1, 2011, at 8:01 AM, doniyor wrote:
>
>
>
>
>
>
>
>
>
> > Hi there,
> > i am trying to overwrite handler404 of django so that i can call my
> > own view function when it doesnot find the appropriate view and if it
> > tries to give Http404. the whole problem is as follows:
>
> > i defined my view function called 'remap_test' in my proxy app. and i
> > changed the default handler404 to handler404 =
> > 'proxy.views.remap_test'.
> > The problem is that it gives all the time 404 error even if the
> > handler404 is defined right and even if it is in right place(in
> > urls.py) and the settings.py has the DEBUG = FALSE and my new view
> > function is theoretically ready to be called. but it isnot called,
> > sometimes it is. it is sooo weird.
>
> > i will post here the code blocks i added:
>
> > in my urls.py is this:
> > 
>
> You problem statement is a little confusing, so I'm not sure I am on the 
> right track here
>
> Just a quick thought,
> Does your urls.py contain
> from django.conf.urls.defaults import *
>
> If you are missing the "import *" the handler404 function that your are 
> assigning to
>
> > handler404 = 'proxy.views.remap_test'
> > .
>
> will just be a local variable and not django.conf.urls.defaults.handler404
>
> Jason
>
>
>
>
>
>
>
> > 
>
> > and my view function is this:
>
> > def remap_test(request):
> >   return HttpResponse("test message as 404")
>
> > and my model is this:
>
> > class Remap(models.Model):
> >    new_url = models.CharField(max_length=50)
> >    src_url = models.CharField(max_length=150)
> >    def __unicode__(self):
> >        return self.src_url
>
> > ... i dont know why it calls 404 all the time, sometimes i get the
> > problem if i add items to my database tables in admin, and sometimes
> > not. can someone please help me with this or does anyone have an idea
> > what the problem could be ?
>
> > thank you guys so much in advance,
>
> > doni
>
> > --
> > 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 options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Resolve function ?

2011-05-01 Thread doniyor
hi There,

i am novice in django so i need your help, i read books but if i talk
to you guys, may be i get it faster than reading books.

so, what doesnot give me peace is that i dont understand the function
resolve and how to use it.

say, i want to get the view from this request: /s/?
o=logo=S==10_Studium=6=_id=254/
what i dont understand is that resolve needs a path, but i cannot get
a path from this request, because it has only /s/ as a path and i
cannot call a view function for this /s/ path.

view, args, kwargs = resolve(' /s/?
o=logo=S==10_Studium=6=_id=254/ ')
kwargs['request'] = request
return view(*args, **kwargs)

i dont understand how this works,

can some help me please ?

Thanks

-- 
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 options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



  1   2   >