Re: Helping someone move from Joomla to Django
On Wed, Sep 28, 2011 at 11:19:30PM -0700, Derek wrote: > > How would you recommend I go about this task of moving my friend > > over to a Django/Python based system over a Joomla/PHP based system? ... > > He is requesting some other interesting features, which apparently > > someone else is working on implementing, and it's actually taking this > > other person a few days, or maybe weeks to add. Where I know I can > > implement it in Django in a matter of hours. ... > > What is everyone elses opinions on development in Django verses a > > rival CMS such as Joomla? If I had to add features or integrate stuff, I'd stay away from Joomla (or any heavyweight CMS like Zope / Plone, for that matter). Can you implement or at least prototype a few URLs in Django? In that way you could answer your question about templates and demonstrate the advantages to your friends. If you don't succeed, http://groups.google.com/group/django-users/browse_thread/thread/4981ed32e8b910cd/601e5b97e1c43de8?lnk=gst=animuchan#601e5b97e1c43de8 could be an option. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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.
Re: Too many TCP connections
On Fri, Sep 02, 2011 at 12:16:41PM -0700, shacker wrote: > On one of the sites, a small amount of clicking around in the admin will > cause that user's IP to be blocked with a message like: Is the firewall and the web server on the same host? First, I'd check the destination port with netstat on the server. Then analyze the requests (e.g., in web server logs -- if the critical mass is destined for your http port, that is). > I can sidestep the problem by changing the CT_LIMIT value in ConfigServer > Firewall to a very high value or disabling it, but then I lose the DDOS > protection it provides. Does it address the scenario where the whole bandwidth to the firewall is consumed by malicious requests? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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.
Re: on-site deployment
On Mon, Aug 22, 2011 at 02:09:23PM -0400, Sam Bull wrote: > Here are some of the questions we've come across: Whew, those are very general questions where there are no right and wrong answers (like "how should we run our business" -- which you should know better), just advantages and disadvantages. > - What will we ultimately be delivering to our clients (a tarball of > the code, a physical server, a VM image, a WAR file, etc.)? I'd go for the software package alone. > - Who is responsible for the upkeep of the server? I'd leave that to the customer, and offer to do that for an additional fee. > - How will new versions of the product (new code and new content) be > provided? If you're asking about the technical side (not about cost models for upgrade versions), this depends on how you delivered it in the first place. If it's a package, I'd supply a new package. > - How will python dependencies be maintained? I don't see other choices other than document it or require it technically. The latter is possible if you deliver a distro-specific package. > - Can we assume that the server can access the Internet? If the software isn't something requiring Internet, I wouldn't assume that. > - Can we assume that we can access the server from the Internet? In general, I wouldn't assume that. However, this could be an option that has to be agreed with the customer (I've heard about large organizations allowing this for 24/7 support of their financial software). With kind regards, Baurzhan,. -- 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: Still on Internationalisation
On Fri, Jul 22, 2011 at 10:25:04AM +0100, Dipo Elegbede wrote: > $ django-admin.py makemessages -l de > processing language de > Error: errors happened while running xgettext on __init__.py > 'xgettext' is not recognized as an internal or external command, > operable program or batch file. You need to install xgettext separately and have it in PATH. Look at cygwin or mingw. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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.
apache config (was: Re: your mail)
Hello Jaspreet, On Mon, Jun 20, 2011 at 03:54:47PM +0530, jaspreet kaur wrote: > i want to run an application > and i have a documentation of the application > localhost is working but localhost/django is not working > it shows an error:Forbidden > > You don't have permission to access /django on this server. > Apache/2.2.16 (Ubuntu) Server at localhost Port 80 I think you'll be able to find out what the problem is if you get https://docs.djangoproject.com/en/1.3/intro/tutorial01/ running under https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ (I'm not familiar with that myself, I'm still using https://docs.djangoproject.com/en/1.3/howto/deployment/modpython/ , which is AFAIK not recommended for new installations). If you get stuck, try posting here your Apache config file. It may be tricky to determine the relevant file. On Debian, I have it under /etc/apache2/sites-available/default. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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.
Re: Can't get Django to work on windows XP - I must be missing something obvious!
On Mon, May 16, 2011 at 08:14:09AM -0700, Afshin Moshrefi wrote: > failed again because django.core import management > ImportError: No module named django.core It's #3 in http://docs.djangoproject.com/en/dev/topics/install/#installing-the-development-version I.e., if you unpacked it e.g. under c:\django-1.3, this directory should be in your PYTHONPATH. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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.
Re: Looking For A Solid Learning Tutorial
On Wed, Apr 13, 2011 at 09:19:31AM -0400, Nick Hird wrote: > I am just starting out with Django and would love to find a tutorial that is > great for learning but also teaches the many aspects of the framework. I > have a few books but they seem to go off on one direction or another and > skip the basics to really get you up and running. I would like to build a > solid application step by step and see a finished working site and then take > off and customize it on my own. I just haven't found any such tutorial. I used http://docs.djangoproject.com/en/1.3/intro/tutorial01/ and found it to be just what I needed. With kind regards, Baurzhan. -- 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: Project management software
On Tue, Nov 30, 2010 at 12:30:55PM -0800, tiemonster wrote: > I finally had a chance to put a demo up online: > > http://freeshell.de/~mscahill/projects/ > > Now obviously this isn't as pretty as it could be. It's meant to be > installed within an existing application. I made a half-hearted effort > to mock up something that would give you an idea of how it might look. > Please log in and poke around. I'd love feedback, as well as some > volunteers to make this really happen. > > If you're interested in contributing, or even in using the code, let > me know either on-list, or by private e-mail. If there is some > interest, I'll release the code under the GPL in January, and begin > more active development. I definitely need a tool for time tracking, ideally supporting Scrum (+ possibly PSP) project management, vacations, billing, access levels. I'd ideally like to pick one of the projects developed in Django and develop on top of it. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: [ANN] Django 1.3 alpha 1 released
On Thu, Nov 11, 2010 at 01:34:43AM -0600, James Bennett wrote: > The first alpha preview package for Django 1.3 is now available. Great! > * Release notes: http://docs.djangoproject.com/en/dev/releases/1.3-alpha-1/ Is the first paragraph under "Class-based views" incomplete? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: gettext on windows - not up to date documentation on django site
On Sun, Aug 22, 2010 at 10:03:33AM -0700, Jonathan wrote: > In > http://docs.djangoproject.com/en/1.1/topics/i18n/localization/#gettext-on-windows > it says "Extract the contents of the bin\ directories in both files to > the same folder on your system". > I downloaded gettext-0.17.tar from the link provided and it did not > have a bin directory in it. > > What should I do? Download gettext-runtime-X.zip and gettext-tools-X.zip. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: To make a basecamp like - project management site
On Sun, Aug 15, 2010 at 07:02:58AM -0700, tiemonster wrote: > I'm working on a GPL project management application for Django, and > would welcome contribution. I have a working codebase that is by no > means feature complete. If you're interested in contributing, please > contact me directly and I can make arrangements for us to collaborate. > I plan on some heavy development on this application in September, > with an initial subpoint release at the end of the month. Let me know. Any possibility to see the code? With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: form developer
On Fri, Aug 13, 2010 at 02:19:11AM -0700, Laurentiu wrote: > I am new to django and i want to ask if i can find a form developer > with drag and drop support for widgets and validations, database > binding fields, etc (like a desktop application). > > i look at some solutions for django like formunculous but i want > something more complex. I've read that http://www.gnuenterprise.org/ has something in that direction. It also uses Python and is reported to generate a web front end (at least in the past) but does not use Django and has very small community. I've developed an enterprise application using Django. I didn't need a form designer -- copy-paste worked pretty well for me. What I would like to see are nested dialogs with state tracking; even admin's popups wrapped into a function would be better than nothing. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: i18n form not working when in site root
On Fri, Aug 06, 2010 at 07:26:33AM -0700, Florin wrote: > When I change the language from any site's page it works like it > should, but when I go to the homepage (site's root) the > "django_language" cookie is reset and the language form doesn't work > anymore; it makes the POST request but it doesn't change the language. Difficult to tell, Should Work(tm). Do you {% load i18n %} in your root template, pass context_instance=RequestContext(Request) to render_to_response and actually have translatable strings and translations for them? If you already have that, publishing a minimal example of the problem and stating Django version could help people help you. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: LANGUAGES var isn't in all views
On Fri, Jul 30, 2010 at 11:14:42AM +0200, Alexandre González wrote: > If I add: > > import settings > LANGUAGES=settings.LANGUAGES > > and return it in the render_to_response it works perfectly, but can I > automatice this in all views? Sure, it works for me without passing LANGUAGES explicitly. I'm afraid you'll have to read render_to_response to find out why. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: LANGUAGES var isn't in all views
On Thu, Jul 29, 2010 at 11:52:31PM +0200, Alexandre González wrote: > 42 {% for lang in LANGUAGES %} ... > It works perfectly in some webs, but in others the var LANGUAGES isn't > provide automatically, do i need to send it in the views? I don't know whether it's relevant, but do you {% load i18n %} in your templates? I also pass context_instance=RequestContext(request) from the views, works fine for me. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django has incorrect time
On Thu, Jul 29, 2010 at 07:33:26AM -0700, Alex wrote: > system time zone is EDT and when running datetime.now( ) from a > *Python* shell I get the correct time. If I run a Django shell > through manage.py it is an hour behind. Works fine here with Django 1.0.2-1+lenny1; which version do you have? With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: obtaining pid of child process
On Sun, Jul 25, 2010 at 08:28:54PM -0700, tazimk wrote: > I want to obtain pid of iostat command or the command executed using > multiprocessing > module > > When I execute : > > d.pid it gives me pid of subshell in which this command is running . One way could be to traverse the list of all processes and find out the right iostat process using the parent pid. However, I think there should be simpler ways depending on why you need the pid. Besides, you seem to start iostat in continuous mode; so you probably read from the file you redirected the output to. In this case, you could also use a pipe if it suits your needs. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Maintain separate i18n translation (.po) for different applications
On Thu, Jul 08, 2010 at 10:39:25AM -0700, Behrooz Nobakht wrote: > I am not an expert in Django/Python, so what I have at the moment is > only mysite/locale/xx/django.po for both app1 and app2. But, actually > I need to separately have mysite/app1/locale/xx/app1.po and mysite/ > app2/locale/xx/app2.po and then be able to merge them into mysite/ > locale/xx/django.po. I've just tried running mkdir locale; ../manage.py makemessages -l ru in mysite/app1, seems to work. With kind regards, Baurzhan. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: i18n variable string translation
On Wed, Jun 16, 2010 at 01:00:36PM -0700, Aaron Lee wrote: > def my_view(request): > sentence = 'Welcome to my site.' > output = _(sentence) > return HttpResponse(output) > > (The caveat with using variables or computed values, as in the previous two > examples, is that Django’s translation-string-detecting utility, > django-admin.py makemessages, won’t be able to find these strings. More on > makemessages later.) > It's a bit confusing, one one hand it says Translation works on variables, > on the other hand, it says makemessages won't be able to find these strings. Yes, it will work if you happen to have a translation, and yes, it doesn't say how to identify such strings for translation, because the value of the variable may not be known at the time makemessages is run (neither is it straightforward in cases where it could in theory be calculated). What kind of problem are you trying to solve? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Generate thumbnails from videos
On Wed, Jun 09, 2010 at 05:20:07PM +0530, Venkatraman S wrote: > Say, a user uploads a video in my website, then how can i generate a > thumbnail version of the video on the go? Executing "mplayer -vo jpeg -frames 1 -ao null FILE" and using 0001.jpg is one way; I'm not aware of a python-only solution of comparable simplicity. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 project as linux package
On Mon, May 31, 2010 at 12:36:36AM -0700, Petr Pejcel wrote: > How can I distribute Django project as linux package? For example deb > package. http://www.radix50.net/~ibr/notes/20080323-0-django-autotools-debian.html Questions or feedback welcome. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Trouble with translation
On Sun, May 30, 2010 at 02:02:10PM -0700, Quenten Griffith wrote: > I created a conf/local in my project root directory Hmm, I'm using locale/ in the project root directory with django 1.0 and it works fine for me. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Safe and easy internationalization
On Mon, May 24, 2010 at 01:47:14AM -0700, Pascal wrote: > From what I've read so far, using translation "tags" (or quick > phrases) in the code, and translating them to every target language > (including english) sounds a better approach than using, for example, > final english wordings as translation tags. The setup is longer via > the first way, but at least if you change english wordings later, you > don't break all other translations at the same time. This is an interesting point. I'm using both "tags" and final wordings, albeit my goal is differently translating some strings that are the same in English. Not breaking other translations sounds tempting, especially if you have many; however, the result will depend on how you change the text: If you change its meaning (which does happen), then you do want the translations to break, and have to ensure that you change the "tag", too; TBH, I'm too lazy to think about that :) . > * code safety : it seems default python string formatting technics (% > operator, .format() method) are normally used when one needs to > substitute placeholders in translated strings. But the thing is : I > DONT want my view to raise an exception simply because one of the > translations has forgotten a damn "%(myvar)s" placeholder. The only > quick fix I can think of, is to always use substitution through > defaultdicts instances (and still, exceptions could occur if abnormal > "%s" placeholders are found in the translated string). Are there some > utilities in django, to allow a safe string substitution (which might, > for example, simply log an error if a buggy string si found) ? > Python's template strings' "safe_substitute()" won't fit, because it > swallows errors without any notice... I'm not aware of any. I suspect it shouldn't be that difficult to write one, no? > * unknown translatable strings : I have in different data files (eg. > yaml), strings which will need translation, but that can't be detected > by gettext and co, since they only appear in the code as variable i.e > "_(yamlvar)". The easiest, I guess, would be to replace them by > specific tags (like "TR_HOMEPAGE_TITLE"), and to have a tool browse > the code to extract them and add them to the standard gettext > translation chain. Such a tool shouldn't be too hard to code, but I'd > rather know : doesn't such a tool already exist somewhere ? I've seen > no such mention in gettext or babel tools, only recogniztion via > function calls ( _(), tr()... ). I'm not aware of any. > * I have seen nowhere mention of how to remove deprecated/unused > strings from gettext files - only merging translations seems to > interest people. However, having a translation file which slowly fills > itself with outdated data doesn't sound cool to me. Does anyone know > tools/program flags which would list/extract translations that don't > seem used anymore ? makemessages should comment out unused strings. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 for desktop application
On Wed, May 19, 2010 at 03:51:54PM -0700, Ahmed Salem wrote: > now i found dijango but i ask about can it conected with jython and > perform desktop app Perhaps it could for some definitions of "desktop app", although this wouldn't be my first choice. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 help
On Fri, May 14, 2010 at 10:51:09AM +0200, Hussain Deikna wrote: > 2- user login and it will display special information to every to group of > users ... > I need help in part 2 which django application I have to use? I'm not aware of a ready-to-use solution; however, implementing one is not much effort, take a look at http://docs.djangoproject.com/en/1.1/topics/auth/#topics-auth . With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: LOCALE_PATHS in settings.py required?
On Tue, May 04, 2010 at 08:10:18AM -0700, janedenone wrote: > according to > > http://docs.djangoproject.com/en/1.1/howto/i18n/ > > Django automatically looks for localizations in $PROJECTPATH/locale/ > /LC_MESSAGES/django.(po|mo). When I installed language files > in this location, however, they were found only after I added > LOCALE_PATHS to settings.py. Hmm, this works for me with 1.0 and without LOCALE_PATHS. You do have .mo files, don't you? I'd read Django sources or strace the web server to find out what goes wrong. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Internationalization
On Tue, May 04, 2010 at 02:47:35PM +0200, Daniel Baron wrote: > The first question is whether django supports the declaration of a > message context (msgctxt) in the .po-files in order to have different > translations for the same string in different positions of the > application. A hack could be to define different strings in the sources (like "Public1" and "Public2") and provide also an English translation for those (the rest will be used literally). > The second question is whether it is possible to remove options (in my > special case I use the "choices" parameter in my model) depending on the > language. The background is the following: > I have a field containing the salutation. In english this would contain > "Mr, Mrs and Ms" while in most other languages this only contains a > string for males and a string for females - thus only two options. Is it > possible to get rid of the third option if no equivalent for that is > available in a certain langauge? Check the language and create a var in a view? I haven't done this myself, though, so I haven't tried saving that. I personally would workaround that by not using "Mrs". With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 app svn management
On Thu, Apr 29, 2010 at 04:10:32PM +0200, Dexter wrote: > I was wondering if there is a solution to manage a django deployment with > svn like revision tool. > What I would like to have my main django deployment to be a trunk like > folder. > When I want to test something, or make a new app, I want to make a branch > oid. which should be visible under some sort of url structure (ie. > www.example.org/svn/branchname/normal_folder_structure) > > I wouldn't know if this is the best way to develop app's, but I guess it > would be nice to commit something when it's solid, and not having to > compromise the general site preformance/stability. This is possible -- basically have development branches and merge into trunk from time to time. However, most projects do the opposite -- possibly unstable trunk developed till it's stable, and branched for bugfixes (lives till EOLed), features or refactoring (although I wouldn't do the latter with svn). With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Distributing application
On Thu, Apr 29, 2010 at 04:37:09AM -0700, Mag wrote: > I was wondering what is the best way to distribute my application? IMHO, the best way is the native way of your target platform. I.e., MSI for Windows, rpm for RedHat, etc. I'd also bundle dependencies together with the app. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: /i18n/setlang/ broken?
On Thu, Apr 08, 2010 at 02:00:03AM -0700, chr wrote: > a) switching languages using /i18n/setlang/ doesn't have any effect > anymore Are you per chance using it with GET? It isn't supported any more. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: custom locale directory
On Mon, Mar 29, 2010 at 11:58:17AM -0700, Valentin Golev wrote: > How to tell django about the locale? It does not seem like it will > find the /locale/ folder by itself I'm using the following: LOCALE_PATHS = ('/locale', ) With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 locate the OS user name? [newbie]
On Thu, Mar 25, 2010 at 11:32:46PM -0700, BobAalsma wrote: > So I think now the question seems to be "how to extract the OS user > name from the browser environment?" If you don't mind logging in once, a cookie could be one solution (Django does this by default, AFAIK). With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 locate the OS user name? [newbie]
On Thu, Mar 25, 2010 at 08:27:37AM -0700, BobAalsma wrote: > I am trying to build a Django application to centralise the > information gathered by this unstable programme, but in some cases I > need to refer to the stored files. So I want to store the > "originating" OS user name in the database, along with the other > information. What about authenticating those users in your Django app? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 with a tiny linux distribution
On Thu, Mar 25, 2010 at 05:11:28AM -0700, Pythoni wrote: > Has anybody tried using Django with a tiny linux distribution? It depends on how you define "tiny". I've just bootstrapped Debian, installed Django and apache2, and removed docs. The result is: Base system154 MB Django 52 MB apache2 50 MB This takes into account all dependencies of Debian packages (e.g., apache2 requires perl, etc.). Given that there are 32-MB base systems, I'd expect a system with Django to fit a 64 to 128-MB compressed filesystem (this will also depend on your requirements -- python libs, DBMS, etc.), but I haven't tried that. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: remote desktop control using Django
On Tue, Feb 16, 2010 at 10:35:46AM -0800, Mike Ramirez wrote: > > This is very impractical to implement with pure browser + HTTP. > > Take a look at eyeos. http://eyeos.org/ PHP+Javascript... Wow, very impressive! Someone seems to have done the tedious work, and it performed well on my old notebook. It even played videos from youtube -- with glitches, but still. If I understand correctly, it has its own API, i.e., displaying the desktop of an existing OS, as OP wants, is still a large batch of work. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: remote desktop control using Django
On Tue, Feb 16, 2010 at 02:18:24AM -0800, Keyan wrote: > The software i'd like to write is a kind of " remote desktop control", > it has:one server and many clients > > server task is to control client's sytem & could able to handle > keyboard and mouse events of the client system. So you have User PC <--> "server" <--> "clients" What prevents users from starting remote desktop connections directly to the "clients"? This is very impractical to implement with pure browser + HTTP. If you find a flash RDP client, let me know. Otherwise, your best approximation may be FlashVNC (I haven't tried this): http://www.darronschall.com/weblog/2005/10/announcing-flashvnc.cfm But this will require installation of third-party software on the "clients". With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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 handle Winsock TCP\IP in Django
On Sun, Feb 14, 2010 at 08:36:25PM -0800, Keyan wrote: > Please let me know is it possible to handle Winsock TCP\IP concepts in > Django. & is there any tutorials to follow. Some ways are discussed here: http://groups.google.com/group/django-users/browse_thread/thread/536b6f4f6baf654b/d7bf03f08ae828c3 Regarding "how" -- look for python socket tutorials; there is also twisted, which may or may not suit your needs. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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.
DateField input_formats in auto-generated generic view forms
Hello, Is it possible to specify DateField input_formats somewhere (e.g., in a model or a global setting) without overriding the generic view (create_update.create_object, create_update.update_object) forms? I'm using 1.0. Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Does Django support sockets of type SOCK_STREAM for full-duplex communication with a client?
Hello Chris, On Mon, Dec 21, 2009 at 04:49:56PM -0800, Chris wrote: > I have a client that needs to constantly send data to Django-based > backend. The client code follows the pattern: > > ... > s = socket.socket( socket.AF_INET, socket.SOCK_STREAM ) > s.connect( ( '10.20.30.40', 8080 ) ) > while True : > data = s.recv( 2048 ) > print data > > s.send( r'something' ) > ... > > Could you advice on possible approaches to come up with a Django > implementation of a backend that can work with such client, please? I'm not aware of a way of doing exactly that. There is HTTP Connection: keep-alive with which you could theoretically read data, but I don't see how you would implement sending (I assume, the server is supposed to do something with r'something'?). If you can modify the client, your pattern seems to perfectly fit the HTTP request - response model. So you would connect to the server, send a request, then read the data and close the connection, all in the loop. That said, if your client is supposed to process and respond to the data received, I would call it "server" and rather make requests from 10.20.30.40 to it. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: i18n: date translation in Python
Hello Itay, On Tue, Dec 22, 2009 at 10:01:12AM +0200, Itay Donenhirsch wrote: > Maybe what I did can help you: in case you want to put the day name in > the template you can put a proper date for each day and just put into > the template for each day: > {{ day|date: "l" }} > day is a datetime.date object. > that should give the proper day name according to the locale you set > in settings.py. How can I get this to work for two languages on the same page? With kind regards, Baurzhan. > On Sun, Dec 20, 2009 at 7:53 PM, Baurzhan Ismagulov <i...@radix50.net> wrote: > > Hello, > > > > I'd like to have translated week days in a bilingual (printed) form. > > Since templates support only one language, I want to do that in Python > > for now. I've looked at django.templates.defaultfilters.date and tried > > the following in my views.py: > > > > from django.utils.dateformat import format > > day = format(date, arg) > > > > This returns the name of the day, albeit in English. How can I set the > > target language? Is django.utils.dateformat a part of a published API > > (I couldn't find anything about it in 1.0 docs)? Or are there better > > ways to do that? > > > > Thanks in advance, > > -- > > Baurzhan Ismagulov > > http://www.kz-easy.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-us...@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.
i18n: date translation in Python
Hello, I'd like to have translated week days in a bilingual (printed) form. Since templates support only one language, I want to do that in Python for now. I've looked at django.templates.defaultfilters.date and tried the following in my views.py: from django.utils.dateformat import format day = format(date, arg) This returns the name of the day, albeit in English. How can I set the target language? Is django.utils.dateformat a part of a published API (I couldn't find anything about it in 1.0 docs)? Or are there better ways to do that? Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: variable {% url %} parameter
On Tue, Dec 15, 2009 at 08:00:54AM -0800, Daniel Roseman wrote: > Should be {% url app-edit object_id=object.pk %} - ie drop the quotes > around app-edit. Yes, this worked. Thanks, Daniel and Bruno! With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: variable {% url %} parameter
On Mon, Dec 14, 2009 at 02:12:00AM -0800, bruno desthuilliers wrote: > > (r'^app/(?P\d+)/$', create_update.update_object, > > {'model': App}, 'app-edit'), > > > > Now, using {% url 'app-edit' object.pk %} in a form throws > > TemplateSyntaxError, mentioning "NoReverseMatch: Reverse for > > 'rc.'app-edit'' with arguments '(1,)' and keyword arguments '{}' not > > found." > > The above url works with a named (aka 'keyword') param 'object_id', so > you do have to use the same scheme withing the url tag, ie: > > {% url 'app-edit' object_id=object.pk %} Thanks for the tip. This results in TemplateSyntaxError with "NoReverseMatch: Reverse for 'rc.'app-edit'' with arguments '()' and keyword arguments '{'object_id': 1}' not found.". What am I doing wrongly? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Complicated Form "Workflow" - Need ideas/direction
On Tue, Dec 15, 2009 at 05:18:56AM -0800, derek wrote: > If you are serious about doing this, you may want to look at what has > been "invented" elsewhere. The one example I know of (and have used) > is Apache Cocoon's flow model: > http://cocoon.apache.org/2.1/userdocs/flow/continuations.html > > Worth reading around ideas/concepts. Thanks for the info, an interesting concept. I personally have no problems with representing a web app as a state machine, so continuations are for me too far an abstraction. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: Complicated Form "Workflow" - Need ideas/direction
On Mon, Dec 14, 2009 at 12:17:31PM -0800, Almost George wrote: > An Attendee, being added to an Event, must already exist in the > system. If the given Attendee doesn't exist, the user should be > prompted to create it/them (validly) before continuing further. > > Likewise when selecting the Event Venue - if it doesn't exist, it must > be created. > > Of particular note, Venues have some required meta-information that > must be filled out before it can be considered valid. > > That's quite a bit of "add and/or create+validate", and I'm not sure > how to implement that. I'm assuming I'll be using the Form Wizards, > but at this point I'm just not sure where to start. This is implemented in admin using popups, your easiest way would be to copy / reuse that. I'll have to work on a solution without popups in order to have: 1. A single browser window, to avoid user confusion if you have nested ForeignKeys (admin opens a popup for each). 2. Pagination / filtering, since admin's controls don't scale if you have anything more than a dozen of Attendees. I've looked into form wizards for that, but I don't think they are flexible enough. First, if you already have an Attendee, I couldn't find a way to skip that form. Second, the state is held in the POST requests. The advantage is that a user may open several browser windows and use different forms with complex workflows. The disadvantage is POST -- if you want POST-redirect-GET to avoid some of the issues with back / refresh (I'm using 1.0; you might want to look at http://code.djangoproject.com/ticket/9200). So, ATM I think we need a "workflow engine", which would display forms with PRG and hold intermediate data and "return stack" in sessions. I've scribbled together a couple of lines (not general, and nothing working yet); the problem with my design is, it will always have its limitations. For instance, if the user opens two browser windows and would add two new Events, continuing in another window at an "unfavorable" moment may result in a mess, although one may always customize that for one's needs. Another hurdle was pickling the form data into the session; I've skimmed through #9200 for that, but couldn't find how it does that yet. If anyone has code or ideas, I'd like to hear about that, too. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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.
variable {% url %} parameter
Hello, Another named URL question. I have the following pattern: (r'^app/(?P\d+)/$', create_update.update_object, {'model': App}, 'app-edit'), Now, using {% url 'app-edit' object.pk %} in a form throws TemplateSyntaxError, mentioning "NoReverseMatch: Reverse for 'rc.'app-edit'' with arguments '(1,)' and keyword arguments '{}' not found." in the value. Is passing a variable from the view the best way to do that? Is there any other method (not necessarily named URLs) of getting a URL without hardcoding it? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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.
editable AutoField
Hello, I'd like to have a numeric field that is shown in the admin and in the model form, the value entered by the user is saved, if no value is entered, the next sequence number is assigned by the database. Is there an easy way to do that? Or should I override the model's save method and use a custom form? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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: reverse in urlpatterns
Hello Javier, On Thu, Dec 10, 2009 at 09:04:10AM -0500, Javier Guerra wrote: > urlpatterns = patterns('', >... >(r'^apps/$', list_detail.object_list, > {'queryset': App.objects.all()}, > 'app-list')), > ) > > urlpatterns += patterns('', >(r'^app/new/$': create_update.create_object, > {'model': App, 'post_save_redirect': reverse('app-list')}, >'app-new'), >... > ) Thanks for the idea. I've tried it and got the following error: File "/var/lib/python-support/python2.5/django/core/handlers/base.py" in get_response 77. request.path_info) File "/var/lib/python-support/python2.5/django/core/urlresolvers.py" in resolve 179. for pattern in self.urlconf_module.urlpatterns: File "/var/lib/python-support/python2.5/django/core/urlresolvers.py" in _get_urlconf_module 198. self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) File "/home/ibr/w/work/mcs/j/rc/src/rc/urls.py" in 23. 'post_save_redirect': reverse('app-list') Exception Type: TypeError at /admin/his/person/add/ With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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.
reverse in urlpatterns
Hello, Can I use reverse() in urlpatterns, similar to the following? urlpatterns = patterns('', ... (r'^apps/$', list_detail.object_list, {'queryset': App.objects.all()}, 'app-list'), (r'^app/new/$': create_update.create_object, {'model': App, 'post_save_redirect': reverse('app-list')}, 'app-new'), ... ) When I try this, I get NoReverseMatch at /apps/: Reverse for 'app-list' with arguments '()' and keyword arguments '{}' not found. I'd like to avoid hard-coding URLs. Is there a way to do that? I'm aware that I could probably abuse get_absolute_url for that. However, I'll need to implement more complex workflows where the same URL is going to be "called" from different pages on the site and will have to return back to the "calling" page (not unlike admin's popup windows, albeit without popups). What is the best way to do that? I'm using Django 1.0. Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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-us...@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, threads and serial port
On Tue, Mar 31, 2009 at 11:32:58AM +0200, Filip Gruszczyński wrote: > The problem is not reproducible with one thread. If I open the serial > port on the main thread and then operate on this on additional > threads, everything works fine. So, sys.path becomes None somewhere before you create the Serial object in another thread? I'm afraid your options are either 1. add watchpoints to pdb (http://wiki.python.org/moin/PdbImprovments), or 2. use binary search principle to insert printfs into the middle of the execution noodle between the known good and the known bad. In your case, I assume, the good one would be the last statement before creating the thread, and the bad one -- the creation of the Serial object. But you do want to check this assumption with two more printfs. I'd also printf sys.path as the first statement in run(), just in case. If this doesn't reveal the problem, further divide the first or the second part depending on the printf result till you find the offending statement. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 -~--~~~~--~~--~--~---
Re: DJango, threads and serial port
On Thu, Mar 26, 2009 at 05:45:49PM +0100, Filip Gruszczyński wrote: > I tried using import pdb right before the exception and runing > set_trace, but it just displayed next command and finished. This code > is executed in separate thread (ususally operations on serial port > take a while, so I have to do it on seperate thread). If the problem is reproducible with one thread, I'd use it for debugging. Although I've never thought about using threads from Django; what will your "main" thread answer to the browser? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 -~--~~~~--~~--~--~---
Re: DJango, threads and serial port
On Thu, Mar 26, 2009 at 05:15:32PM +0100, Filip Gruszczyński wrote: > I don't exactly know, how to achieve this. Our server is run through a > bash script with runfcgi command. Should I put somwhere pdb import and > try to start inside the code? AFAIK, you should be able to debug your scripts if 1. your server doesn't detach itself from the terminal, and 2. you invoke pdb.set_trace() from your script. I haven't tried this, since I'm using apache in the foreground and PythonEnablePdb, as described at http://www.modpython.org/python10/ . This URL suggests also another method to see variable values directly in the browser. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 -~--~~~~--~~--~--~---
Re: Is this group censored, or is the archive just buggy?
On Mon, Sep 15, 2008 at 03:10:23PM -0700, catsclaw wrote: >Yes, I found it through the direct link, but it doesn't show up in > searches. That's why I was wondering what happened to it. If nothing > happened to it, then why doesn't it show up in the group if you search > for my username or "url tag"? I don't know. Perhaps it takes time for messages to get indexed. Just searched for my user name -- this thread doesn't show up, either. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Is this group censored, or is the archive just buggy?
On Mon, Sep 15, 2008 at 03:00:58PM -0700, catsclaw wrote: >No. That summarizes a few of the issues I'm seeing, although I'm > seeing more now. I'm referring to the one I posted on 9/15 with the > subject "Can anyone tell me how the hell to get url tags to work?" http://groups.google.com/group/django-users/browse_thread/thread/003369feb0bad2a3# With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Is this group censored, or is the archive just buggy?
On Mon, Sep 15, 2008 at 01:10:39PM -0700, catsclaw wrote: >I've been having major problems with the url configurations, and I > posted a summary of the problems on this list last night. I received > a reply, and responded to that. Now, however, the list has no record > of the conversation. Do you mean this one: http://groups.google.com/group/django-users/browse_thread/thread/a6b075433207b6e7/1446a3da3c816114?lnk=gst=catsclaw#1446a3da3c816114 With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Using i18n to translate to a specific language
On Wed, Jun 18, 2008 at 08:44:22AM -0700, Maximillian Dornseif wrote: > {% trans zh "distribution package"%} > {% trans en "distribution package"%} > {% trans de "distribution package"%} ... > OBviously until now the trans tag does not support manual language > selection. Any Idea how to archive that result? I'd translate in the view and pass a list to the template. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: sys.path vraag
Hello Jaap, On Sat, Mar 29, 2008 at 06:47:39AM -0700, Jaap wrote: > Path onder Windows XP Home is: > D:\Phyton25\;D:\Python25Scripts;%SystemRoot%\system32;%SystemRoot%; > %SystemRoot%\System32\Wbem > > Als ik de interpreter in PyScripter gebruik, dan krijg ik: > >>> print sys.path > ['C:\\Windows\\system32\\python25.zip', 'D:\\Python25\\Lib', 'D:\ > \Python25\\DLLs', 'D:\\Python25\\Lib\\lib-tk', 'C:\\Documents and > Settings\\', 'D:\\Python25', 'D:\\Python25\\lib\\site- > packages', 'D:\\Python25\\lib\\site-packages\\PIL', 'D:\\Python25\\lib\ > \site-packages\\win32', 'D:\\Python25\\lib\\site-packages\\win32\ > \lib', 'D:\\Python25\\lib\\site-packages\\Pythonwin'] > > Waarom zijn deze paden verschillend? PATH is the list of directories where Windows looks for executables if you don't specify an absolute path name. sys.path is where the Python interpreter looks for the modules to import, see http://docs.python.org/lib/module-sys.html . Are you looking for os.environ['PATH'], http://docs.python.org/lib/os-procinfo.html ? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Managing Django Projects with SVN
Hello Chris, On Sat, Mar 22, 2008 at 04:07:38PM +, Chris Hoeppner wrote: > > I use autoconf for that. The template file, settings.py.in, contains > > statements like this: > > > DATABASE_NAME = '@binpkg@' > > MEDIA_ROOT = @datadir@ + '/images' > > > > To generate settings.py, I use a command like this: > > > > ./configure --datadir=`pwd` BINPKG=kzez > > I like that. Never really looked into autoconf. Is there anywhere I can > get a better insight about this? Or would you be so kind to post a > write-up about the details of your workflow and setup? I've made a quick-and-dirty example that you can download from http://www.radix50.net/~ibr/notes/20080323-0-django-autotools-debian.html . The description is more about motivation and tool choice rather than "how", and is very raw. Comments or questions welcome. If you are interested only in the autoconf part, it would be quite easy to set up. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 07:07:54AM -0700, Heba wrote: > i add already to django.po and then i compiled > but when i re-run "make-messages.py" after adding trans to the > template, i got my parts in the django.py file hashed like that: > > #~ msgid "Hello World" > #~ msgstr "مرحبا العالم" > > #~ msgid "Welcome" > #~ msgstr "أهلا" > > #~ msgid "Hello World Home" > #~ msgstr "مرحبا العالم - الصفحة الرئيسية" Hmm, this is ok for messages that are not used any more. Are there any other msgids? Any entries marked for translation (with _() in .py files and with {% trans %} in templates) should still be there after re-running make-messages.py, like this: msgid "Hello World" msgstr "مرحبا العالم" msgid "Welcome" msgstr "أهلا" msgid "Hello World Home" msgstr "مرحبا العالم - الصفحة الرئيسية" If the .po file contains all messages you want, run compile-messages.py. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 06:13:59AM -0700, Heba wrote: > i did so, sorry may be the template i sent was not updated but i > really did Your code works for me with RequestContext and po changes. Have you actually put any translations into your locale/ar/LC_MESSAGES/django.po before running compile-messages.py? Note that you have to re-run "make-messages.py -a" after modifying any strings (such as adding a trans block to your template). And you do look at the browser window title for {{ output }}, don't you? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 05:55:31AM -0700, Heba wrote: > ok, thanks again for this help, i can now compile my .po files, but i > still have nothing after pressing the go button Well, the template you've posted doesn't include any text. You probably want to include "{{ output }}" somewhere in . FWIW, you can also use "{% trans "some text" %}" directly in the template, so that you don't have to include messages in views.py. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 04:21:50AM -0700, Heba wrote: > it gives me this error when i use compile-messages.py > > processing file django.po in D:\eclipse-workspace\i18nTry\i18nPack > \locale\ar\LC_ > MESSAGES 'msgfmt' is not recognized as an internal or external > command, > operable program or batch file. You should have a program named "msgfmt" in your %PATH% for this to work. You can install it using http://cygwin.com/setup.exe, or as described at http://code.djangoproject.net/ticket/1157#comment:5 (but I haven't tried this). With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 03:00:23AM -0700, Heba wrote: > thanks, i can see the options of the select now, but when i press the > Go button, the page is not translated Have you created locale/ar/LC_MESSAGES/django.mo as described in the "How to create language files" section of http://www.djangoproject.com/documentation/i18n/ ? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problems with i18n
On Sun, Aug 12, 2007 at 11:11:37AM +0300, Heba Farouk wrote: > {%load i18n%} ... > {% for lang in LANGUAGES %} > {{ lang.1 }}> ... > I didn't see any options in the select when I run it ... > LANGUAGES = ( > ('ar', 'Arabic'), > ('en', 'English'), > ) ... > def my_view(request): > output = _("Hello World Home") > return render_to_response('index.html', {'output': output}) http://groups.google.com/group/django-users/msg/e34ddaadd0223293 Hope this helps, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Best-practices for form with image
On Tue, May 22, 2007 at 06:56:31AM -0700, [EMAIL PROTECTED] wrote: > And there are no best practices for using something as inherently > inaccessible and annoying as a captcha. So, what are the best practices to check whether the request has been submitted by a human? FWIW, I've seen captchas with an audio option. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: manage.py setting sys.path wrong
Hello birkin, On Thu, May 17, 2007 at 09:25:41AM -0700, birkin wrote: > bash-2.05$ python ./manage.py > Traceback (most recent call last): > File "./manage.py", line 2, in ? > from django.core.management import execute_manager > ImportError: No module named django.core.management ... > PYTHONPATH=:.:/export/home/myusername/django_src/django:/export/home/ > myusername/django_src/django/bin:/export/home/myusername/django_src/ > django/core:/export/home/myusername/django_projects/cdi_workflow:/ > export/home/myusername/cron_code/pike_weblog_code:/export/home/ > myusername/cron_code/pike_weblog_code/classes bash-2.05$ PYTHONPATH=/export/home/myusername/django_src python manage.py With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django Administration
On Sun, May 13, 2007 at 12:18:22AM -0700, samira wrote: > I don't congifured it, how I can do this? > the error message is this"Not Found > The requested document was not found on this server." Are you using the apache web server? http://www.djangoproject.com/documentation/modpython/ may be helpful for you. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django Administration
Hello samira, On Sun, May 13, 2007 at 12:03:13AM -0700, samira wrote: > I want to use Adjango administrator. that is correct in my local, I > access to it throw this address: http://127.0.0.1:8000/admin/. but I > don't know how I can accees in my domain? Which web server are you using? Have you configured it for admin? > I put my domain Ip instead od localhost Ip, but it is not work :( Which error messages are you getting? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
TypeError: save_file() got an unexpected keyword argument 'save'
Hello, I've upgraded r3709 to 0.96 and started getting the following error: Traceback (most recent call last): File "/var/lib/python-support/python2.4/django/core/handlers/base.py", line 77, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/var/lib/python-support/python2.4/django/contrib/admin/views/decorators.py", line 55, in _checklogin return view_func(request, *args, **kwargs) File "/var/lib/python-support/python2.4/django/views/decorators/cache.py", line 39, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/var/lib/python-support/python2.4/django/contrib/admin/views/main.py", line 254, in add_stage new_object = manipulator.save(new_data) File "/var/lib/python-support/python2.4/django/db/models/manipulators.py", line 105, in save f.save_file(new_data, new_object, self.change and self.original_object or None, self.change, rel=False, save=False) TypeError: save_file() got an unexpected keyword argument 'save' This happens when I try to save a new record to a table using the admin interface. I've looked at django/db/models/fields/__init__.py, the method does seem to have the save kwarg. What is the problem? Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: ERROR: invalid input syntax for type boolean: ""
On Tue, May 01, 2007 at 11:58:44PM +0200, Honza Král wrote: > >Boolean fields have the value ''. Should I initialize all the fields to > >false either in code, or in the constructor? I would expect that Django > >does this for me. > > if you want that you have to supply default value via default kwarg to the > field This worked, thanks much! With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
ERROR: invalid input syntax for type boolean: ""
Hello, I have a class Object(models.Model) which contains model.BooleanFields. I'm trying to add rows to it, like this: o = Object() o.a1 = 'a1' o.a2 = 'a2' o.save() I don't set boolean values here. save() results in the following ProgrammingError: ERROR: invalid input syntax for type boolean: "" INSERT INTO "info_object" (...) VALUES (..., '', '', ''...) Boolean fields have the value ''. Should I initialize all the fields to false either in code, or in the constructor? I would expect that Django does this for me. How should I fix the problem? I'm using Django r4431. Please CC to me, I'm temporarily not receiving mail from the list. Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Screen resolution
On Sat, Apr 07, 2007 at 06:04:19AM -0700, Pythoni wrote: > I need to allow users to choose their own website background.A user > can choose whatever image he wants.But if a picture is large I need to > make it smaller to fit his screen. > So, I thought that I will find out the screen resolution and according > to it the Django script resize the image to fit the screen. The user has to choose the image from one of your pages and submit that to your site via another HTTP request, right? I don't know HTML well, but I guess you should be able to send the screen resolution in that request as well, look at HTML forms (I remember reading about hidden fields, don't know whether it helps, though). Of course, you should think about handling the cases Tim has described, if you care. If this is not what you want, you'll need to describe a bit of how you want to handle all this from the user perspective (is it a web page background or a desktop one, whether "resize" means stretch or crop, whether you want to use HTML forms and further HTTP requests, etc.). With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Screen resolution
Hello Pythoni, On Sat, Apr 07, 2007 at 03:56:21AM -0700, Pythoni wrote: > This script finds the resolution but I need to pass the screen > resolution values to my Django application for further processing. How > can it be done? > Or is it a better way than using Javascript? What about letting your Django application generate the data you need to present in a device-independent way and then rendering it to a concrete screen size in a template? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: debugging/breakpointing
Hello Greg, On Fri, Mar 09, 2007 at 05:53:44PM -0600, Greg Donald wrote: > I found http://docs.python.org/lib/module-pdb.html but I'm wanting > something where I can gain console access into the execution stack > directly. What do you mean by "access into the execution stack directly"? With "PythonEnablePdb On", you get the pdb prompt just before the django handler is called. After that you can step, set breakpoints, etc. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: installation-wide fixed language
On Mon, Feb 26, 2007 at 02:52:49PM -0800, omat * gezgin.com wrote: > But I do not want the browser settings (ie the http accepted-headers) > or other options to be considered. I just want to have one preset > language for a specific installation. * Write messages in Turkish and provide an English translation for the projects that need it, but not for this one (untested). * Hack this specific django installation to always return LANGUAGE_CODE in get_language_from_request. I've tested this, it works. A better way would be to use smth. like FORCE_LANGUAGE if set, otherwise fall back to the stuff django does now. Then you can use the same django installation for different projects. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: installation-wide fixed language
Hello omat, On Mon, Feb 26, 2007 at 01:14:11PM -, omat * gezgin.com wrote: > but this doesn't solve the issue. Now I cannot get the translation > even when 'Turkish' is added to my browsers list of accepted > languages. 1. Which version of Django? 2. Where are you trying to see the translation? Admin, or your application? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: OT: .pystartup
Hello Adrian, On Sun, Jan 28, 2007 at 02:50:43PM -0600, Adrian Holovaty wrote: > The "manage.py shell" command doesn't take into account your > .pystartup file, but that would be a nice improvement if it would. If > you could figure out how to make that happen and provide a patch, > we'll integrate it into Django. If I had known how to do that, I would have provided the patch in the first place ;) . Thanks much for the lightning fast answer, now I feel myself obliged to submit one :) . With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
OT: .pystartup
Hello all, I'm using a .pystartup file as described at http://www.python.org/doc/current/tut/node15.html . When I start "manage.py shell", this file is apparently not read (at least I can't browse any history entries) and I have to paste it manually. Can I make manage.py read the file? Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
ProgrammingError: ERROR: invalid input syntax for integer: ""
Hello all, I have a ForeignKey that may be NULL in a table editable inline, see http://www.radix50.net/~ibr/mysite/myapp/models.py (the whole project with the data is available at http://www.radix50.net/~ibr/mysite.tar.gz ). When I fill in the first Price in the Admin Home -> Object page, saving results in the error below. Sometimes (when I change something) I get an error message about aborted transaction with similar symptoms (myapp_attr.id being ''), the backtrace mentions Attr.__str__(). I tried django trunk 3709 and 4276. What is wrong? Thanks in advance, -- Baurzhan Ismagulov http://www.kz-easy.com/ - Forwarded message from [EMAIL PROTECTED] - Date: Wed, 03 Jan 2007 18:50:28 GMT From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [Django] Error (EXTERNAL IP): /mysite-admin/myapp/object/2/ Traceback (most recent call last): File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/core/handlers/base.py", line 77, in get_response response = callback(request, *callback_args, **callback_kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/contrib/admin/views/decorators.py", line 55, in _checklogin return view_func(request, *args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/views/decorators/cache.py", line 39, in _wrapped_view_func response = view_func(request, *args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/contrib/admin/views/main.py", line 329, in change_stage new_object = manipulator.save(new_data) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/manipulators.py", line 209, in save self.fields_added.append('%s "%s"' % (related.opts.verbose_name, new_rel_obj)) File "/home/ibr/tmp/w/h/kz-ez/mysite/myapp/models.py", line 42, in __str__ if self.attr: File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/fields/related.py", line 171, in __get__ rel_obj = self.field.rel.to._default_manager.get(**params) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/manager.py", line 67, in get return self.get_query_set().get(*args, **kwargs) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 211, in get obj_list = list(clone) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 103, in __iter__ return iter(self._get_data()) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 430, in _get_data self._result_cache = list(self.iterator()) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/models/query.py", line 172, in iterator cursor.execute("SELECT " + (self._distinct and "DISTINCT " or "") + ",".join(select) + sql, params) File "/home/ibr/tmp/w/h/kz-ez/download/django/django/trunk/django/db/backends/postgresql/base.py", line 43, in execute return self.cursor.execute(sql, [smart_basestring(p, self.charset) for p in params]) ProgrammingError: ERROR: invalid input syntax for integer: "" SELECT "myapp_attr"."id","myapp_attr"."slug","myapp_attr"."description" FROM "myapp_attr" WHERE ("myapp_attr"."id" = '') , POST:, COOKIES:{'sessionid': 'b5acb55462fc026c69438a56e9a8eb85'}, META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0L, 'CONTENT_TYPE': None, 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'KOI8-R,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_CONTENT_LENGTH': '98', 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_COOKIE': 'sessionid=b5acb55462fc026c69438a56e9a8eb85', 'HTTP_HOST': 'medeu', 'HTTP_KEEP_ALIVE': '300', 'HTTP_REFERER': 'http://medeu/mysite-admin/myapp/object/2/', 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060926 Debian/1.7.8-1sarge7.3.1', 'PATH_INFO': '/myapp/object/2/', 'PATH_TRANSLATED': None, 'QUERY_STRING': None, 'REMOTE_ADDR': '192.168.0.7', 'REMOTE_HOST': None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD': 'POST', 'SCRIPT_NAME': None, 'SERVER_NAME': 'medeu.radix50.net', 'SERVER_PORT': 0, 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'mod_python'}> - End forwarded message - --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: cyrillic text garbled if used as question in polls example
On Mon, Dec 11, 2006 at 10:32:20AM -, mezhaka wrote: > question=%D0%9A%D0%B0%D0%B3+%D0%B4%D0%B8%D0%BB%D0%B0%2C+%D0%BA%D1%80%D0%BE%D1%81%D0%B0%D1%84%D1%87%D0%B5%D0%93%3F This looks good, at least I have no problems with Cyrillic characters passed to the server in that way. > The troubled line (the one with question marks) looks like this: > name="question" size="30" value="??? ?" maxlength="200" /> Could you please od the value part, to eliminate the possibility of the terminal - shell - catting tool chain scrambling the output? > mysql> select * from polls_poll; ... > | 3 | ??? ? | 2006-12-09 12:24:13 | ... > the third row was inserted via admin interface and as you can see it's > just question marks. Could you please od this, too? > then I tried to ran the following SQL: > mysql> insert into polls_poll (`question`, `pub_date`) values ('Ты > используешь Джанго?', NOW()); > > now it's displayed ok in the mysql client, but the admin interface > shows a different style garbled text instead: > Ты иÑпользуешь > Джанго? Aha. So, what is the output of "locale" in the shell you started mysql in? Does mysql inherit it? What is the encoding of the database you are writing to? With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Template extending problem
Hello Kai, On Sun, Dec 10, 2006 at 12:23:09AM +0100, Kai Kuehne wrote: > > {% extends "/blog/base" %} > Doesn't work. {% extends "blog/base.html" %} works for me. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problem with django settings module
On Sat, Dec 09, 2006 at 03:03:15PM -0800, Snirp wrote: > That does not work Baurzhan, still the same error. > > [C:\temp\mysite] has now been set in the following locations: > > - As a value of the system variable "DJANGO_SETTINGS_MODULE" > - In sys.path > - As a PYTHONPATH windows registry value Have you tried setting both variables in the system settings to the values from my last e-mail and restarting the cmd shell you are starting manage.py from? If you did and it didn't work for you, send the output of the "set" command in cmd and the error message from manage.py. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: cyrillic text garbled if used as question in polls example
Hello Anton, On Sat, Dec 09, 2006 at 08:49:25PM +0200, Anton Daneika wrote: > I tried entering a Cyrillic text for the poll question attribute, while > playing with example polls application. This resulted in a bunch of question > marks on the view page, instead of the expected "Как дела?" poll question, > which was in Cyrillic. In my experience, text can get broken on each and every step. First, I would try to see whether the browser sends it correctly using a dumping HTTP proxy (netcat or a simple perl script). Then, check whether it is written correctly to the database (e.g., issue a SELECT in mysql). Then, see if it is displayed correctly. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: problem with django settings module
Hello Snirp, On Sat, Dec 09, 2006 at 08:20:02AM -0800, Snirp wrote: > environment variable DJANGO_SETTINGS_MODULE undefined I assume mysite is the project you've created under c:\temp using "django-admin.py startproject mysite". To use the shell, you need to have the following environment variables set: PYTHONPATH = c:/temp DJANGO_SETTINGS_MODULE = mysite.settings I haven't tested this, so you may have to play with the PYTHONPATH format (slashes, etc.). > >>>import sys > >>>sys.path.append('c:/temp/mysite') > > This appends the directory to sys.path, but it does not save it I to > the path module I guess. sys.path.append affects only the process it is called in. Setting PYTHONPATH should work for you. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: DJANGO_SETTINGS_MODULE undefined error
On Fri, Dec 08, 2006 at 08:43:42AM -, theju wrote: > Your tip worked, but how do we export variables in Windows (just > curious) If you have bash, just in the same way :) . If not, you can set it in the cmd process you call manage.py from ("set VAR=val"), or system-wide from Control Panel -> System -> Advanced? -> Environment. With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: DJANGO_SETTINGS_MODULE undefined error
Hello Thejaswi, On Thu, Dec 07, 2006 at 09:59:28AM -, theju wrote: > whenever i use the following command (in a python shell) > I get the following error. > EnvironmentError: Environment variable DJANGO_SETTINGS_MODULE is > undefined. Set it in your shell before starting python. I do the following in bash: export DJANGO_SETTINGS_MODULE=myproject.settings With kind regards, -- Baurzhan Ismagulov http://www.kz-easy.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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Django and CRM or ERP
Hello Picio, On Fri, Nov 17, 2006 at 01:05:24PM +0100, Picio wrote: > Just courious if Is there anyone that have built or will build a CRM > or an ERP using Django? Not quite what you ask, but there should be some apps at http://www.gnuenterprise.org/ , they should have, among others, a web front-end, although I haven't tried the apps. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Database design
Hello Eric, On Tue, Nov 14, 2006 at 11:37:47AM -0500, Eric Lake wrote: > I think that I am really starting to understand how django works. The area > that I am not very good at is designing the database model. Can you > recommend a good tutorial or book that gets into how create logical, > elegant, efficient databases. Riordan, Rebecca M. "Designing Effective Database Systems". Addison-Wesley, 2005. ISBN 0321290933. Reviews on amazon.com provide some more pointers. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Debugging with Winpdb
Hello Mike, On Fri, Nov 10, 2006 at 11:30:03AM -, Mike wrote: > Anybody debugging Django apps successfully with Winpdb? pdb worked for me, can't say anything about pdb. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: django/db/models/base.py:383: Local variable (rel) not used
Hello Russell, On Fri, Nov 03, 2006 at 10:26:23AM +0800, Russell Keith-Magee wrote: > Thanks for the report. Apologies for the behaviour of the spam filter; > we've been having some difficulties with it lately. > > Its true - rel isn't used. But neither is the rest of the method. The > _set method in question is a fossilized remnant of v0.91 (pre-magic > removal). I've removed it in r3963. Thanks! With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
django/db/models/base.py:383: Local variable (rel) not used
Hello, this was reported by pychecker while I was checking my code, seems to be valid. I've submitted this to trac, was rejected by akismet as spam. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: OT: fast selection in drop-down lists
Hello SmileyChris, On Mon, Oct 23, 2006 at 12:18:24PM -0700, SmileyChris wrote: > On Oct 24, 7:54 am, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > > is there a way to quickly choose an entry in a drop-down list? IIUC, > > this is browser-specific, but perhaps there is some fancy Javascript > > doing that? > > Yep, it's mainly browser-specific here (mostly if you start typing > while you have focus on the box, it'll go to the relevant entry) > However, Javascript can control the selected element of a select box, > so you could write some script. It seems like a lot of effort for > little gain though (but then again, you may have an important case). Ok, that's what I'd suspected, just wanted to be sure there isn't a ready solution. The case is relatively important since I have to migrate people from a legacy application, and such issues may kill it. The list contains cities, so I'm even thinking about providing three-letter shortcuts in an edit box instead. Thanks, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: can't get LANGUAGES to work in the base template
On Sun, Oct 08, 2006 at 06:27:38PM +0400, Ivan Sagalaev wrote: > If I correctly suspect that we speak the same language then I can > recommend my blog post about it: > http://softwaremaniacs.org/blog/2006/01/12/context-processors/ This is great, it describes first the use case rather than the functionality, so I think it is worth to have the link in the archives (the text is in Russian). The size and the coverage are just right, now I understand Django docs :) . Thanks again! With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: can't get LANGUAGES to work in the base template
Hello Ivan, On Sun, Oct 08, 2006 at 05:54:27PM +0400, Ivan Sagalaev wrote: > All the extra information (such as {{ user }} or {{ LANGUAGES }}) is > passed to templates by a RequestContext that processes a number of > context processors defined in TEMPLATE_CONTEXT_PROCESSORS in settings. > > I suspect that your first template is rendered not just with t.render() > but with t.render(context) and this context _is_ a RequestContext > instance. On the contrary render_to_response doesn't use RequestContext > by default, it uses simple Context instead that doesn't know anything > about requests or context processors. To get it working for your second > template you should tell render_to_response to use ReuqestContext with > your request: > > return render_to_response( >'template.html', >{ ... }, >context_instance=RequestContext(Request) > ) Thanks much, this worked! I suspect I'll have to read more about contexts. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
can't get LANGUAGES to work in the base template
Hello all, I'm using django 0.96 r3709. I have base.html, page1.html, and page2.html templates. The latter two extend the former one. base.html creates a box with all supported LANGUAGES. This works as expected in page1, but not in page2. page1 is a verdjn templatepage (rendered with HttpResponse(t.render())), page2 -- a template that I render with render_to_response. What is the difference? How can I debug the problem? Thanks in advance, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: Why I'm giving up on Django
Hello mamcxyz, On Fri, Sep 29, 2006 at 07:43:49AM -0700, mamcxyz wrote: > - Deployment. I work on Delphi and the idea of put a EXE and all is > working right (tm) is a feeling I lost with python on hosting. So what about writing a small script that will do this for you? Something like tar cC /localdir/myprj . |ssh host tar xC /remotedir/myprj FWIW, I create a Debian package of my project and install it on the server. With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: pre-selecting the current language
On Wed, Aug 30, 2006 at 11:31:32AM +0200, Baurzhan Ismagulov wrote: > I'm using the language selection form from > http://www.djangoproject.com/documentation/i18n/ and want to preselect > the current language. How can I do this? Got help from [530] on IRC and the previous posting: {% ifequal lang.0 LANGUAGE_CODE %} Thanks! With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
pre-selecting the current language
Hello all, I'm using the language selection form from http://www.djangoproject.com/documentation/i18n/ and want to preselect the current language. How can I do this? With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: TemplatePages directory
On Sun, Aug 27, 2006 at 10:36:29AM +0100, Derek Hoy wrote: > On 8/25/06, Baurzhan Ismagulov <[EMAIL PROTECTED]> wrote: > > I add /dir to PYTHONPATH. In this layout, I have to put the html > > templates to /dir/verdjnlib/templatepages/templates/templatepages. How > > can I customize the directory without modifying verdjnlib for each > > project? > > It will find templates/pages anywhere that django looks for > templates, so that's sitetemplates and each app/templates directory. Ah, never mind. I've added '/dir/myprj/myapp/templates' to TEMPLATE_DIRS, and it worked. Thanks Bryan and Derek! With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---
Re: serving static with mod_python and django
Ivan, On Sat, Aug 26, 2006 at 02:26:28PM +0400, Ivan Sagalaev wrote: > Oh I've forgot. It happens because Apache still passes all requests to > mod_python because of SetHandler set in the first rule. In subsequent > locations you have to also reset it with SetHandler None. It worked, thanks much! With kind regards, Baurzhan. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~--~~~~--~~--~--~---