Re: Django CMS
the best one for me is FEINCMS : http://feinheit.ch/media/labs/feincms/ have great tools for another aplication and is very easy to configure and use. On Tue, Dec 27, 2011 at 12:52, Jonas Obrist wrote: > Hi there, if you're asking about django CMS (https://django-cms.org), you > should use the proper mailing list to ask questions: > https://groups.google.com/forum/#!forum/django-cms > > Also, I do not fully understand your questions. Could you maybe try to > explain a bit better what you're trying to achieve? > > -- > 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/-/CaFWD5xok8QJ. > > 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. > -- Ezequiel Bertti E-Mail: eber...@gmail.com MSN: eber...@hotmail.com Cel: (21) 9188-4860 VÁ PARA BÚZIOS!!! http://www.agh.com.br/ Ane Guest House -- 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 and django-admin-tools are together?
Hi Guys, One question here: Is it possible and justified to use django-admin- tools over django-cms? I have no experience with Django-CMS and django- admin-tools, but I read that django-admin-tools is one of django-cms apps. I mean, I have to implement user filled resource and I look at cms, but I have to have some flexibility with content and page blocks on admin's page and I think, I have to use django-admin-tools. 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.
I can't start new project
Hello, I have installed python 2.7 and Django 1.3.1, but when I type: "django-admin.py startproject project" I receive only something like 'help' for that command How can i fix it? I already tried reinstalling Python and Django... -- 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: I can't start new project
My bet is that you're using Windows. Open the Registry Editor (hit Winkey+R, "regedit" (no quotes), hit enter) --- Go to *HKEY_CLASSES_ROOT\Applications\python.exe\shell\open\command* and check that it looks somewhat like '"PYDIR\\python.exe" "%1" %*' If you're missing the final * %**, it won't work. --- A different, one-time solution is to type the full paths in your command-line: C:\Python27\python.exe C:\path\to\django-admin.py startproject foobar Also google for virtualenv and start using it! Cheers, AT On Tue, Dec 27, 2011 at 12:01 PM, Varrant wrote: > Hello, > > I have installed python 2.7 and Django 1.3.1, but when I type: > > "django-admin.py startproject project" > > I receive only something like 'help' for that command > > How can i fix it? > > I already tried reinstalling Python and Django... > > -- > 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: I can't start new project
In registry % was missing, but nothing changed. "One time solution work's nice :D I'll lookfor virtualenv 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: I can't start new project
What is your Operating System ? -- 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: render_to_response pointing to multiple templates
I am new to Django as well - but in answer to your second question, you'll need to create a views.py within the app and register the url in urls.py in the root. Then you can pull in variables from your app into the template. For example, if you have a Places class which includes a name and address, your template could read: {% for p in places%} {% p.name %} {% p.address %} {% endfor %} I recommend going through the "Writing Your First Django App" tutorial: https://docs.djangoproject.com/en/dev/intro/tutorial01/ - it's very helpful and gives a great overview. On Nov 8, 1:44 pm, "jay K." wrote: > Hello, Tom > > thanks for your answer > > I believe it can be done like the way you suggested > > I should clarify that I am new to django and have no web developing > background, so > my questions may sound a bit silly sometimes > > I got another one, if you dont mind > > how can I retrieve information on a template, such as name and url inside > a view? I'd like to use it to differentiate between templates and > use logic to pick the template I want to render > > again, Tom, thanks for your assistance > > > > > > > > On Mon, Nov 7, 2011 at 2:04 PM, Tom Evans wrote: > > On Mon, Nov 7, 2011 at 3:59 PM, jay K. > > wrote: > > > hi, Tom > > > > thanks for the reply > > > > what I actually want to do is to > > > list several templates in the render_to_response > > > function and be able to choose which one to use > > > > can I choose which template to use? > > > > thanks again, and let me know if my question is clear enough > > > Of course you can; use logic in your view to decide which template to > > render, and call render_to_response with that template name… I must be > > missing something? > > > 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. -- 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: I can't start new project
It's not just %, it's %* (notice the asterisk). I just tried changing the value back and forth here and it worked as expected. Cheers, AT On Tue, Dec 27, 2011 at 12:44 PM, Varrant wrote: > In registry % was missing, but nothing changed. > > "One time solution work's nice :D > > I'll lookfor virtualenv > > 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. > > -- 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: Trying to create django app to view alarms
On Dec 23, 2:29 pm, Python_Junkie wrote: > I think that building the python code that performs your logic is a > great way to start, and not getting bogged down with django is a great > way to get started. > > There are several (relatively straight forward) pieces of django that > you will need to tie together. > > I will simply disucss the view.py components and the html template. > > Establish your python code as a module. > Import the module in the view and use it in the view.py. > > def function_called_for_log_display(request): > ..call your python module > ...create a python dictionary with the information > that is pulled back by your python module > > .render the html template and pass the > dictionary values to the template > > return render_to_response('polls/index.html', > {'latest_poll_list': latest_poll_list}) #I took this from the django > project tutorial > > ...use the appropriate template tags/logic to display the > results of the dictionary > Thanks Python-Junkie- I've got a prototype working but it's really clunky and currently involves a server submit whenever I want to filter or my alarm view. I'm thinking about what to do and am sure will post another question soon! :) -- 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: I can't start new project
Windows 7 64 -- 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
Hi there, if you're asking about django CMS (https://django-cms.org), you should use the proper mailing list to ask questions: https://groups.google.com/forum/#!forum/django-cms Also, I do not fully understand your questions. Could you maybe try to explain a bit better what you're trying to achieve? -- 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/-/CaFWD5xok8QJ. 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 use asyncore socket in django views.py
To accepts socket connetction you need always listen some port. Othewise you will be trying hit a bulls eye when sending data to this port (if you would listen port only when view was called) View is a function it's not a webserver that runs and listen to port. You need to decouple working with sockets from view and place it somewere outside django 2011/12/27 Vovk Donets > For what you need this? > Maybe you should consider using Celery for doing background jobs. > > > 2011/12/23 Kay > >> if I have easy asyncore socket code as follow: >> >> >> -- >> >> import socket >> import asyncore >> >> class asysocket(asyncore.dispatcher): >> >>def __init__(self,host,port): >>asyncore.dispatcher.__init__(self) >>self.create_socket(socket.AF_INET, socket.SOCK_STREAM) >>self.set_reuse_addr() >>self.bind((host, port)) >>self.listen(10) >>print 'server is waiting for socket connection...' >> >>def handle_accept(self): >>new,addr = self.accept() >>print 'received from address', addr >>data = new.recv(1024) >>print repr(data) >> >>def handle_close(self): >>self.close() >> >> server = asysocket('127.0.0.1',1234) >> asyncore.loop() >> >> >> >> >> then how to use this in my django project views.py to let it >> automatically work for receiving connection >> >> while i start the project as "python manage.py runserver [port]"?? >> >> thanks >> >> > -- > *Vovk Donets* > python developer > > skype: suunbeeam > icq: 232490857 > mail:donets.vladi...@gmail.com > www: jetfix.ru > > -- *Vovk Donets* python developer skype: suunbeeam icq: 232490857 mail:donets.vladi...@gmail.com www: jetfix.ru -- 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
*Before this thread turns into **another "My favorite X is Y", everyone please think twice before posting.* OP (probably) asked "Which CMS will let me upload and embed videos?", so unless anyone has something to add in that regard, there's no need to state your personal preference. If, instead, he actually asked "How can I use *just* the video uploading/embedding tools provided by Django CMS?", then his question should be made in their official mailing list, not this one. My suggestion to OP: please go through the djangopackages.com list for CMS apps[1]. By that I mean visit their websites and IRC channels, and possibly read through specialized mailing lists. This functionality is probably going to require a great deal of manual configuration as the implementations can vary greatly, so maybe someone out there can show you the way. Feel free to ask again once you have questions about using Django itself. Cheers, AT [1] http://djangopackages.com/grids/g/cms/ On Tue, Dec 27, 2011 at 1:56 PM, Ezequiel Bertti wrote: > the best one for me is FEINCMS : http://feinheit.ch/media/labs/feincms/ > > have great tools for another aplication and is very easy to configure and > use. > > On Tue, Dec 27, 2011 at 12:52, Jonas Obrist wrote: > >> Hi there, if you're asking about django CMS (https://django-cms.org), >> you should use the proper mailing list to ask questions: >> https://groups.google.com/forum/#!forum/django-cms >> >> Also, I do not fully understand your questions. Could you maybe try to >> explain a bit better what you're trying to achieve? >> >> -- >> 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/-/CaFWD5xok8QJ. >> >> 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. >> > > > > -- > Ezequiel Bertti > E-Mail: eber...@gmail.com > MSN: eber...@hotmail.com > Cel: (21) 9188-4860 > > VÁ PARA BÚZIOS!!! > http://www.agh.com.br/ > Ane Guest House > > -- > 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: how to use asyncore socket in django views.py
For what you need this? Maybe you should consider using Celery for doing background jobs. 2011/12/23 Kay > if I have easy asyncore socket code as follow: > > > -- > > import socket > import asyncore > > class asysocket(asyncore.dispatcher): > >def __init__(self,host,port): >asyncore.dispatcher.__init__(self) >self.create_socket(socket.AF_INET, socket.SOCK_STREAM) >self.set_reuse_addr() >self.bind((host, port)) >self.listen(10) >print 'server is waiting for socket connection...' > >def handle_accept(self): >new,addr = self.accept() >print 'received from address', addr >data = new.recv(1024) >print repr(data) > >def handle_close(self): >self.close() > > server = asysocket('127.0.0.1',1234) > asyncore.loop() > > > > > then how to use this in my django project views.py to let it > automatically work for receiving connection > > while i start the project as "python manage.py runserver [port]"?? > > thanks > > -- *Vovk Donets* python developer skype: suunbeeam icq: 232490857 mail:donets.vladi...@gmail.com www: jetfix.ru -- 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 use asyncore socket in django views.py
Hello~ I need to run the python django project and meanwhile accept the socket connection from somewhere to receive data. But I dont know is this can be done,so any tips if this is possible? thanks~ kay On 12月27日, 下午4時34分, Vovk Donets wrote: > For what you need this? > Maybe you should consider using Celery for doing background jobs. > > 2011/12/23 Kay > > > > > > > > > > > if I have easy asyncore socket code as follow: > > > --- > > --- > > > import socket > > import asyncore > > > class asysocket(asyncore.dispatcher): > > > def __init__(self,host,port): > > asyncore.dispatcher.__init__(self) > > self.create_socket(socket.AF_INET, socket.SOCK_STREAM) > > self.set_reuse_addr() > > self.bind((host, port)) > > self.listen(10) > > print 'server is waiting for socket connection...' > > > def handle_accept(self): > > new,addr = self.accept() > > print 'received from address', addr > > data = new.recv(1024) > > print repr(data) > > > def handle_close(self): > > self.close() > > > server = asysocket('127.0.0.1',1234) > > asyncore.loop() > > > --- > > - > > > then how to use this in my django project views.py to let it > > automatically work for receiving connection > > > while i start the project as "python manage.py runserver [port]"?? > > > thanks > > -- > *Vovk Donets* > python developer > > skype: suunbeeam > icq: 232490857 > mail: donets.vladi...@gmail.com > www: jetfix.ru -- 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
Dear ALL, i want to ask something , Can i use like one feature on Django CMS i need to using the video upload and playing it , is that possible , how can i do somthing like this . Thanks Best Regards , Hassan Alnatour, -- 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 and django-admin-tools are together?
I have a project in which I use django-cms and django-admin-tools together in production and I hadn't had any problems using it until now. On Tue, Dec 27, 2011 at 9:27 AM, Maxim Boyarskiy wrote: > Hi Guys, > > One question here: Is it possible and justified to use django-admin- > tools over django-cms? I have no experience with Django-CMS and django- > admin-tools, but I read that django-admin-tools is one of django-cms > apps. I mean, I have to implement user filled resource and I look at > cms, but I have to have some flexibility with content and page blocks > on admin's page and I think, I have to use django-admin-tools. > > 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. > > -- This e-mail and any file transmitted with it is intended only for the person or entity to which is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this communication and destroy all copies. -- 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 and django-admin-tools are together?
"but I read that django-admin-tools is one of django-cms apps." that is incorrect. The initial design and idea started on our blog [1] but it was never implemented by us, so someone else did and thus django-admin-tools was created. [1] https://www.django-cms.org/en/blog/2009/10/29/dashboard-proposal-update/ -- 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/-/AOvbwFHlCtgJ. 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 can't start new project
AT, and they say hackers belong only to Linux :P Good job! On Tue, Dec 27, 2011 at 8:37 PM, Andre Terra wrote: > It's not just %, it's %* (notice the asterisk). > > I just tried changing the value back and forth here and it worked as > expected. > > > Cheers, > AT > > > On Tue, Dec 27, 2011 at 12:44 PM, Varrant wrote: > >> In registry % was missing, but nothing changed. >> >> "One time solution work's nice :D >> >> I'll lookfor virtualenv >> >> 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. >> >> > -- > 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: how to use asyncore socket in django views.py
Depending on your needs, Celery could be over-kill. You could create a command that works under manage.py and use it in a cron job. On Tue, Dec 27, 2011 at 5:41 AM, Vovk Donets wrote: > To accepts socket connetction you need always listen some port. Othewise > you will be trying hit a bulls eye when sending data to this port (if you > would listen port only when view was called) View is a function it's not a > webserver that runs and listen to port. > You need to decouple working with sockets from view and place it somewere > outside django > > > 2011/12/27 Vovk Donets > >> For what you need this? >> Maybe you should consider using Celery for doing background jobs. >> >> >> 2011/12/23 Kay >> >>> if I have easy asyncore socket code as follow: >>> >>> >>> -- >>> >>> import socket >>> import asyncore >>> >>> class asysocket(asyncore.dispatcher): >>> >>>def __init__(self,host,port): >>>asyncore.dispatcher.__init__(self) >>>self.create_socket(socket.AF_INET, socket.SOCK_STREAM) >>>self.set_reuse_addr() >>>self.bind((host, port)) >>>self.listen(10) >>>print 'server is waiting for socket connection...' >>> >>>def handle_accept(self): >>>new,addr = self.accept() >>>print 'received from address', addr >>>data = new.recv(1024) >>>print repr(data) >>> >>>def handle_close(self): >>>self.close() >>> >>> server = asysocket('127.0.0.1',1234) >>> asyncore.loop() >>> >>> >>> >>> >>> then how to use this in my django project views.py to let it >>> automatically work for receiving connection >>> >>> while i start the project as "python manage.py runserver [port]"?? >>> >>> thanks >>> >>> >> -- >> *Vovk Donets* >> python developer >> >> skype: suunbeeam >> icq: 232490857 >> mail:donets.vladi...@gmail.com >> www: jetfix.ru >> >> > > > -- > *Vovk Donets* > python developer > > skype: suunbeeam > icq: 232490857 > mail:donets.vladi...@gmail.com > www: jetfix.ru > > -- > 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. > -- Joseph Slone -- 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.
project help
Hello All, I would like to create a job search project a lot like monster or indeed. Does anyone have any resources such as other projects or repositories similar to what I'm looking for that can push me in the right direction? Or any advice whatsoever would also be appreciated. I am planning on using: django registration django profiles geodjango Not sure what else yet -- 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: runserver namespace problem?
Having the same problem "Received unregistered task of type blah" . Can someone help ? On Sun, Nov 13, 2011 at 5:26 PM, Ken wrote: > Does anybody have any idea? > > -- > 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.
preventing data from getting saved to the backend database?
I'm a newbie reading documentation, and this question may well be answered by something I havent read yet, but anyway... My understanding so far is that django incorporates a back-end database (in my case built in sql3 on windows) to which all model related data from forms gets posted. I'm trying to write an app whereby the user can upload 2 sets of alarm files: a before and an after view, and then be able to filter and zoom in detail appropriately. However, each alarm file upload might comprise several hundred alarms. I'm only really interested in comparing these 2 sets of alarms, but it seems to me that by using django (and an alarm Class etc), that all these alarms will be pasted into the database every time a report is requested. That's not what I want, and at 2 x 200+ alarms per request, I can imagine me clogging up my alarms database at some point (but more importantly bloating with data I don't want to keep...). I'm sure there is a solution, could someone please tell me their thoughts? - what do I do with lots of data that I don't want to keep after a specific session is finished? -- 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: preventing data from getting saved to the backend database?
On 28-12-11 00:01, Jim wrote: I'm a newbie reading documentation, and this question may well be answered by something I havent read yet, but anyway... My understanding so far is that django incorporates a back-end database (in my case built in sql3 on windows) to which all model related data from forms gets posted. I'm trying to write an app whereby the user can upload 2 sets of alarm files: a before and an after view, and then be able to filter and zoom in detail appropriately. However, each alarm file upload might comprise several hundred alarms. I'm only really interested in comparing these 2 sets of alarms, but it seems to me that by using django (and an alarm Class etc), that all these alarms will be pasted into the database every time a report is requested. That's not what I want, and at 2 x 200+ alarms per request, I can imagine me clogging up my alarms database at some point (but more importantly bloating with data I don't want to keep...). Well, if you don't want to store the individual alarms in the database: just don't. Perhaps it is enough to have one "AlarmSet" class with two file (upload) fields. The AlarmSet class can then have a before_alarms() and an after_alarms() method that read the data from the two uploaded files. There's no real need to convert the contents of uploaded files into database objects, you can access the files themselves just fine. If that is enough for you. And if loading the info from those files all the time seems a bit wasteful: use some low-level django caching and you'll be fine again. Reinout -- Reinout van Reeshttp://reinout.vanrees.org/ rein...@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham" -- 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.
Split File Storage
Greetings all- I have a django site which is referencing about 1TB of static files at the moment and growing fast. I am running out of affordable upgrade options and need to scale the file storage out to multiple machines once it hits 3TB. I have a pretty good idea about what needs to be done for this but I wanted to ask here first incase someone has a snippet / custom storage already written that does something similar? I have seen django-dust and django-resto however these are both replicated storage for load balancing / HA. I actually want to be able to split the storage of the files between servers and control when certain servers are full and can no longer write to etc. Any advice would be much appreciated. Cheers. - Cameron -- 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/-/J-sDi9ah1NMJ. 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.
All models with FKs, M2Ms, or 121s pointing to a given model
How do I get all models with FKs, M2Ms, or 121s pointing to a given model? I am using djcelery. I have a BakedModel with a FK to TaskMeta, which is the model that stores task status (I only care whether it is complete). I want to generate a query set that will return all instances of a given model where all deep references to and from the instance that are TaskMeta instances have status=SUCCESS. Currently, I am able to perform said operation for all relations from a given model, but the other way -- to a given model. http://paste.pocoo.org/show/526681/ -- 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: Split File Storage
Sounds like you already have a django-centric solution in mind, but what you want might be found in a distributed filesystem solution like Gluster (http://www.gluster.org/) or a distributed object store like Swift (http://swift.openstack.org/) accessed via django-storages. Or put them on CloudFiles or S3? Replication is good because the MTBF plummets as you add bits. Brian Schott bfsch...@gmail.com On Dec 27, 2011, at 9:02 PM, Cameron wrote: > Greetings all- > > I have a django site which is referencing about 1TB of static files at the > moment and growing fast. I am running out of affordable upgrade options and > need to scale the file storage out to multiple machines once it hits 3TB. I > have a pretty good idea about what needs to be done for this but I wanted to > ask here first incase someone has a snippet / custom storage already written > that does something similar? > > I have seen django-dust and django-resto however these are both replicated > storage for load balancing / HA. I actually want to be able to split the > storage of the files between servers and control when certain servers are > full and can no longer write to etc. > > Any advice would be much appreciated. Cheers. > - > Cameron > > -- > 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/-/J-sDi9ah1NMJ. > 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: All models with FKs, M2Ms, or 121s pointing to a given model
On Wed, Dec 28, 2011 at 10:01 AM, Daniel Kaplun wrote: > How do I get all models with FKs, M2Ms, or 121s pointing to a given > model? Looking at your pastebin, you've already discovered the _meta object -- you just needed to dig around a little more in there. The methods/attributes you're looking for are: MyObject._meta.fields - a list of all data, FK and O2O fields on MyObject MyObject._meta.many_to_many - a list of all many to many fields on MyObject MyObject._meta.get_all_related_objects() - a method returning a list of RelatedObject objects, which define the model and field that has an FK or O2O relation with MyObject MyObject._meta.get_all_related_many_to_many_objects() - a method returning a list of RelatedObject objects, which define the model and field that has an M2M relation with MyObject These aren't currently documented, because technically they're not stable API. However, they haven't changed in almost 6 years, and if we *were* to make a change, it would likely have a big impact on a lot of code in the wild. As a result, you can effectively treat them as pretty-much-stable, but undocumented API. Yours, Russ Magee %-) -- 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.
{% elif %} error
Hi, I want to use {% elif %} my template: {% if bookmark.hours %} {{ bookmark.hours }} hours ago {% elif bookmark.days %} {{ bookmark.days }} days ago {% elif bookmark.months %} {{ bookmark.months }} months ago {% else %} {{ bookmark.years }} years ago {% endif %} show error: Invalid block tag: 'elif', expected 'else' or 'endif' It can work without elif, if use if...else loop. my django version is 1.31 how to solve this? 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.
Re: {% elif %} error
On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien wrote: > Hi, > I want to use {% elif %} > my template: > {% if bookmark.hours %} > {{ bookmark.hours }} hours ago > {% elif bookmark.days %} > {{ bookmark.days }} days ago > {% elif bookmark.months %} > {{ bookmark.months }} months ago > {% else %} > {{ bookmark.years }} years ago > {% endif %} > > > show error: > Invalid block tag: 'elif', expected 'else' or 'endif' > > It can work without elif, if use if...else loop. > > my django version is 1.31 > > how to solve this? The {% elif %} tag was only recently added to Django; it will be available in the 1.4 release. Django 1.3 and earlier does not, and will not ever contain the {% elif %} tag. You can either develop your site against Django's trunk in the hope that Django will release 1.4 before you need to roll out your site, or modify your template to use nested {% if %} statements. Yours, Russ Magee %-) -- 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: {% elif %} error
Or back port the elif tag (which may or may not be non trivial). On Wednesday, December 28, 2011 at 1:50 AM, Russell Keith-Magee wrote: > On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien (mailto:jasoniem9...@gmail.com)> wrote: > > Hi, > > I want to use {% elif %} > > my template: > >{% if bookmark.hours %} > >{{ bookmark.hours }} hours ago > >{% elif bookmark.days %} > >{{ bookmark.days }} days ago > >{% elif bookmark.months %} > >{{ bookmark.months }} months ago > >{% else %} > > {{ bookmark.years }} years ago > >{% endif %} > > > > > > show error: > > Invalid block tag: 'elif', expected 'else' or 'endif' > > > > It can work without elif, if use if...else loop. > > > > my django version is 1.31 > > > > how to solve this? > > The {% elif %} tag was only recently added to Django; it will be > available in the 1.4 release. Django 1.3 and earlier does not, and > will not ever contain the {% elif %} tag. > > You can either develop your site against Django's trunk in the hope > that Django will release 1.4 before you need to roll out your site, or > modify your template to use nested {% if %} statements. > > Yours, > Russ Magee %-) > > -- > 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 > (mailto:django-users@googlegroups.com). > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > (mailto: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: {% elif %} error
Hi It is available in dev/trunl version not this version. This is dev version docs https://docs.djangoproject.com/en/dev/ref/templates/builtins/ On Wed, Dec 28, 2011 at 12:20 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Wed, Dec 28, 2011 at 2:44 PM, Tsung-Hsien > wrote: > > Hi, > > I want to use {% elif %} > > my template: > >{% if bookmark.hours %} > >{{ bookmark.hours }} hours ago > >{% elif bookmark.days %} > >{{ bookmark.days }} days ago > >{% elif bookmark.months %} > >{{ bookmark.months }} months ago > >{% else %} > > {{ bookmark.years }} years ago > >{% endif %} > > > > > > show error: > > Invalid block tag: 'elif', expected 'else' or 'endif' > > > > It can work without elif, if use if...else loop. > > > > my django version is 1.31 > > > > how to solve this? > > The {% elif %} tag was only recently added to Django; it will be > available in the 1.4 release. Django 1.3 and earlier does not, and > will not ever contain the {% elif %} tag. > > You can either develop your site against Django's trunk in the hope > that Django will release 1.4 before you need to roll out your site, or > modify your template to use nested {% if %} statements. > > Yours, > Russ Magee %-) > > -- > 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. > > -- Regards Nikhil Verma +91-958-273-3156 -- 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: {% elif %} error
There's no {% elif %}. You'll have to do: {% if bookmark.hours %} {{bookmark.hours}} hours ago {% else %} {% if bookmark.days %} {{ bookmark.days }} days ago {% else %} {% if bookmark.months %} {{ bookmark.months }} months ago {% else %} {{ bookmark.years }} years ago {% endif %} {% endif %} {%endif} (Sorry if I missed any closing {%endif%} - you'll have to balance those). Also, I'd suggest you to do this logic part in the view itself. On Wed, Dec 28, 2011 at 12:14 PM, Tsung-Hsien wrote: > Hi, > I want to use {% elif %} > my template: >{% if bookmark.hours %} >{{ bookmark.hours }} hours ago >{% elif bookmark.days %} >{{ bookmark.days }} days ago >{% elif bookmark.months %} >{{ bookmark.months }} months ago >{% else %} > {{ bookmark.years }} years ago >{% endif %} > > > show error: > Invalid block tag: 'elif', expected 'else' or 'endif' > > It can work without elif, if use if...else loop. > > my django version is 1.31 > > how to solve this? > 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. > > -- 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: {% elif %} error
Thank you all! I don't see the line "New in Django Development version." On Dec 27, 10:44 pm, Tsung-Hsien wrote: > Hi, > I want to use {% elif %} > my template: > {% if bookmark.hours %} > {{ bookmark.hours }} hours ago > {% elif bookmark.days %} > {{ bookmark.days }} days ago > {% elif bookmark.months %} > {{ bookmark.months }} months ago > {% else %} > {{ bookmark.years }} years ago > {% endif %} > > show error: > Invalid block tag: 'elif', expected 'else' or 'endif' > > It can work without elif, if use if...else loop. > > my django version is 1.31 > > how to solve this? > 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.
Re: {% elif %} error
Go to this link https://docs.djangoproject.com/en/dev/ref/templates/builtins/ {% if athlete_list %} Number of athletes: {{ athlete_list|length }} *{% elif athlete_in_locker_room_list %}* Athletes should be out of the locker room soon! {% else %} No athletes. {% endif %} press CLTR + F and type elif you will reach there On Wed, Dec 28, 2011 at 12:38 PM, Tsung-Hsien wrote: > Thank you all! > > I don't see the line > "New in Django Development version." > > On Dec 27, 10:44 pm, Tsung-Hsien wrote: > > Hi, > > I want to use {% elif %} > > my template: > > {% if bookmark.hours %} > > {{ bookmark.hours }} hours ago > > {% elif bookmark.days %} > > {{ bookmark.days }} days ago > > {% elif bookmark.months %} > > {{ bookmark.months }} months ago > > {% else %} > > {{ bookmark.years }} years ago > > {% endif %} > > > > show error: > > Invalid block tag: 'elif', expected 'else' or 'endif' > > > > It can work without elif, if use if...else loop. > > > > my django version is 1.31 > > > > how to solve this? > > 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. > > -- Regards Nikhil Verma +91-958-273-3156 -- 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.