Re: Separator between forms in formset factory

2017-01-30 Thread Jeroen van Oorschot
Thanks for the tip, this works fine indeed.
I expected it to be some option on the formset, but this is ok as well.

On Saturday, January 28, 2017 at 8:55:59 PM UTC+1, Grzegorz Tężycki wrote:
>
> How you render your formset. 
> You can add separator in your html template:
>
> example:
> {% for form in formset.forms %}
> {{ form.as_p }}
> {% if not forloop.last %}
> 
> {% endif %}
> {% endfor %}
>
>
>
>
> W dniu sobota, 28 stycznia 2017 15:08:00 UTC+1 użytkownik Jeroen van 
> Oorschot napisał:
>>
>> Hi,
>> I'm using a 
>> modelformset_factory()
>>
>> for displaying a form multiple times automatically. This works perfect.
>>
>> I would like to have some kind of separator between the individual forms 
>> in the page. Now the formsetfactory just shows all forms after eachother, 
>> and it can be quite hard too see which input belongs to which form.
>>
>> Does anyone have an idea how to make this? If not, i'd like to request it 
>> as a feature on the formset_factory 
>> <https://docs.djangoproject.com/en/1.10/_modules/django/forms/formsets/#formset_factory>
>> .
>>
>> Kind regards,
>> Jeroen
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8bc84225-9c6e-4b8b-b384-45c1bc73716a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Separator between forms in formset factory

2017-01-28 Thread Jeroen van Oorschot
Hi,
I'm using a 
modelformset_factory()

for displaying a form multiple times automatically. This works perfect.

I would like to have some kind of separator between the individual forms in 
the page. Now the formsetfactory just shows all forms after eachother, and 
it can be quite hard too see which input belongs to which form.

Does anyone have an idea how to make this? If not, i'd like to request it 
as a feature on the formset_factory 
<https://docs.djangoproject.com/en/1.10/_modules/django/forms/formsets/#formset_factory>
.

Kind regards,
Jeroen

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c11a89d1-ace1-447f-9526-fb090f09d8a8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django on Docker

2015-01-08 Thread Jeroen Bakker

Hi Anssi,

Not really an answer to your question, but just to give you insight to a 
solution.


We at l1nda are using docker and django with small applications and 
large applications.


We developed an nginx container and uwsgi container and a devops 
container. The devops container does all the tricky parts and the nginx 
and uwsgi containers are basically simple ones.


We have automated the deployment docker (devops) image that internally 
uses docker-py that will minimize the downtime of the django containers. 
The script is just a python file of 100 lines that brings application 
down and up in a redundant way it also starts the staticscollecting etc. 
As it is pulling the images from another server (at our office), the 
security hurden is small.


1. Pull new images from our private repository
2. Collect statics, update databases etc.
3. loop per container [we run every application in 4 different containers]
3.1 stop old container
3.2 start new container.

We use a shared FS (NFS) for sharing the resources (uwsgi is allowed to 
write to the FS and the nginx is only allowed to read from the FS. The 
machine that contains the nginx image is also hosting the FS.


Jeroen




On 01/08/2015 11:45 AM, Anssi Kääriäinen wrote:
For a long time I have been battling with the following problem: how 
to deploy Django in an easy, maintainable, secure and reliable way for 
small Django applications. The applications I write are mainly very 
low traffic, and often they are coded in a couple of days. 
Unfortunately the hardest part of producing these applications has 
been deployment. A big part of the problem is that I have to work with 
RHEL6 based servers, and those tend to have old libraries.


The solution I am currently using is a nice little setup helper I 
wrote, django-dockerfile: 
https://github.com/akaariai/django-dockerfile. The idea is that you 
write a environment file for each server you want to deploy into, and 
after that everything happens automatically through usage of fab.


The solution works great for me even if there is still a lot to do. 
For example, usage of the fig package could make the code more robust, 
and allow for multi-server installations.


The main reason I am writing here on django-users is that I would like 
to see an easy way to deploy small Django applications. For large 
applications it seems OK to just build up your own deployment 
strategy, but for small applications it is too easy to end up doing 
the deployment in a hackish way where for example deploying the 
application isn't scripted, and each application's deployment strategy 
varies slightly.


I am looking for a way to deploy Django with at least these features:
  - Allows one-command deployment directly from Git to Docker-enabled 
server

  - Easy to use and get started
  - Doesn't use development server, or SQLite as database.
  - Does care for security
  - Media and static files served properly (note: CDN is overkill for 
my projects!)
  - Allows one to define secrets and other environment variables per 
installation

  - Preferably: logging, backup and restore thought out

The django-dockerfile package has the above features except for 
logging, backup and restore.


So, if there already exists something that has the above features 
implemented, then please tell me. If not, I am looking for interested 
developers to participate in building a tool for the small Django 
project deployment use case. The django-dockerfile package could be 
used as basis for the work, but using some other package or just 
starting from scratch are also options. Just writing a blog post that 
has information about an example Django deployment with every aspect 
of the above feature list covered could be enough.


 - Anssi
--
You received this message because you are subscribed to the Google 
Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to django-users+unsubscr...@googlegroups.com 
<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to django-users@googlegroups.com 
<mailto:django-users@googlegroups.com>.

Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eeb24be3-1f3d-4d4e-8ba0-7a476871c43a%40googlegroups.com 
<https://groups.google.com/d/msgid/django-users/eeb24be3-1f3d-4d4e-8ba0-7a476871c43a%40googlegroups.com?utm_medium=email_source=footer>.

For more options, visit https://groups.google.com/d/optout.



--


*L1NDA B.V.*
*www.l1nda.nl <http://www.l1nda.nl/>*
*www.facebook.com/L1NDA.NL <http://www.facebook.com/L1NDA.NL>
* Nieuwezijds Voorburgwal 101-III
1012 RG, Amsterdam
020-7526690
KvK: 57861765

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 

Dynamically appending a step to FormWizard

2008-09-30 Thread Jeroen

Hi All,

I'm adding a step to FormWizard based on user input from the previous
(first) step:

  def process_step(self, request, form, step):
if step == 0:
  self.form_list.append(get_form2(form.cleaned_data['mode']))

Above works, a second (and final) form is created based on the value
of mode. However, after submitting this  last form I get an error
"Step 1 does not exist". The dynamically added form disappears from
form_list.

Anyone have any ideas on how this should work?

Thanks,
Jeroen


--~--~-~--~~~---~--~~
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 vs TurboGears

2006-07-30 Thread Jeroen Ruigrok van der Werven

On 7/30/06, gabor <[EMAIL PROTECTED]> wrote:
> what is JASON?
> (or the original poster misspelled json?)

http://www.json.org/

JSON (JavaScript Object Notation) is a lightweight data-interchange format.

Good chance simplejson will make it to Python 2.6.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven

On 6/30/06, Craig Marshall <[EMAIL PROTECTED]> wrote:
> I can
> import django at the python prompt, but running syncdb gives me the
> ImportError.

What does python -v manage.py yield? 't Will be a long output.
Probably best to put it up on a URL if you can.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: ImportError: No module named django

2006-06-30 Thread Jeroen Ruigrok van der Werven

On 6/28/06, Craig Marshall <[EMAIL PROTECTED]> wrote:
> I downloaded the svn version of django a couple of weeks ago, and had
> it working fine within Debian. I installed Ubuntu 6.06 today, and my
> django install has stopped working.

This is very strangely worded. You installed Ubuntu completely on top
of Debian and then installed Django from SVN again? You're not being
explicit enough.

> I can run python interactively and type "import django" and get no
> errors, but when I go into our project directory and run "./manage.py
> syncdb",  I get this error:
>
> ImportError: No module named django

In your site-packages directory (typically something like
/usr/local/lib/python24/site-packages), do you have anything
resembling Django (egg or directory)?

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: mailing list management

2006-06-29 Thread Jeroen Ruigrok van der Werven

On 6/29/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> I'm tempted to ask (quietly, and just to myself) "how hard could it be?"

Would it be strange to suggest integrating mailman and django? Both
are Python and I think that mailman could use Django's
backend/frontend for its maintenance. Using the database part to store
the moderator queues and all that.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Django t-shirts: your ideas wanted!

2006-06-29 Thread Jeroen Ruigrok van der Werven

On 6/27/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
> I'm about to print up some Django shirts to take to OSCON next month
> -- got any ideas?

Django, we work with a different swing (if you like Java references)
Django, building the blue notes

:)

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



New vim files for Django available

2006-06-27 Thread Jeroen Ruigrok van der Werven

At http://www.vim.org/scripts/script.php?script_id=1487 you can find
the latest versions (1.02, released 2006-06-26) of Dave Hodder's
django.vim and htmldjango.vim.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Re: ANN: Screencast demo of the WebFaction control panel

2006-06-22 Thread Jeroen Ruigrok van der Werven

On 6/22/06, Luke Plant <[EMAIL PROTECTED]> wrote:
> Right now, for instance, 'ps aux' shows 10 apache instances of mine
> each using about 18 Mb, which is a lot more than my 40 Mb limit.

Are you looking at residential or virtual size here?

Also, ulimit should show you some imposed limits, most likely.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: MS SQL Django suport is stable?

2006-06-21 Thread Jeroen Ruigrok van der Werven
> And I'm not expecting to get the sql server code for free. But despite
> I think I have decent skills now in python, I don't have decent skills
> for linux. So If I code the Sql Server backend, why I chosee? the
> adodb, because django have it. I *don't* know that only work in
> windows. See? Is more hard the expertise in plataforms than in
> languages.

Which MS SQL version are you using?

I am of the mindset that if we can support it we should just try to
support it. I think I still have the SQL Server Express 2005 installed
on my workstation, I should try and see what if needed to get this
working as it should.

> However, I understand that I have a lack of skills for this... and I'm
> getting good support for this community in general. In retrospective, I
> must trust my intuition and run this under a know devil (windows) but I
> don't have a option now.

*shrug* Beauty is in the eye of the beholder. Windows, Mac OS X, et
cetera, all pale to the spirit of the Amiga! ;)
But seriously, we should be able to support Django on Windows and I am
willing to help on that front, not that I will use it, but merely
because people will want to use it.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Cutting output of flup's FastCGI server

2006-06-21 Thread Jeroen Ruigrok van der Werven

On 6/18/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
> P.S. Looks like Allan considers this as a bug and is going to fix it.

He did:

http://www.saddi.com/software/news/archives/34-EPIPE-no-longer-ignored.html

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: howto Django + lighttpd + Windows?

2006-06-15 Thread Jeroen Ruigrok van der Werven

On 6/14/06, mamcxyz <[EMAIL PROTECTED]> wrote:
> Yes I know... is for that I try the install onto windows.
>
> Is rare, why then RoR can be installed with lighttp on windows?

As Istvan said FastCGI doesn't work. That means you can normal CGI.
Yes you can, of course, use Apache. I just wonder why you insist on
using lighttpd to do preliminary testing, whereas you can use the
internal server (manage.py runserver) just as good.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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 django has no api reference?

2006-06-15 Thread Jeroen Ruigrok van der Werven

On 6/15/06, Steven Armstrong <[EMAIL PROTECTED]> wrote:
> [1] http://djangoapi.quamquam.org/trunk/

Ah cute. Now that might be useful to also have on the main site.
Adrian? :D

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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 django has no api reference?

2006-06-15 Thread Jeroen Ruigrok van der Werven

On 6/15/06, Roger Sun <[EMAIL PROTECTED]> wrote:
> Just like ruby's
> http://api.rubyonrails.org/
>
> currently, i don't know where can i refer to these api,
> i hope the author can do this for us. ^_^

I am currently writing/working on expanding the documentation that's
available, I'll take this idea along.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Feasibility of postgis fields?

2006-06-15 Thread Jeroen Ruigrok van der Werven

Hi Nick,

On 6/15/06, nick <[EMAIL PROTECTED]> wrote:
> Hi - as a person investigating django for managing metadata that will
> also have a spatial/gis component (lat/lon bounding boxes), would the
> reccommended approach be to create a new field for use in my models?
> Admittedly this would be specific to the postgres+postgis backend.

About custom fields I cannot tell you anything, but I recently helped
the developer(s) of GeoTypes to release 0.6.0, which is also
installable through CheeseShop/easy_install. I think this could be
helpful providing you with the OpenGIS/PostGIS geometry types at
least.

See http://cheeseshop.python.org/pypi/GeoTypes/

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Django Quick Start with Schema Evolution Support

2006-06-05 Thread Jeroen Ruigrok van der Werven

On 6/5/06, James Bennett <[EMAIL PROTECTED]> wrote:
> Again, can we just let this thread die? Per the Wikipedia entry on
> him, Ilias has been banned from posting to this list.

I didn't know Wikipedia administered this list? Sure, the entry does
point out he has had a few problems on the mailinglists, a lot owing
up to his own behaviour. However, see below.

> As for code that he wrote, I'd personally be wary of us ever using
> anything he didn't post to our own Trac and, even then, I'd probably
> want to run it by an IP lawyer before doing anything with it -- code
> contributed by a supposed "analyst for hire" who seemed to be fishing
> for us to pay him to help with Django is likely to be of questionable
> legal status.

The file points to LICENSE.TXT in the directory evolve.py is in. This
LICENSE.TXT is a BSD 3-clause license just like Lawrence Journal used,
just attributed to himself and stamped 2006. Nothing weird there.

I am all for letting a thread die, just for the right reasons though
and that's currently *not* happening as far as I can see. The
Internet's group mentality can also be very quick in getting out the
tar and feathers and label someone unwanted.

And this will be the last notice from my side on this, unless it has
to do with the technical side of things.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Django Quick Start with Schema Evolution Support

2006-06-05 Thread Jeroen Ruigrok van der Werven

Allow me to cut through the crap from both sides.

Ilias, could you stop replying to every single email and just ignore
ad hominems? Thanks.
And to the rest, could you please focus on purely the technical
content instead of polluting the list with unnecessary replies?
Thanks.

On 6/5/06, Ilias Lazaridis <[EMAIL PROTECTED]> wrote:
> http://case.lazaridis.com/multi/wiki/DjangoSchemaEvolution
> http://case.lazaridis.com/multi/browser/django/rework/evolve.py
> http://case.lazaridis.com/multi/browser/django/rework/add_evolvedb_command.diff

Has anybody even looked at the above?

A cursory glance of evolve.py shows that some preliminary work has
been done on the schema evolution. How much of that of the above is
useful/workable? I readily admit this is not quite my cup of tea.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Rich Text Editor for BBCOde?

2006-06-02 Thread Jeroen Ruigrok van der Werven

On 6/1/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Does anyone know of a "fancy" rich text editor component which
> generates BBCode instead of HTML (or is customizable so that it can be
> tailored to generate BBCode)? Maybe even one for which there is a
> Django integration "Howto"?

No, sorry, no ready made ones.

You could perhaps lift BBCode support from
http://spycebb.sourceforge.net/ or http://tboard.sourceforge.net/
though.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: auto_now_add bug with MySQL

2006-05-29 Thread Jeroen Ruigrok van der Werven
On 5/29/06, Konstantin Shaposhnikov <[EMAIL PROTECTED]> wrote:
> I've seen it here http://code.djangoproject.com/ticket/1056 (see the
> first comment by jacob)
> Though I am not sure how actual this statement is. Ticket seems to be quite 
> old.

Luke fixed the code in the meantime though.

It will still be interesting to get some feedback on the point above.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: auto_now_add bug with MySQL

2006-05-29 Thread Jeroen Ruigrok van der Werven
Hi Konstantin,

On 5/29/06, Konstantin Shaposhnikov <[EMAIL PROTECTED]> wrote:
> I suggest you to not use auto_now_add at all if you are using current
> (post magic-removal) version of django.

I am using the SVN trunk yes. (It would be great if someone could
finally fix trunk's setup.py to reflect what manage.py states about
versioning.)

[snip excellent suggestion]

> I am not really sure, but I seen somewhere that auto_now and
> auto_now_add are going to become deprecated and it makes sense taking
> into account that it is possible to achieve given functionlaity in
> other way and code that supports auto_now[_add] is full of hacks.

I couldn't find such statement quickly, so if anyone can please update
the list on this issue, thanks.

Thanks Konstantin, I will play around with that.

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: auto_now_add bug with MySQL

2006-05-29 Thread Jeroen Ruigrok van der Werven
Andy,

On 5/8/06, Andy Dustman <[EMAIL PROTECTED]> wrote:
> Try the patch on this bug:

The 2nd patch didn't work for me, as I noted in the ticket.

The initial save with DateField(auto_now_add = True) is correct, it
has the date as it should. But using it in conjunction with
FileField() will cause an automatic UPDATE statement to happen and,
'lo and behold, the DateField is now None and thus violating the
constraint.

I can understand the logic of doing an UPDATE, but I wonder what to do
with the date. Perhaps make sure the value of the date stamp is kept
and passed in the UPDATE again?

-- 
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Vim users - syntax highlighting for Django templates

2006-04-17 Thread Jeroen Ruigrok van der Werven
For those of you who use vim, please see

http://www.vim.org/scripts/script.php?script_id=1487

for some lovely syntax highlighting files by Dave Hodder.

Thanks Dave, you were faster than me. :D

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-14 Thread Jeroen Ruigrok van der Werven
On 4/14/06, Bill de hÓra <[EMAIL PROTECTED]> wrote:
> I think your next release should be an alpha based on magic-removal not
> an upgrade of .92. Cut your losses.

There has been some commits to the trunk and given how some hosting
parties will not install non-released versions I think it might be
fair for those people depending on that to release a 0.92 or something
like that prior to cut everything in MR over to trunk.

> Fwiw, as a bystander, magic-removal
> has been too long on the branch and looking at the commit history it
> seems to be your true development trunk (ie there's a lot more than
> magic removal going on). It needs to get merged back or killed.

Branches are indeed meant for testing and such without disrupting the
main development line. But given how the main development line will be
the MR code it needs to be moved back to trunk.

> Simulataneous releases will confuse people and enhance any perception
> that Django is unstable not ready for production work. Parallel branch
> management has really hurt the Zope community for example; there are
> lots of other examples out there.

I have to agree to that sentiment too though. The less confusion the better.

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-14 Thread Jeroen Ruigrok van der Werven
On 4/14/06, Leeuw van der, Tim <[EMAIL PROTECTED]> wrote:
> I fully agree with this: a 0.92 made of trunk, with all fixes collected
> on trunk. Perhaps patches applied for concurrency/threading issues and
> memory leaks -- that would be great for stability, esp. on windows.
> Then instantly switch trunk to m-r, and if m-r is good enough, make a
> release of it.

I can definitely live with this course of action and would throw my
vote in for this.

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-14 Thread Jeroen Ruigrok van der Werven
On 4/14/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
> next release *must* be magic removal - no point doing any interim
> releases - one drastic piece of surgery and then 1.0 ... interim
> releases would just prolong the agony

I have to agree with Kenneth here.

Any day you prolong the non-MR use is going to come back later for
people who need to convert from one system to another.

Better to bite the bullet and get this over with.

The better question might be: is the current magic removal branch that
what you intend for a 1.0 version?

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Fate of 0.91 projects

2006-04-13 Thread Jeroen Ruigrok van der Werven
On 4/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Depending on demand, we may release a final pre-magic-removal release
> of Django -- maybe 0.91.1 or something. Or maybe it'll be 0.92 and
> magic-removal will be 0.95, to signify it's a big leap. Thoughts?

The one thing I am slightly concerned about is the fact that the MR
branch is lingering and lingering and diverging beyond simply the
'magic removal' goal that was set at first.

How many more changes are expected before a new release or in other
words: what's the schedule? :)

--
Jeroen Ruigrok van der Werven

--~--~-~--~~~---~--~~
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: Version 1.0 Features

2006-02-14 Thread Jeroen Ruigrok van der Werven
Have you checked:

http://code.djangoproject.com/wiki/VersionOneFeatures


Re: running django

2006-01-23 Thread Jeroen Ruigrok van der Werven
On 1/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> i really don't know how to use them instead of django server as i am
> already using Apache for the picture but how to make access to all the
> project without using Django server

Start from http://www.djangoproject.com/documentation/modpython/ would
be my first suggestion.

--
Jeroen Ruigrok van der Werven


Re: Dreamhost - a note for Windows users

2006-01-19 Thread Jeroen Ruigrok van der Werven
On 1/19/06, PythonistL <[EMAIL PROTECTED]> wrote:
> After a long time and with a big help of Eugene Lazutkin I figured out
> that the problem
> was CRLF where Linux expect LF.(I use XP and most files edit on my XP
> windows and then upload to Dreamhost server.) So, from now on I know I
> must use dos2unix command on Dreamhost.

Any decent FTP client should be able to detect you're sending
non-binary data and use the ASCII transfer method which will
automatically translate this for you.

May I suggest FileZilla (http://filezilla.sf.net/)? It also supports
encrypted connections.

Of course, alternatively you can manually set it to ASCII mode and
upload then. No need for any dos2unix (am I the only one that prefers
things sed 's/^M$//g' nowadays?).

--
Jeroen Ruigrok van der Werven


Re: Dreamhost - problem with Django installation

2006-01-17 Thread Jeroen Ruigrok van der Werven
On 1/17/06, iGL <[EMAIL PROTECTED]> wrote:
> On my local machine, firefox misbihaves when favicon is missing,
> yielding error 500.

That's odd, since that would/should never yield a 500 but a 404, since
the favicon is just another URL request.

You sure the 500 is not the CGI interface going haywire because of the
request and unable to match it?

--
Jeroen Ruigrok van der Werven


Re: Django and MS SQL

2006-01-11 Thread Jeroen Ruigrok van der Werven
On 1/10/06, Cheng Zhang <[EMAIL PROTECTED]> wrote:
> As matter of fact, I am trying to make pymssql backend for Django
> work since in my current project we have to inherit a MS-SQL
> database. Changing the database is definitely not an option. If
> Django can be used with MS-SQL, then I can convince the team to pick
> it. Otherwise most likely we will have to stuck with Java/Structs/
> iBatis stack which I am not a fan of.

Cheng, I got 2005 Express installed at work now (2000 didn't want to
install as server on my XP installation), so I can start testing out
how wel Django and related stuff works on Windows.

People can download 2005 Express for free:
http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4448-8848-dcc397514b41=en

Can a bunch of us get together to get a/the pymssql driver fully
operational and Django running as it should?

On the IRC channel I'm asmodai by the way.

--
Jeroen Ruigrok van der Werven


Re: Django for eCommerce?

2005-12-22 Thread Jeroen Ruigrok van der Werven
On 12/22/05, Ian Holsman <[EMAIL PROTECTED]> wrote:
> from my understanding there is no opensource 'shopping cart' or
> 'product database' application which you can just download and install.

How do OSCommerce (http://www.oscommerce.com/) and Zencart
(http://www.zencart.com/) rate in your book?

--
Jeroen Ruigrok van der Werven


Re: concept problem with apps

2005-12-21 Thread Jeroen Ruigrok van der Werven
Perhaps it is just me, but I have a bit of difficulty understanding
what you are trying to ask here. Could you please rephrase it?

Thanks,

--
Jeroen Ruigrok van der Werven


Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-14 Thread Jeroen Ruigrok van der Werven
On 12/15/05, Robert Wittams <[EMAIL PROTECTED]> wrote:
> Personally, I think class attributes are fine.

Also given how Django describes the schema and from there builds the
database as opposed to RoR which wants you to design the database up
front, I think the names of the Django functions like
PositiveIntegerField() are quite understandable and straightforward.
Of course, the Field mention for each and every one might be redundant.

--
Jeroen Ruigrok van der Werven


Re: Database Backup

2005-12-14 Thread Jeroen Ruigrok van der Werven
On 12/14/05, Andreas Neumeier <[EMAIL PROTECTED]> wrote:
> I was wondering, if it is possible to do a entire backup of the
> database into a, let's say XML file or something.
>
> The intention is to offer a easy possibility to users to install
> applications and roll back to previor states, like having a
> backup/restore button on the admin interface. Not like having to handle
> database operations oneselfes.

This makes a lot of sense to me.

We already abstract the schema from the bare bones SQL which Django
knows how to work under water.

So it makes all the more sense, especially in light of sharing around
applications, to have database dumps be available in a format like
XML, especially when you need to populate a database beforehand.

I, unfortunately, know of no such feature right now.  But I wonder how
hard this might be.  The schema information is already present in the
models, so the only thing left is the extraction of the data in some
sort of XML file, unless I am missing something very fundamental.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
Free Tibet! http://www.savetibet.org/ | Je maintiendrai!
http://www.in-nomine.org/ | [EMAIL PROTECTED]
The distance to here is infinite...


Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-14 Thread Jeroen Ruigrok van der Werven
On 12/14/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> True a GUI can't totally replace hand coded SQL.  However, it certainly
> speeds a lot of the process up.  Fine tuning can be done afterwards.

Guess that is a very subjective measurement.  Working out the model in
Django's models/ directory and doing django-admin.py install  has
been way faster than any GUI administration I could do on my
databases.  Imagine that the average user uses something like
phpMyAdmin or phpPgAdmin to administer their remote databases and does
not have the advantage of the GUI tool you see on many of screencasts
running on Mac OS X.  At least as long as I've been going around
hosting circles.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
Free Tibet! http://www.savetibet.org/ | Je maintiendrai!
http://www.in-nomine.org/ | [EMAIL PROTECTED]
Courage is not the absence of fear, but rather the judgment that
something else is more important than fear.


Re: is Django too powerful?

2005-12-13 Thread Jeroen Ruigrok van der Werven
Hi Ian,

On 12/13/05, Ian Holsman <[EMAIL PROTECTED]> wrote:
> - captcha (text or images based)
> - spam and XSS protection

Have you seen/read http://www.w3.org/TR/turingtest/ already? 
Especially the automated circumvention of CAPTCHAs is very
interesting.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
Free Tibet! http://www.savetibet.org/ | Je maintiendrai!
http://www.in-nomine.org/ | [EMAIL PROTECTED]
Contentment that derives from knowing when to be content is eternal
contentment...


Re: Comments on Ruby code slides from Snakes and Rubies?

2005-12-13 Thread Jeroen Ruigrok van der Werven
Alexy,

although I am not Adrian, I still felt compelled to comment. :)

On 12/13/05, braver <[EMAIL PROTECTED]> wrote:
> class Project(meta.Model):
>   project_manager = meta.ForeignKey(ProjectManager)
>   milestones = meta.OneToOneField(Milestone)
>   categories = meta.ManyToManyField(Category)
>
> p  = projects.get_object(id__exact=1)
> pp = projects.get_list
>
> ...over:
>
> class Person < ActiveRecord::Base
>   belongs_to :project_manager
>   has_many   :milestones
>   has_and_belongs_to_many :categories
> end
>
> p  = Project.find(1)
> pp = Project.find(:all)

I find the class extension of Ruby less clear than Python's, however I
can understand how people might prefer Ruby's use of English
keywords/functions to build the model.  However, what I wonder about
though is how often you need to jog your memory or turn to reference
documentation to realise what 'belongs_to' exactly means.  To my first
reading it is not immediately clear that it has a foreign key
relationship.  Of course one may wonder if that kind of knowledge is
needed at all. I personally do not care much for the use of so many
underbars/underscores in the Ruby code.

I do agree that p = Project.find(1) is more intuitive than p =
projects.get_object(id__exact=1), since one can wonder why on earth
the terminology of an object has to be repeated, although the name
find wouldn't be my first choice, I'd settle for get().  On the other
hand, get_list() (or perhaps get_all?) is more intuitive over
Projecy.find(:all), especially if combined with the previous comment
of get().

The repeating of meta might be an eyesore to some people's view, but
it at least provides for solid namespacing, although you could of
course wonder how descriptive meta is.

Just some of my thoughts. :)
I am sure that a lot of this is highly dependent on the person in question.

--
Jeroen Ruigrok van der Werven <asmodai(-at-)in-nomine.org> / asmodai
Free Tibet! http://www.savetibet.org/ | Je maintiendrai!
http://www.in-nomine.org/ | [EMAIL PROTECTED]
Teaching should be such that what is offered is perceived as a valuable
gift and not as a hard duty...