Re: In Apache Configuration, What Replaces mod_python
On Mon, Jan 24, 2011 at 10:10 AM, octopusgrabbus wrote: > I'm trying to reconfigure to mod_wsgi and am wisely starting with a > workstation. > > If I'm understanding you correctly, you're trying to migrate from using apache/mod_python to serve your Django project to apache/mod_wsgi, right? If this is the case, is there something special about your setup such that the instructions at http://docs.djangoproject.com/en/1.2/howto/deployment/modwsgi/ don't apply? -- 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: model array to javascript
I would recommend first converting it to an intermediary format, such as JSON or XML, as described here: http://docs.djangoproject.com/en/1.2/topics/serialization/ You can then use JavaScript to easily manipulate it in whatever way you want. This is basically the approach I take when doing AJAXy things. HTH On Mon, Jan 24, 2011 at 9:56 AM, nicolas lubkov wrote: > hello all i was wandering if its possible to pass a model.objects.filter() > array like ¨Category¨ and ¨ Sub-category ¨ to JavaScript. > > this is meant to be used in a JavaScript function to fill > a Combo-box Sub-category by changing the Combo-box ¨¨Category¨ > > -- > Saludos. > > Nicolas Lubkov > Ing. Informatica de gestion > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: 'unique' field upon inserting
On Tue, Jan 25, 2011 at 10:28 AM, Jonas Geiregat wrote: > The id field (which is added by django by default has this) other then that > the field doesn't have unique=True > > I was also thinking of a better solution. > > I have a Gig model which contains gigs with a ForeignKey to Artist. > I have a Artist model which contains artists. > > One Gig can have multiple artists. > > So instead of creating a field that is unique for each Gig (which might > occur more then once since each gig might have more the one artist) I was > thinking of the following. > > Create a model GigArtist (and leave the Artist Foreign key out of the Gig > model). > > This model contains two fields one who references to a specific gig and one > that references to a (or more then one) specific artist. > > > > > > Op 25-jan-2011, om 16:20 heeft Shawn Milochik het volgende geschreven: > > > Do you have 'unique = True' in the field definition in the model? > > > > -- > > 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. > > > > Met vriendelijke groeten, > > Jonas Geiregat > jo...@geiregat.org > > > > > -- > 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. > > Why can't you just use a ManyToManyField ( http://docs.djangoproject.com/en/1.2/ref/models/fields/#manytomanyfield)? Or am I not correctly understanding what you're trying to do? -- 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.
Simple Django Report Generator
Hello - I'm wondering if anyone has any suggestions/recommendations for a flexible Django report generator. Basically, I'd like to give user's the ability to query a given model based on user-defined filters. For example, for an application that tracks information about a company's employees, often a manager will want to run a report saying "show me all the employees in the accounting department who have been employeed for X or more years," or something to that effect. Clearly, these kind of reports are trivial for me to hard code using Django's ORM, but a much more ideal solution would be to provide users with a (dare I say it) MS Access-like query builder, that would allow them to choose the columns they want, define basic filters, and a sorting order, and then review the results in a tabular format. I've looked around and haven't quite found anything that meets my needs, so I'd appreciate any suggestions anyone might have. If nothing exists, I'll probably try to write something myself, and make it my contribution to the OSS community if its any good, but obviously I'd rather not reinvent the wheel. Thanks in advance! -- 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: Rewriting Java UI for Django?
David - I'm not sure I follow exactly what you're asking. If you're trying to basically port a Java/Swing application to Django: Django is a web application framework. Python with the Django libraries are used on the back end, and HTML is used on the front end (technically it is possible to use something other than an HTML front end, but that woud be very unusual). So, in answer to your question, HTML/JavaScript/CSS/etc are used to develop your UI. Django does offer some utilities to make your job easier (see the docs for forms and templates), but the majority of the UI design must be done by hand. Also note that Django does automatically generate an admin UI for all of your database models. By default, its a pretty simple CRUD interface, but you can modify it a bit, see the docs. If, however, you're asking how to "wrap" an existing Java/Swing application inside of Django... That would be much more complicated, and probably not a very good idea. HTH On Thu, Mar 24, 2011 at 10:13 AM, David Kovar wrote: > Greetings, > > I'm fairly experienced with Python for backend, non UI/UX tasks but am very > new to trying to do any UI work other than command lines. This'll come off > as a very newbie question, and it is. > > I need to take an existing Java/Swing UI and wrap it inside of Django to > provide authentication, customer support, etc. I've got a pretty good handle > on most of this, except for: > >What is the best Python approach to writing a web UI that includes > dropdown menus, radio buttons, etc? > > It may be that Django will do this for me, but I've not figured out how to > do so yet. > > Thanks > > -David > > -- > 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.