Re: Django Development Model

2012-10-28 Thread Kurtis Mullins
Hey,

I'm not sure there is a specific Project Management (which to me implies
Software Engineering) style that people use with Django. In my experience,
using agile methodologies work great; You can quickly prototype your idea
and enhance your product as needed.

The tutorial, as others have mentioned, is a great starting point to learn
about the Django Framework. For the purpose of a university course, I would
keep the technologies as simple as possible: Use SQLite for the database
(this comes with Django), use Django's built-in 'runserver' for development
purposes until you need to push the web application to a production (read:
live) environment. I would focus on things such as building Models, using
Forms and Views to get and display any related data, and maybe some
semi-complex Templates related functionality such as Template Inheritance.

Depending on the depth of the course, it would be very great knowledge for
the students to know how to use a traditional DBMS with Django. It would
also be very beneficiary for the students to learn how to configure an HTTP
Server to communicate with a Django Application. However, these are only
details related to the deployment of Django and can easily set the students
on a wide tangent from the objective of teaching students how to manage and
implement a web application project using the Django framework.

Hopefully that helps answer your question a bit. Good luck!



On Sun, Oct 28, 2012 at 4:39 PM, Smriti Patodi wrote:

> Hi Everyone,
> I am a MSIS student at Santa Clara University, CA. My team has chosen
> Django to work on for our Software Project Management course.
> I was wondering if there is some place where I can find documentation
> related to Django's Software Development process/model.
> Or if any of the community members can give some insight on the topic.
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/YTgUf90fZxkJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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



Re: Django Development Model

2012-10-28 Thread Lachlan Musicman
On Mon, Oct 29, 2012 at 2:00 PM, Lachlan Musicman  wrote:
> On Mon, Oct 29, 2012 at 9:39 AM, Smriti Patodi  wrote:
>> I was wondering if there is some place where I can find documentation
>> related to Django's Software Development process/model.
>
> Spend time with the tutorial, then just keep reading the docs - it
> doesn't really get any easier. The tutorial is fantastic.
>
> It is well marked on the front page:
> http://www.djangoproject.com/
>
> https://docs.djangoproject.com/en/1.4/intro/tutorial01/
>
> If you don't know webservers, you will need to read up on one - Apache
> or Nginx are well supported.
> If you don't know DBs, sqlite doesn't need any study, but MYSQL and
> PostgreSQL are the other two most popular options. MySQL has a lot of
> docs floating about and is easy to pick up

These will also make your life easier:

*nix:
bash and vim/emacs
pip (python installer)
virtualenv
virtualenvwrapper

django:
South (for when you make small changes in the model structure)
django-extensions (for when you need extras like "what does a map of
my models look like)

Cheers
L.

-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

-- 
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 Development Model

2012-10-28 Thread Lachlan Musicman
On Mon, Oct 29, 2012 at 9:39 AM, Smriti Patodi  wrote:
> Hi Everyone,
> I am a MSIS student at Santa Clara University, CA. My team has chosen Django
> to work on for our Software Project Management course.
> I was wondering if there is some place where I can find documentation
> related to Django's Software Development process/model.
> Or if any of the community members can give some insight on the topic.
> Thanks in advance.

Spend time with the tutorial, then just keep reading the docs - it
doesn't really get any easier. The tutorial is fantastic.

It is well marked on the front page:
http://www.djangoproject.com/

https://docs.djangoproject.com/en/1.4/intro/tutorial01/

If you don't know webservers, you will need to read up on one - Apache
or Nginx are well supported.
If you don't know DBs, sqlite doesn't need any study, but MYSQL and
PostgreSQL are the other two most popular options. MySQL has a lot of
docs floating about and is easy to pick up


Cheers
L.

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



-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

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



where to start

2012-10-28 Thread Anil
I am new to Django. 
I am not sure where to start, I am thinking of diving into 1.5 alpha and 
make use of the new custom User models.

I am working on a project that will make exclusive use of a LDAP database, 
nothing else. I expect to have users in multiple suffixes.

e.g.:

uid=user1, ou=people, o=suffix1
uid=user1, ou=people, o=suffix2
uid=user2, ou=people, o=suffix2

These users would of course be tied to their own groups, under their own 
suffix.
I am a little inundated with all the customization that is required to 
Django's user and authentication models.

It seems like I would need to write my own authentication Backend, and then 
have the custom User model tie into this. I was wondering if there are some 
examples like this out there, that I can look at that do something similar?

How would you start a project like this? Some specific direction(s) would 
be helpful.

Thanks a bunch!
Anil


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TheqdXlnqlcJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django Development Model

2012-10-28 Thread Smriti Patodi
Hi Everyone,
I am a MSIS student at Santa Clara University, CA. My team has chosen 
Django to work on for our Software Project Management course.
I was wondering if there is some place where I can find documentation 
related to Django's Software Development process/model.
Or if any of the community members can give some insight on the topic.
Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/YTgUf90fZxkJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to insert a inline form inside a form wizard?

2012-10-28 Thread Russell Keith-Magee
On Mon, Oct 29, 2012 at 2:00 AM, Rogerio Carrasqueira <
rogerio.carrasque...@gmail.com> wrote:

> Hi Everybody!
>
> I'm trying to the make a django form wizard based on this article
> http://elo80ka.wordpress.com/2009/10/28/using-a-formwizard-in-the-django-admin/,
> but I would like to know an approach to insert a inline form set inside a
> step of my wizard. I've tried to add a inline_form_set parameter value but
> nothing was happened with my form. Any Ideas?
>
> Thanks so much for help in advance.
>

Two pieces of information that may not be entirely obvious, but may help
you understand how it's done:

1) An inline formset is just a specialisation of a formset, so anything you
can do to an formset you can do to an inline formset as well

2) Formsets have an external interface that is intentionally the same as
Forms - i.e., they have an is_valid() method and a clean() method.

So - it turns out you can use a formset (or, for that matter an inline
formset) as a step in a wizard. If the formset requires additional data for
the constructor (e.g., the instance), you can provide that data using the
get_form_kwargs() method on the wizard itself.

If you're talking about having a form *and* an inline form set on the same
page of the wizard, you'll need to mess around a little bit making the
formset an attribute of the form; i.e., constructing the form will
construct the formset as an attribute; you'll need to connect up the
is_valid() method on the form to call is_valid() on the formset, and so on.
Unfortunately, there isn't any real documentation for how you'd do this, so
you'll need to tinker a little bit (although it might make a good blog post
when you're done! :-)

Yours,
Russ Magee %-)

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



Re: Documentation Bug report

2012-10-28 Thread Lachlan Musicman
Actually, I found what I think is another minor bug in the dev docs
yesterday too:

/path/django-docs-dev-en/topics/python3.html

I feel like

"On Python 3, the decorator is a no-op. On Python 2, it defines
appropriate __unicode__() and __str__() methods (replacing the
original __str__() method in the process)."

Should have s/On/In/g

cheers
L.

On Mon, Oct 29, 2012 at 10:05 AM, Ramiro Morales  wrote:
> On Sun, Oct 28, 2012 at 4:34 PM, Lachlan Musicman  wrote:
>>
>> The funniest/worst part is the title:
>>
>> Django v1.3.2 documentation
>>
>> :)
>>
>> I believe this should read DEV or at least 1.5
>
> I suspect it's because of a change I introduced a few hours ago.
> I will fix it now and hopefully it will be reflexted in the downloadable
> content soon.
>
> This is in the master branch (nascent 1.6). The 1.5 stabilization
> branch shoudn't
> be affected.
>
> --
> Ramiro Morales
>
> --
> 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.
>



-- 
...we look at the present day through a rear-view mirror. This is
something Marshall McLuhan said back in the Sixties, when the world
was in the grip of authentic-seeming future narratives. He said, “We
look at the present through a rear-view mirror. We march backwards
into the future.”

http://www.warrenellis.com/?p=14314

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



django + tinymce problems

2012-10-28 Thread sri
Hi,

I have tried using tinymce in my sample django application, but i am not 
getting the tinymce editor in my admin pages.

I am trying to setup tinymce to use in admin pages and using Django 1.4

This is how my settings.py file looks like

   MEDIA_ROOT = ' '
   MEDIA_URL = ' '
   STATIC_ROOT = ' '
   STATIC_URL = '/static/'
   TINYMCE_JS_URL = os.path.join(PROJECT_ROOT, 
"static/js/tiny_mce/tiny_mce.js")
   TINYMCE_DEFAULT_CONFIG = {
   'plugins': "table,spellchecker,paste,searchreplace",
   'theme': "advanced",
   'cleanup_on_startup': True,
   'custom_undo_redo_levels': 10,
   }
   TINYMCE_SPELLCHECKER = True
   TINYMCE_COMPRESSOR = True


And in my app, the models.py file looks like below

class place(models.Model):
place_description = models.TextField(max_length=5000)

And my admin.py field looks like below:

class PlaceDetailsAdmin(admin.ModelAdmin):
class Media:
   js = 
('/Users/Sreekanth/django_demo/godjango/sample/sample/static/js/tiny_mce/tiny_mce.js',
  
'/Users/Sreekanth/django_demo/godjango/sample/sample/static/js/textareas.js'
   )

And the tiny_mce is stored in the /static/js/ folder inside my project.

With the above settings, when i login to admin, i can not see any tinymce 
editor for place_description field.

Could someone please let me know what i am missing?

Thanks
Sreekanth

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/7-rfBYYoCpoJ.
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: Documentation Bug report

2012-10-28 Thread Ramiro Morales
On Sun, Oct 28, 2012 at 4:34 PM, Lachlan Musicman  wrote:
>
> The funniest/worst part is the title:
>
> Django v1.3.2 documentation
>
> :)
>
> I believe this should read DEV or at least 1.5

I suspect it's because of a change I introduced a few hours ago.
I will fix it now and hopefully it will be reflexted in the downloadable
content soon.

This is in the master branch (nascent 1.6). The 1.5 stabilization
branch shoudn't
be affected.

-- 
Ramiro Morales

-- 
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: display additional information, best practice

2012-10-28 Thread Sergiy Khohlov
Have you tried detailview ?
Also it is possible to add some values to the temple in view

2012/10/28 Stefano Tranquillini :
> Hi all.
> just a question about how to proceed.
> when i've to display data direct from the model (the db) one in a page is
> simple.
> what if i want to display aggregate data or some data that needs logic?
> i've to do it in the view and add the object to the contex, or it's better
> to do a custom tag filter?
>
> what if i've a list of objects and for each object i've to compute an
> aggregate data?
> for example i've a list of cars and for each car i want to know how many
> models exists. if i do in the view, how can i attach the aggregate data
> (which is a query) to each car? is it better to do with a custom tag filter?
>
> ciao.
>
> --
> Stefano
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

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



Documentation Bug report

2012-10-28 Thread Lachlan Musicman
Hola,

After the thread about improving the Class based View documentation someone
pointed us to the dev docs, which I downloaded to read (low bandwidth area,
plus intermittent network and power availability).

I downloaded the zip from the HTML link on the front page.

The new docs are great - they look amazing, there's some real clarity now
with those 2 sentence ledes on the first three sections. I'm only up to the
first page on the CBV but alreay I feel like I've learnt something - so the
docs have improved. Thankyou and congrats!

The funniest/worst part is the title:

Django v1.3.2 documentation

:)

I believe this should read DEV or at least 1.5

Cheers
L.


-- 
...we look at the present day through a rear-view mirror. This is something
Marshall McLuhan said back in the Sixties, when the world was in the grip
of authentic-seeming future narratives. He said, “We look at the present
through a rear-view mirror. We march backwards into the future.”

http://www.warrenellis.com/?p=14314

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



display additional information, best practice

2012-10-28 Thread Stefano Tranquillini
Hi all.
just a question about how to proceed.
when i've to display data direct from the model (the db) one in a page is
simple.
what if i want to display aggregate data or some data that needs logic?
i've to do it in the view and add the object to the contex, or it's better
to do a custom tag filter?

what if i've a list of objects and for each object i've to compute an
aggregate data?
for example i've a list of cars and for each car i want to know how many
models exists. if i do in the view, how can i attach the aggregate data
(which is a query) to each car? is it better to do with a custom tag filter?

ciao.

-- 
Stefano

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



Django request with unicode strings wrongly UTF-8 encoded

2012-10-28 Thread Gontran Magnat


I'm having some trouble making my website compatible with accented 
characters (french website).

I have a form where some field values can be with accented chars: "Coupé" 
for instance.

My URL looks like this:

http://localhost:8080/recherches/s?marque=Audi=A5+Coup%C3%A9

In my django view I do something like this:

def search(request):
  logger = logging.getLogger('custom')
  criteria_form = CriteriaForm(request.GET or None)
  logger.debug("search")
  logger.debug(request.GET)

And what I get in my logs is:



If I query my database with this variable "modeles", I get an error:

>>> mo = u'A5 Coup\xc3\xa9'>>> Vehicule.objects.filter(valid=True, 
>>> modele=mo)[0].marque.nameTraceback (most recent call last):
  File "", line 1, in 
  File "/Library/Python/2.7/site-packages/django/db/models/query.py", line 211, 
in __getitem__
return list(qs)[0]IndexError: list index out of range

Things work if I query the database with the utf-8 version:

>>> mo = 'A5 Coup\xc3\xa9'>>> Vehicule.objects.filter(valid=True, 
>>> modele=mo)[0].marque.name
u'Audi'

So I think (but I might be wrong) that my problem comes from the fact that 
my variable is utf8 and then encoded with unicode.

How comes this is encoded that way?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/qOX6yFHhnaYJ.
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: Changing the index page

2012-10-28 Thread Sorin Popa
Hello,.. obviously my answer comes late, but - as I am now learning Django 
and I ran into the same issue, here's my post - may be helpful for anyone 
getting in the same trouble.

I am following the tutorial for Django 1.3.
On my Ubuntu 12.10 I have installed with Synaptic Django 1.4.1, but I 
believe I already had a Django 1.3.3 before... now the result is... in my 
command-line django-admin tells me the version is 1.3.3.

But I am pretty convinced that something mixed up, and that's how this 
trouble came...

Solution to "fix" your copy of index.html from the tutorial part 2:
- replace: {% load i18n admin_static %} *with* {% load i18n static %}
- replace: href="{% static "admin/css/dashboard.css" %}" *with* href="{% 
get_static_prefix %}admin/css/dashboard.css"


I hope this helps!
Sorin

miercuri, 11 ianuarie 2012, 04:51:07 UTC+1, kalyan boga a scris:
>
> Hi,
>
> I was working on tutorial 2 and i tried to change the layout of index 
> page. Copied the index.html template to my template folder under admin and 
> changed the contents to suit the site. The second line errors out :  
> {% load i18n admin_static %}
>
> The error on the page reads :
> TemplateSyntaxError at /admin/ 
>
> 'admin_static' is not a valid tag library: Template library admin_static not 
> found, tried 
> django.templatetags.admin_static,django.contrib.admin.templatetags.admin_static
>
>
>
> What did i miss ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/NcMX0qVYXTcJ.
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: Announcing django user group switzerland

2012-10-28 Thread Stefan Foulis
Dear Djangonauts

Thank you for everyone who joined. I had a great time.
I'm looking forward to our next meetup that will take place sometime in 
January. We'll announce details on our meetup page ( 
http://www.meetup.com/Django-User-Group-Switzerland/ ) page shortly.
There are some Pictures at http://goo.gl/ULrCz .

Cheers
Stefan

On Tuesday, September 18, 2012 3:12:31 AM UTC+2, Stefan Foulis wrote:
>
> *Dear Djangonauts
>
> After the positive experiences at djangocon 2012 in Zürich, we’d like to 
> further strengthen the swiss django user community and therefore invite you 
> to the first meetup of the django user group switzerland. We plan to have 
> bi-monthly meetings at alternating locations.
>
> The first meetup will take place on the 25th of October 2012 at 19:00 at 
> the Divio offices in Zürich. There will be food and drinks.
>
> Please RSVP at 
> http://www.meetup.com/Django-User-Group-Switzerland/events/82358442/
>
> We’re looking for speakers, so if you’d like to present a talk, please 
> contact us over our meetup.com page (
> http://www.meetup.com/Django-User-Group-Switzerland/).
>
> Cheers*
> *
> Stefan Foulis*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/N7_svED-oC0J.
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.