Re: Django ORM - query help

2012-04-11 Thread Jani Tiainen
11.4.2012 23:47, David kirjoitti: Thanks for your reply. I am grateful for your help. If you remember this question when you feel less sleepy I'd be very interested to see the inner join alternative :) Thanks again Well, after good night sleep I've some idea. Something like should do the

Re: ecommerce like openCart in php

2012-04-11 Thread Eugene MechanisM
I would recommend this shop http://tangentlabs.github.com/django-oscar/ четверг, 12 апреля 2012 г., 2:34:07 UTC+4 пользователь randa hisham написал: > > > iam searching for an ecommerce open source like OpenCart in php > - - > Randa Hesham > Software Developer > > Twitter:@ro0oraa

Re: ecommerce like openCart in php

2012-04-11 Thread Eugene MechanisM
https://github.com/RaD/dishop четверг, 12 апреля 2012 г., 2:34:07 UTC+4 пользователь randa hisham написал: > > > iam searching for an ecommerce open source like OpenCart in php > - - > Randa Hesham > Software Developer > > Twitter:@ro0oraa > FaceBook:Randa

Re: ecommerce like openCart in php

2012-04-11 Thread Timothy Makobu
Have a look around here http://djangopackages.com/grids/g/ecommerce/ On Thu, Apr 12, 2012 at 3:46 AM, Alec Taylor wrote: > [Maybe] Mezzanine? > > On Thu, Apr 12, 2012 at 10:35 AM, m1chael wrote: > > i think you're barking up the wrong tree miss Hisham

Re: ecommerce like openCart in php

2012-04-11 Thread Alec Taylor
[Maybe] Mezzanine? On Thu, Apr 12, 2012 at 10:35 AM, m1chael wrote: > i think you're barking up the wrong tree miss Hisham > > On Wed, Apr 11, 2012 at 6:34 PM, Randa Hisham wrote: >> >> iam searching for an ecommerce  open source like OpenCart in php >>

Re: ecommerce like openCart in php

2012-04-11 Thread m1chael
i think you're barking up the wrong tree miss Hisham On Wed, Apr 11, 2012 at 6:34 PM, Randa Hisham wrote: > > iam searching for an ecommerce  open source like OpenCart in php > -  - > Randa Hesham > Software Developer > > Twitter:@ro0oraa > FaceBook:Randa Hisham > > ٍ > >

Re: PostgreSQL Introspection Bug

2012-04-11 Thread akaariai
On Apr 11, 4:39 pm, Thomas Guettler wrote: > I fixed a postgreSQL introspection bug, but unfortunately it is still in > stage "new". > > Can someone please review it? > >    https://code.djangoproject.com/ticket/17785 I hope to find time to look at this. No promises, but

ecommerce like openCart in php

2012-04-11 Thread Randa Hisham
iam searching for an ecommerce open source like OpenCart in php - - Randa Hesham Software Developer Twitter:@ro0oraa FaceBook:Randa Hisham ٍ -- You received this message because you are subscribed to the Google Groups

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-11 Thread John Yeukhon Wong
Thanks to both of you. Kevin, how would I do a regex mask for views? Thanks. On Wednesday, April 11, 2012 2:05:27 AM UTC-4, Kevin wrote: > > Separating GET and POST is normally used for RESTful web programming. > Which is becoming a very common practice is popular competing frameworks, > such

Re: Django ORM - query help

2012-04-11 Thread David
Thanks for your reply. I am grateful for your help. If you remember this question when you feel less sleepy I'd be very interested to see the inner join alternative :) Thanks again -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this

Re: Saving test user as a foreign key in unit tests

2012-04-11 Thread jondbaker
Problem solved. Within my view I needed use the following: def create_tasting(request): if request.method =='POST': form = TastingForm(request.POST) if form.is_valid(): *obj = form.save(commit=False)* *obj.author = request.user* *obj.save()*

Re: Tutorial question regarding def _unicode_

2012-04-11 Thread Brandy
Yep..that's it. Thanks! On Apr 11, 12:55 pm, Jonathan Baker wrote: > The method should begin and end with two underscores: __unicode__(self): > > > > > > On Wed, Apr 11, 2012 at 11:30 AM, Brandy wrote: > > I am working through the

Saving test user as a foreign key in unit tests

2012-04-11 Thread jondbaker
I have a Tasting model with an 'author' field that is a ForeignKey to the User model. Within my unit test I'm attempting to create a test user, and pass that user object as the author of a test Tasting, but I keep getting the following error: "IntegrityError: tastings_tasting.author_id may not

Python Library for Audio Files - Clipping mp3/ogg formats

2012-04-11 Thread BGMaster
Hi, I know this isn't a django specific question, but does anyone know of a good python library or module for clipping/cutting an mp3 or ogg file at a specified start and stop time? The functionality I need is: 1) take file (example.mp3) 2) take start and stop times (hh:mm:ss, hh:mm:ss) 3)

Re: Tutorial question regarding def _unicode_

2012-04-11 Thread Gerald Klein
Have you resynced? On Wed, Apr 11, 2012 at 12:30 PM, Brandy wrote: > I am working through the tutorial and have already added the def > _unicode_ statements to my code. However, when running > Poll.objects.all(), I still get this output: [] > > Here is the code: > >

Re: Tutorial question regarding def _unicode_

2012-04-11 Thread Babatunde Akinyanmi
I don't know if its because I'm reading this mail from my phone but you should have __unicode__() not _unicode_() ie is 2 underscores before and after not 1 On 4/11/12, Brandy wrote: > I am working through the tutorial and have already added the def > _unicode_

Re: Tutorial question regarding def _unicode_

2012-04-11 Thread Jonathan Baker
The method should begin and end with two underscores: __unicode__(self): On Wed, Apr 11, 2012 at 11:30 AM, Brandy wrote: > I am working through the tutorial and have already added the def > _unicode_ statements to my code. However, when running > Poll.objects.all(), I

Tutorial question regarding def _unicode_

2012-04-11 Thread Brandy
I am working through the tutorial and have already added the def _unicode_ statements to my code. However, when running Poll.objects.all(), I still get this output: [] Here is the code: from django.db import models class Poll(models.Model): question = models.CharField(max_length=200)

Re: Django ORM - query help

2012-04-11 Thread Jani Tiainen
Hi, You're not doing anything wrong. The catch is that since "Thing" can exist without Log you will get outer join. If you want to get along with inner join, you should turn query around and start querying from Log model. I'm just too tired to think how it should be done right now... =) On

how to submit data in django's database

2012-04-11 Thread Sophia
Hi all, I have a question about how to enter data in django's database. I have the following Template, in which ' E ' is a variable that get the string: This is my models.py in which I have a class named 'Company' and I want this variable 'E' be saved in 'Subject' : class

Django ORM - query help

2012-04-11 Thread David
class Log(models.Model): thing = models.ForeignKey(Thing) context = models.CharField(max_length=255) action = models.CharField(max_length=255) modifier = models.ForeignKey(User, limit_choices_to={'groups__in': [2]}) modified_on = models.DateTimeField(auto_now=True) class

Re: Quick tutorial question

2012-04-11 Thread Mark Phillips
Check the bottom of tutorial #1 - Wait a minute. is, utterly, an unhelpful representation of this object. Let's fix that by editing the polls model (in the polls/models.py file) and adding a

Re: Admin area hyperlinks to sub categories

2012-04-11 Thread Sandro Dutra
more: https://docs.djangoproject.com/en/1.4/ref/contrib/admin/actions/ 2012/4/11 Sandro Dutra > # File: admin.py > from django.contrib import admin > from distribute.models import Categories > (...) > class CategoriesAdmin(admin.ModelAdmin): > list_display = ['category']

Re: Admin area hyperlinks to sub categories

2012-04-11 Thread Sandro Dutra
# File: admin.py from django.contrib import admin from distribute.models import Categories (...) class CategoriesAdmin(admin.ModelAdmin): list_display = ['category'] (...) (...) admin.site.register(Categories, CategoriesAdmin) (...) 2012/4/11 Swaroop Shankar V > Hi,

Re: Admin area hyperlinks to sub categories

2012-04-11 Thread Swaroop Shankar V
Hi, Could anyone provide me a solution please? Thanks Regards, Swaroop Shankar V On Mon, Apr 9, 2012 at 2:53 PM, Swaroop Shankar V wrote: > Hi all, > I have 2 models one is Category and another one is Book. Books will > be assigned to a category. So on the admin area i

PostgreSQL Introspection Bug

2012-04-11 Thread Thomas Guettler
Hi, I fixed a postgreSQL introspection bug, but unfortunately it is still in stage "new". Can someone please review it? https://code.djangoproject.com/ticket/17785 Thank you, Thomas Güttler -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de --

Quick tutorial question

2012-04-11 Thread oneroler
I'm working through the tutorial and was setting up the admin site for the polls app. I noticed in the "Select Poll to Change" section that it was showing "poll object" rather than "what's up" or the question associated with the poll. Same is true on the Choice area of admin, the dropdown for

Need help with Django formsets

2012-04-11 Thread BeriK
I'm making a survey site with django. I am pretty newbie with django so I apologize in advance if I can not explain well. My question focuses on the following models: class SurveyType(models.Model): name = models.CharField(max_length=200) def

Variations on a table for different clients?

2012-04-11 Thread Derek
Does anyone have any experience with working with systems where different clients all need variations on the same basic table; there might be, say, 10 common fields, but each client will need an additional 2 or 3 that are specific to them (and, possibly, not need 1 or 2 of the common ones). What

Re: Best approach for multiple sites in a single deployment?

2012-04-11 Thread Derek
That domain and page do not exist... On Apr 10, 4:42 pm, Mario Gudelj wrote: > Hey man, > > See if this > helpshttp://tidbids.posterous.com/saas-with-django-and-postgresql-schemas > > Cheers, > > -m > > On 10 April 2012 21:53, Bernardo wrote: > >

Re: Can't create a test suite for a Django app

2012-04-11 Thread Benedict Verheyen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > Hi all, > > I'm having trouble creating a test suite in Django 1.3. > > Say I have an installed app in a directory called app_name. One of the > files in that directory is foo.py which defines a class named Foo. I > want to test that, so I also

Re: Tutorial issue with admin

2012-04-11 Thread Alexandr Aibulatov
You can add list_display = ['question', ] on your PollAdmin class. 2012/4/11 Romain Gaches : > you just have to define a __unicode__ method [1] in your model > > [1] > https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.__unicode__ > > > Le

Re: Filtering ForeignKey Drop Down in Admin Interface

2012-04-11 Thread Святослав Б
Hi! Override ModelAdmin get_form() method and filter your field. class MyAdmin(admin.ModelAdmin): def get_form(self, request, obj=None, **kwargs): form = super(MyAdmin,self).get_form(request, obj,**kwargs) form.base_fields['field'].queryset =

Passing current logged in system user to a django app

2012-04-11 Thread Benedict Verheyen
Hi, I've made a dashboard app for my company that is going to be widely used. The dashboard is a collection of links to apps and some other functionality. Server runs Debian Linux, Nginx with Gunicorn. Nothing special but, now I need to log on twice, once for Windows, and once for the app. Is

Re: Force logout a user in signed cookie mode

2012-04-11 Thread Mario Gudelj
Does this help http://stackoverflow.com/questions/953879/how-to-force-user-logout-in-django ? On 11 April 2012 14:40, Cherian Thomas wrote: > Hi, all > Can someone help? > - Cherian > > > > On Tue, Apr 10, 2012 at 11:51 AM, Cherian wrote: > >> Hi

Re: Tutorial issue with admin

2012-04-11 Thread Romain Gaches
you just have to define a __unicode__ method [1] in your model [1] https://docs.djangoproject.com/en/1.4/ref/models/instances/#django.db.models.Model.__unicode__ Le 11/04/2012 06:54, oneroler a écrit : I'm working on the tutorial and ran across an issue that I can't figure out. In the

Filtering ForeignKey Drop Down in Admin Interface

2012-04-11 Thread Setiaman Lee
Hi, I managed to set in the QuerySet of ModelAdmin to only allow user to see their own record. But when the child model link to parent model using ForeignKey a Drop Down will be automatically created for the respective column. Is there anyway to filter the drop down to only show the records that

Re: Is it a good practice to delegate views based on GET / POST?

2012-04-11 Thread Kevin
Separating GET and POST is normally used for RESTful web programming. Which is becoming a very common practice is popular competing frameworks, such as Rails. Personally I would prefer a more "native" way in Django to separate GET/POST views. I guess this could be done via a decorator or