Re: ifequal template problem

2006-07-17 Thread Carlos Yoder

Forgot to say, I have the same logic working with no problem, but for
a CharField, so this issue must be related to the field's datatype...

On 7/17/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> Hello there,
>
> I'm using a object_detail generic view to display some data. One of
> the object's fields is an IntegerField, with choices limited to
> MONTHS, a tuple of tuples mapping the values.
>
> Now, on the template I want to expand the stored values to the
> 'human_readable' val, using somehting like:
>
> 
> Prva registracija:
> 
> {% for data in MONTHS.items %}
> {% ifequal data.0 object.prva_registracija_mm %}
> {{ data.1 }}
> {% else%}
> debug: {{ data.0}} is not equal to {{ 
> object.prva_registracija_mm }} 
> {% endifequal %}
> {% endfor %}
> {{ object.prva_registracija_mm}}.{{ 
> object.prva_registracija_}}
> 
>
> The dictionary arrives correctly at the template via this code:
>
> (r'^(?P\d+)/$',
> 'django.views.generic.list_detail.object_detail',
> dict(info_dict, extra_context={'MONTHS': dict(MONTHS) })),
>
> ...and everything seems to be fine. When I run the template on the
> browser, the stored value (an integer 2) never matches what I suppose
> is a string '2'.
>
> How should I convert this to same datatypes? I'm sure this is a very
> common task (expanding admin choices), isn't it?
>
> Best regards and big thanks,
>
> --
> Carlos Yoder
> http://carlitosyoder.blogspot.com
>


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Filter on count of ManyToManyField

2006-07-17 Thread Carlos Yoder

I had a similar problem, and just used custom SQL. It's easy:


from django.db import connection
cursor = connection.cursor()
cursor.execute("""
SELECT cars_model.id, cars_model.opis,
cars_znamka.id, cars_znamka.opis,
COUNT(*)
FROM cars_model, cars_vozilo, cars_znamka
WHERE cars_model.id=cars_vozilo.model_id
AND cars_znamka.id = cars_model.znamka_id
GROUP BY cars_model.id, cars_model.opis, cars_znamka.id, 
cars_znamka.opis
HAVING COUNT(*)>0
""")
result_list = []
for row in cursor.fetchall():
# create the dictionary object, that you'll pass to your 
template.
 dict_obj = {
"id" : row[0],
"opis" : "%s %s" % (row[3], row[1]),
"cars_count":row[4]
 }
 result_list.append(dict_obj)

# template expects "model_list"
model_list = result_list


Hope this helps,

Carlos

On 7/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> This is probably trivial, but I've not managed to find the solution.
> How do I filter objects based on the count of a ManyToManyField?
>
> My example:
>
> I have two classes -- Blog and Submission:
>
> class Blog( models.Model ):
> entries = models.ManyToManyField( Submission )
>
> class Submission( models.Model ):
>   [... whatever ]
>
> I want to fetch a list of all Blog instances which have at least one
> Submission , i.e. entries.count() > 0. Changing the model is not an
> option.
>
> I've been trying all kinds of permutations of filter, entries, count,
> gt, etc, such as:
> Blog.objects.filter(entries__count__gt = 0)
>
> No luck so far.
>
> Can somebody please help me?
>
> Thanks,
> Daniel
>
>
> >
>


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Not sure how to do this (many to many problem)

2006-07-17 Thread Carlos Yoder

Hello!

I'm building a sort of b2b app that lists a car catalogue. A car can
have multiple 'special prices', linked to groups of wholesalers. So
when wholesaler W logs into the app, he should  see a 'special price
just for you' control, displaying the proper price.

In a custom app I'd have a 'modified' m2m relationship, sort of like this:

SpecialPrices
idCars (int FK)
idWholesalers (int FK)
Price (float)

The problem is, I don't know how to do this in Django. I tried doing:

class SpecialPrice(models.Model):
""" A price for a special user (company)"""
user= models.ForeignKey(User)
special_price = models.FloatField("Custom Price", max_digits=9,
decimal_places=2)

class Car(models.Model):
#...
special_prices = models.ManyToManyField(SpecialPrice,
filter_interface=models.HORIZONTAL)


... but that's not what I mean. I need the special prices to be unique
to Car and Wholesaler.


Could anyone be so kind as to shed some light on how to do this, the Django way?

Mil gracias,

-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Not sure how to do this (many to many problem)

2006-07-17 Thread Carlos Yoder

I guess I found a lead at tests\modeltests\m2m_intermediary\

if anyone knows if that's correct (or wrong as hell), please let me know :-)



On 7/17/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> Hello!
>
> I'm building a sort of b2b app that lists a car catalogue. A car can
> have multiple 'special prices', linked to groups of wholesalers. So
> when wholesaler W logs into the app, he should  see a 'special price
> just for you' control, displaying the proper price.
>
> In a custom app I'd have a 'modified' m2m relationship, sort of like this:
>
> SpecialPrices
> idCars (int FK)
> idWholesalers (int FK)
> Price (float)
>
> The problem is, I don't know how to do this in Django. I tried doing:
>
> class SpecialPrice(models.Model):
> """ A price for a special user (company)"""
> user= models.ForeignKey(User)
> special_price = models.FloatField("Custom Price", max_digits=9,
> decimal_places=2)
>
> class Car(models.Model):
> #...
> special_prices = models.ManyToManyField(SpecialPrice,
> filter_interface=models.HORIZONTAL)
>
>
> ... but that's not what I mean. I need the special prices to be unique
> to Car and Wholesaler.
>
>
> Could anyone be so kind as to shed some light on how to do this, the Django 
> way?
>
> Mil gracias,
>
> --
> Carlos Yoder
> http://carlitosyoder.blogspot.com
>


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Not sure how to do this (many to many problem)

2006-07-17 Thread Carlos Yoder

> I'd do it the "classic" way.

Thank you Javier, that did it.

Little thing remains though. My admin console for a Car is quite
large, and it's organized neatly using Admin.fields. However, the
SpecialPrices table (linked here using edit_inline=True), always
appear at the end of the page.

Do you know of a way to configure and alter this behaviour?

Mil gracias,


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Error with "media" dir on Windows, Python 2.3, etc

2006-07-18 Thread Carlos Yoder

Hello people,

On my dev box I'm having problems using the MEDIA_URL. I'm running the
development server  with the 'not-recommended' hack for serving static
files, and I believe MEDIA_URL and MEDIA_PATH are correct (similar
config work fine on production).

Mind you, files get uploaded and saved via admin, but when trying to
accessing them I get:

Page not found:
d:\dev\python23\lib\site-packages\django-0.95-py2.3.egg\django/contrib/admin/media\cars/alfa145_.jpg


That path certainly looks suspicious... ideas?

Mil gracias,

-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Admin and limit_choices_to, part XXXIII =)

2006-07-18 Thread Carlos Yoder

Hello,

I know many before me have asked about making a dynamic
limit_choices_to tag. So far, I've had no luck (note to Aidas:
couldn't make your solution work!).

Anyway, I'm thinking on doing it the old school way, which is creating
arrays of JS objects with the relationships between 2 
objects, wiring the first 's onChange even to a selectChild()
function, etc.

Now, the question would be... is there a way of accessing a
ForeignKey's rendered widget's events, so I can play around with
"onChange"? I believe I can output the necessary arrays via the
Meta.js property.

Ideas? Help much appreciated,

-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: ifequal template problem

2006-07-18 Thread Carlos Yoder

OK, I fixed it, by defining a 'computed' method that returns the int
value in str form. So silly!

def prva_registracija_mm_str (self):
return str(self.prva_registracija_mm)

Ohwell :-)


On 7/17/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> Forgot to say, I have the same logic working with no problem, but for
> a CharField, so this issue must be related to the field's datatype...
>
> On 7/17/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > Hello there,
> >
> > I'm using a object_detail generic view to display some data. One of
> > the object's fields is an IntegerField, with choices limited to
> > MONTHS, a tuple of tuples mapping the values.
> >
> > Now, on the template I want to expand the stored values to the
> > 'human_readable' val, using somehting like:
> >
> > 
> > Prva registracija:
> > 
> > {% for data in MONTHS.items %}
> > {% ifequal data.0 object.prva_registracija_mm %}
> > {{ data.1 }}
> > {% else%}
> > debug: {{ data.0}} is not equal to {{ 
> > object.prva_registracija_mm }} 
> > {% endifequal %}
> > {% endfor %}
> > {{ object.prva_registracija_mm}}.{{ 
> > object.prva_registracija_}}
> > 
> >
> > The dictionary arrives correctly at the template via this code:
> >
> > (r'^(?P\d+)/$',
> > 'django.views.generic.list_detail.object_detail',
> > dict(info_dict, extra_context={'MONTHS': dict(MONTHS) })),
> >
> > ...and everything seems to be fine. When I run the template on the
> > browser, the stored value (an integer 2) never matches what I suppose
> > is a string '2'.
> >
> > How should I convert this to same datatypes? I'm sure this is a very
> > common task (expanding admin choices), isn't it?
> >
> > Best regards and big thanks,
> >
> > --
> > Carlos Yoder
> > http://carlitosyoder.blogspot.com
> >
>
>
> --
> Carlos Yoder
> http://carlitosyoder.blogspot.com
>


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Extending pluralize?

2006-07-18 Thread Carlos Yoder
> For full i18n pluralization use:
>
> (from http://www.djangoproject.com/documentation/i18n/#pluralization)
> [
> {% blocktrans count list|counted as counter %}
> There is only one {{ name }} object.
> {% plural %}
> There are {{ counter }} {{ name }} objects.
> {% endblocktrans %}
> ]
>
> And in sl/django(js).po file add:
>
> (from 
> http://www.gnu.org/software/gettext/manual/html_chapter/gettext_10.html#SEC150)
> [
> Four forms, special case for one and all numbers ending in 02, 03, or 04
> The header entry would look like this:
>
> Plural-Forms: nplurals=4; \
> plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3;
>
> Languages with this property include:
>
> Slavic family
> Slovenian
> ]
>
> You can look for example in sr translation because current sl translation 
> don't have
> Plural-Forms defined.
>
> --
> Neboj¹a Ðorðeviæ - nesh

Hvala Neboj¹a!

Unfortunately, I believe there's a couple of caveats still here, but
this is definitely a source to investigate!


Regards,

-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Related tags query, many-to-many double join

2006-07-19 Thread Carlos Yoder
I second Simon on that -- it's still light years ahead of spaghetti code! =)

On 7/19/06, Simon Willison <[EMAIL PROTECTED]> wrote:
>
>
> On 19 Jul 2006, at 13:50, Maciej Bliziñski wrote:
>
> > is it possible to make the same thing without writing custom SQL code?
>
> No it isn't - but that's fine, that's exactly why Django allows (and
> encourages) you to roll your own SQL when you need to:
>
> http://www.djangoproject.com/documentation/model_api/#executing-
> custom-sql
>
> My philosophy with respect to the Django ORM (and ORMs in general) is
> that it should be used strictly for convenience - it should make the
> usual dull collection of queries as simple as possible. If the ORM is
> ever less convenient than writing a raw SQL query, write a raw SQL
> query!
>
> As long as you keep all of the SQL interactions in your Django model
> classes your database logic will all be in the same place and
> maintenance should be simple.
>
> Cheers,
>
> Simon
> >
>


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Django WORKS at Servage.net!

2006-07-20 Thread Carlos Yoder

Awake, Fear Fire Foes!

I finally made it! After hitting many walls with customer support at
Servage.net, I got Django runnning on their servers!

Following on the steps of Jeff Croft's excellent DreamHost tutorial, I
first installed Django on BlueHost (with a couple of modifications
that I'll have to write down and share), and later I bit the bullet
and went out to get Servage.net.

It runs OK, though with many restrictions:

 * FastCGI only
 * No shell access, so forget about anything related to manage.py
 * MySQL databases only

I'll definitely write the experience down and share it with the world
-- it just took too much effort NOT to do it (imagine all sorts of
silly quirks flying around at the same time).

So there, I'm happy I managed! =)

-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Re: Any good Python book recommendations?

2006-07-23 Thread Carlos Yoder

>> Any recommendations? I'm brand new to Python and want to learn for
>> use with Django.
> The "Learning Python" O'Reilly book is really, really good - one of
> the best "Learning X" books I've read for any language.


Even better than "Learnin Perl"? =)

(ducks)


-- 
Carlos Yoder
http://carlitosyoder.blogspot.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
-~--~~~~--~~--~--~---



Simple manipulator to 'reserve' an item?

2006-09-29 Thread Carlos Yoder
Hello djangonauts!I'm facing the task of writing my first manipulator, and they look extremely cool -- (un)fortunately, my needs are extremely simple. I must allow users to 'reserve' a certain product, by just clicking on a button, which in turn would only need to modify a couple fields in the DB (who reserved it, and for how long, which is a default value anyway).
I already have a generic view handling the item page (using django.views.generic.list_detail.object_detail, of course) . What would be simplest way to get this working? I was reading the docs on Manipulators and Validators, and they seem fantastic -- but too much for this first little requirement.
Any help greatly appreciated. Best regards,-- Carlos Yoderhttp://carlitosyoder.blogspot.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  -~--~~~~--~~--~--~---


Re: Simple manipulator to 'reserve' an item?

2006-09-29 Thread Carlos Yoder
In lieu of using a manipulator for this simple task, you could use yourown HTML form. Have your form submit to a view method that grabs your
product's id/slug from the request.POST MultiValueDict and performs anupdate of your model as needed.Rajesh, thank you very much! I knew it was overkill. Namaskar,
-- Carlos Yoderhttp://carlitosyoder.blogspot.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  -~--~~~~--~~--~--~---


Help with related objects

2006-10-03 Thread Carlos Yoder
Hello all, I'm asking for help again, this time with related objects.I need to do what I think is a very simple task: allow users to edit their own preferences (using a custom 'admin' like interface).Their own preferences are located in an extension of the User model, as follows:
class UserProfile(models.Model):    user = models.ForeignKey (User, core=True, edit_inline=False, max_num_in_admin=1, min_num_in_admin=1, num_in_admin=1, num_extra_on_change=0, unique=True)    receive_new_cars_newsletter = 
models.BooleanField("Subscribed to daily 'new cars' newsletter?", null=False, blank=False, default=True)    receive_modif_cars_newsletter = models.BooleanField("Subscribed to daily 'new cars' newsletter?", null=False, blank=False, default=True)
        def __str__(self):        return ("%s" % self.user)    When users are created by the superadmin (via the normal Admin interface), these related fields are not populated, naturally. So, I'd have to present the users with default values for receive_new_cars_newsletter and receive_modif_cars_newsletter (only a checkbox, as it is), and allow them to set their values.
This is an excruciatingly easy thing to do, but still I can't find my way around generic views, forms, manipulators, related objects, the undocumented 'follow' and the rest of the pie. It's -of course- the first time I tackle this, so I want to do things right, but I'm honestly running out of time. 
I wanted to have a special URL such as /my_data/, that would display
the change form (the proper object_id being inferred from
request.user). That's why  I couldn't do it with generic views.
Could anyone point me into the right place (admin sources is OK) to have a look and borrow what's needed for this?BTW, everything works as expected from the shell, the interface is what I'm not getting. 
Thanks a million, and best regards-- Carlos Yoderhttp://carlitosyoder.blogspot.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  -~--~~~~--~~--~--~---


Re: Help with related objects

2006-10-03 Thread Carlos Yoder
Just FYI, I cracked it myself.Me gets smarter! =)If anyone googles for this and is in a similar situation, pls let me know.On 10/3/06, Carlos Yoder
 <[EMAIL PROTECTED]> wrote:
Hello all, I'm asking for help again, this time with related objects.I need to do what I think is a very simple task: allow users to edit their own preferences (using a custom 'admin' like interface).Their own preferences are located in an extension of the User model, as follows:
class UserProfile(models.Model):    user = models.ForeignKey (User, core=True, edit_inline=False, max_num_in_admin=1, min_num_in_admin=1, num_in_admin=1, num_extra_on_change=0, unique=True)    receive_new_cars_newsletter = 
models.BooleanField("Subscribed to daily 'new cars' newsletter?", null=False, blank=False, default=True)    receive_modif_cars_newsletter = models.BooleanField("Subscribed to daily 'new cars' newsletter?", null=False, blank=False, default=True)
        def __str__(self):        return ("%s" % self.user)    When users are created by the superadmin (via the normal Admin interface), these related fields are not populated, naturally. So, I'd have to present the users with default values for receive_new_cars_newsletter and receive_modif_cars_newsletter (only a checkbox, as it is), and allow them to set their values.
This is an excruciatingly easy thing to do, but still I can't find my way around generic views, forms, manipulators, related objects, the undocumented 'follow' and the rest of the pie. It's -of course- the first time I tackle this, so I want to do things right, but I'm honestly running out of time. 
I wanted to have a special URL such as /my_data/, that would display
the change form (the proper object_id being inferred from
request.user). That's why  I couldn't do it with generic views.
Could anyone point me into the right place (admin sources is OK) to have a look and borrow what's needed for this?BTW, everything works as expected from the shell, the interface is what I'm not getting. 

Thanks a million, and best regards-- Carlos Yoderhttp://carlitosyoder.blogspot.com


-- Carlos Yoderhttp://blog.argentinaslovenia.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  -~--~~~~--~~--~--~---


Request data dissapearing after do_html2python

2006-10-04 Thread Carlos Yoder
Hello guys,I'm experiencing a weird thing. On my production setup, an OperationalError exception is being triggered while trying to invoke an AddManipulator.I've zeroed in down to this (excerpt of my view follows)
def userprofile_add(request):    """ Handle adding new userprofiles (one2one rel to User objects) """    from django import forms    manipulator = UserProfile.AddManipulator
()    if request.POST:        # If data was POSTed, we're trying to create a new UserProfile.        new_data = request.POST.copy()        # Check for errors.        errors = manipulator.get_validation_errors
(new_data)        if not errors:            # No errors. This means we can save the data!            manipulator.do_html2python(new_data)            new_userprofile = manipulator.save(new_data)
            # Redirect to the object's "edit" page. Always use a redirect            # after POST data, so that reloads don't accidently create            # duplicate entires, and so users don't see the confusing
            # "Repost POST data?" alert box in their browsers.            return HttpResponseRedirect("/my_data/")    else:        # No POST, so we want a brand new form without any data or errors.
        errors = new_data = {}As you can see, this is ver simple AddManipulator. For some reason my  request MultiValueDict has properly set a NOT NULL value I pass via a hidden HTML input field, but the new_data dict doesn't.  This field is the ubiquitous "user_id", that comes from 
request.user. As I said, it's properly passed from the form, and seen by request.POST... only new_data lacks it (it's set to None).So, this should be centered aroudn either request.POST.copy() or do_html2python(), right?
This is funny, since on my dev environment (sqlite+windows) everything runs smoothly. This error only occurs on the production environment, which is on Bluehost (mysql+Linux). Any ideas? I'm very very very close of finishing my first Django project, yay!
Best regards,-- Carlos Yoderhttp://blog.argentinaslovenia.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  -~--~~~~--~~--~--~---


Re: Request data dissapearing after do_html2python

2006-10-04 Thread Carlos Yoder
Forgot to say, the model I'm  trying to create an object to has the user as a OneToOne relationship, which apparently MySQL does not like very much. Why? Because phpMyAdmin, when accessing the homepage for the model's datatable, says this:
PRIMARY and INDEX keys should not both be set for column `user_id`Does this run deeper than I thought?Thakns a million for your help,CarlosOn 10/4/06, 
Carlos Yoder <[EMAIL PROTECTED]> wrote:
Hello guys,I'm experiencing a weird thing. On my production setup, an OperationalError exception is being triggered while trying to invoke an AddManipulator.I've zeroed in down to this (excerpt of my view follows)
def userprofile_add(request):    """ Handle adding new userprofiles (one2one rel to User objects) """    from django import forms    manipulator = UserProfile.AddManipulator

()    if request.POST:        # If data was POSTed, we're trying to create a new UserProfile.        new_data = request.POST.copy()        # Check for errors.        errors = manipulator.get_validation_errors

(new_data)        if not errors:            # No errors. This means we can save the data!            manipulator.do_html2python(new_data)            new_userprofile = manipulator.save(new_data)

            # Redirect to the object's "edit" page. Always use a redirect            # after POST data, so that reloads don't accidently create            # duplicate entires, and so users don't see the confusing
            # "Repost POST data?" alert box in their browsers.            return HttpResponseRedirect("/my_data/")    else:        # No POST, so we want a brand new form without any data or errors.
        errors = new_data = {}As you can see, this is ver simple AddManipulator. For some reason my  request MultiValueDict has properly set a NOT NULL value I pass via a hidden HTML input field, but the new_data dict doesn't.  This field is the ubiquitous "user_id", that comes from 
request.user. As I said, it's properly passed from the form, and seen by request.POST... only new_data lacks it (it's set to None).So, this should be centered aroudn either request.POST.copy() or do_html2python(), right?
This is funny, since on my dev environment (sqlite+windows) everything runs smoothly. This error only occurs on the production environment, which is on Bluehost (mysql+Linux). Any ideas? I'm very very very close of finishing my first Django project, yay!
Best regards,-- Carlos Yoderhttp://blog.argentinaslovenia.com/


-- Carlos Yoderhttp://blog.argentinaslovenia.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  -~--~~~~--~~--~--~---


Manipulators problem

2006-10-05 Thread Carlos Yoder

Hello djangoers.

This is related to my last post (cry for help would be more proper) on
an AddManipulator 'losing' a primary key's value.

I guess the problem's here (pasted from dynamic trace), on
django/db/models/manipulators.py in save (line 101):

auto_now_addFalse
f   
new_data  
new_object   
param  True
params  {'newsletter_email': '[EMAIL PROTECTED]',
'receive_modif_cars_newsletter': True,  'receive_new_cars_newsletter':
True,  'user_id': None}
self 

I hope you understand what I pasted. Let me clarify:

new_data is your typical MultiValueDict, and it HAS the user_id value
properly set (or so I believe). But something happens at the "params"
dict, since there 'user_id' is set to None, and naturally the creation
fails.

So I managed to get 'new_data' filled properly to the AddManipulator's
save method, but still a key field is lost.

What might I be doing wrong, I wonder? I repeat, this only happens on
my production server, on Bluehost with Linux+MySql. On my test/dev box
(windows+sqlite) it works without a hitch.

Here's the UserProfile model, for all it's worth:

class UserProfile(models.Model):
user = models.OneToOneField(User)   
newsletter_email = models.EmailField("E-mail to send newsletters",
blank=False, null=False)
receive_new_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)
receive_new_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)
receive_modif_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)

def __str__(self):
try:
return ("%s" % self.user)
except:
return("")

I hope anyone can lend a hand... i'm running into more and more
walls...! THanks a million,

-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: long-running process. how to do it?

2006-10-05 Thread Carlos Yoder

I'd second that.

Have a mailqueue table that you'll insert data to, and have the
asynchronous cron process comb it regularly. Then, you can always
build simple reports that check the status of said table.



On 10/5/06, Michal <[EMAIL PROTECTED]> wrote:
>
> Gábor Farkas wrote:
> > in my django app, at some point i have to send out a LOT of emails
> > (several thousand).
> >
> > ...
> >
> > so, are there any other, more elegant/simpler solutions?
>
> put data into DB table, and then have some script on cron which send
> emails on "background"?
>
>
>
> >
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Manipulators problem -- anyone? please help!

2006-10-05 Thread Carlos Yoder

I'm really sorry to bug you like this, but I don't know what to do --
being a newbie to both Python and Django, debugging for me is more
like 'aha, the problem should be around here', but nothing concrete
about fixing!

If anyone has the time to read this, please lend me a hand.

I know, I sound like Luke Skywalker on A New Hope, sorry about that!

Regards,

-- 
Carlos Yoder
http://blog.argentinaslovenia.com/

-- Forwarded message ------
From: Carlos Yoder <[EMAIL PROTECTED]>
Date: Oct 5, 2006 10:19 AM
Subject: Manipulators problem
To: django-users@googlegroups.com


Hello djangoers.

This is related to my last post (cry for help would be more proper) on
an AddManipulator 'losing' a primary key's value.

I guess the problem's here (pasted from dynamic trace), on
django/db/models/manipulators.py in save (line 101):

auto_now_addFalse
f   
new_data  
new_object   
param  True
params  {'newsletter_email': '[EMAIL PROTECTED]',
'receive_modif_cars_newsletter': True,  'receive_new_cars_newsletter':
True,  'user_id': None}
self 

I hope you understand what I pasted. Let me clarify:

new_data is your typical MultiValueDict, and it HAS the user_id value
properly set (or so I believe). But something happens at the "params"
dict, since there 'user_id' is set to None, and naturally the creation
fails.

So I managed to get 'new_data' filled properly to the AddManipulator's
save method, but still a key field is lost.

What might I be doing wrong, I wonder? I repeat, this only happens on
my production server, on Bluehost with Linux+MySql. On my test/dev box
(windows+sqlite) it works without a hitch.

Here's the UserProfile model, for all it's worth:

class UserProfile(models.Model):
user = models.OneToOneField(User)
newsletter_email = models.EmailField("E-mail to send newsletters",
blank=False, null=False)
receive_new_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)
receive_new_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)
receive_modif_cars_newsletter = models.BooleanField("Subscribed to
daily 'new cars' newsletter?", null=False, blank=False, default=True)

def __str__(self):
try:
    return ("%s" % self.user)
except:
return("")

I hope anyone can lend a hand... i'm running into more and more
walls...! THanks a million,

--
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: long-running process. how to do it?

2006-10-05 Thread Carlos Yoder

>> Have a mailqueue table that you'll insert data to, and have the
>> asynchronous cron process comb it regularly. Then, you can always
>> build simple reports that check the status of said table.
>
>
> hmm.. nice idea :)

Also you can make that table as generic as possible, and use it for
every project on the server. It's just a list of emails and what to do
with them, after all. If you want I have code for driving that (but
-get ready- in Windows Scripting Host VBScript!).

> btw. would also the solution where i "manually" (in the web-app) spawn
> the process, and not by cron also work?
>
> basically i would like to start sending them out immediately (yes, i
> understand that i could set up the cronjob to run every minute...).

I'd basically cheat =) That is, have a webpage handling the 'starting'
of the processes, that actually doesn't do much -- and have a real
cron running every minute. It'd give your user a sense of control, but
honestly, it'd be just smoke and mirrors.

I know, I know... =)

-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: Manipulators problem -- anyone? please help!

2006-10-05 Thread Carlos Yoder

Raj,

thanks a lot for your reply! It really *is* a tight situation,
especially since I can only reproduce the error at Bluehost... so
debugging is not simple, and definitely not fast.

I believe the user field used to be called "user" first, and later I
changed to user_id or something, but honestly I'm now sending the
'user' value from request.user's context.

As to changing to a ChangeManipulator, that'd solve part of the
problem only, no? In any case, it's another thing to try out.

Thanks a million, again!

-- 
Carlos Yoder
http://blog.argentinaslovenia.com/


On 10/5/06, RajeshD <[EMAIL PROTECTED]> wrote:
>
> Disclaimer: I may be totally off the track here but seeing your
> desperate plea, I thought I would share this anyway:
>
> AddManipulator is probably discarding your primary key coming from the
> POST. The user field, in your case, serves as a primary key (since it
> is defined as a OneToOneField). Try ChangeManipulator and see if that
> improves the situation.
>
> Also, I am not sure if the field name should be user_id or user. So,
> try changing it to 'user'.
>
> Sorry, if this doesn't help.
>
> -Raj
>
>

--~--~-~--~~~---~--~~
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: Manipulators problem -- anyone? please help!

2006-10-06 Thread Carlos Yoder

Here you go Gábor, it's three views. my_data(request) find out what to
do (change or add), and calls the proper view, either userprofile_add
or userprofile_change.

Hope the python code is not too ugly!

Thanks a million for taking the time to help, köszönöm szépen!


def my_data(request):
""" allow a logged user to change his data. proxy view that
calls proper views (add or change) """

if request.user.is_anonymous():
return redirect_to_login(request.path)

u = User.objects.get(pk=request.user.id)
try:
up = u.userprofile # trigger exception, if not found
return userprofile_change(request, u.id)
except UserProfile.DoesNotExist:
return userprofile_add(request)

def userprofile_add(request):
""" Handle adding new userprofiles (one2one rel to User objects) """

from django import forms

manipulator = UserProfile.AddManipulator()

if request.POST:
# If data was POSTed, we're trying to create a new UserProfile.
new_data = request.POST.copy()
user_id = request.user.id

# Check for errors.
errors = manipulator.get_validation_errors(new_data)

if not errors:
# No errors. This means we can save the data!
manipulator.do_html2python(new_data)
if new_data['user_id']:
pass
else:
new_data['user_id'] = user_id
new_userprofile = manipulator.save(new_data)

# Redirect to the object's "edit" page. Always
use a redirect
# after POST data, so that reloads don't
accidently create
# duplicate entires, and so users don't see
the confusing
# "Repost POST data?" alert box in their browsers.
return HttpResponseRedirect("/my_data/")
else:
# No POST, so we want a brand new form without any
data or errors.
errors = new_data = {}

# Create the FormWrapper, template, context, response.
form = forms.FormWrapper(manipulator, new_data, errors)

rc = RequestContext(request, {
'form': form,
})
return render_to_response('userprofile.html', rc)


def userprofile_change(request, userprofile_id):
""" Handle editing userprofiles (one2one rel to User objects) """
from django import forms

from django.http import Http404

try:
manipulator = UserProfile.ChangeManipulator(userprofile_id)
except UserProfile.DoesNotExist:
raise Http404

# Grab the  object in question for future use.
userprofile = manipulator.original_object

if request.POST:
new_data = request.POST.copy()
errors = manipulator.get_validation_errors(new_data)
if not errors:
manipulator.do_html2python(new_data)
manipulator.save(new_data)
# Do a post-after-redirect so that reload works, etc.
return HttpResponseRedirect("/my_data/")
else:
errors = {}
# This makes sure the form accurately represents the
fields of the object.
new_data = manipulator.flatten_data()

form = forms.FormWrapper(manipulator, new_data, errors)

rc = RequestContext(request, {
'form': form,
'userprofile': userprofile,
})

return render_to_response('userprofile.html', rc)

Best regards,

-- 
Carlos Yoder
http://blog.argentinaslovenia.com/


> Carlos Yoder wrote:
> > I'm really sorry to bug you like this, but I don't know what to do --
> > being a newbie to both Python and Django, debugging for me is more
> > like 'aha, the problem should be around here', but nothing concrete
> > about fixing!
> >
>
> hi,
>
> could you also post your view code?
>
> gabor

--~--~-~--~~~---~--~~
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: Manipulators problem -- anyone? please help!

2006-10-06 Thread Carlos Yoder

ATTENTION ATTENTION ATTENTION!

I fixed it!

Brownie points to Raj for pointing to the right direction, so boys and
girls, when you're trying to pass a PK (such as user.id for a OneToOne
field exntending the User model) via a form, make sure you do it as
follows:



and NOT something like:



... because it won't work, and you'll get all sorts of crazy errors.
Trust me, I've been there!

Thanks all, and once again, the Django community rocks!


-- 
Carlos Yoder
http://blog.argentinaslovenia.com/


> Here you go Gábor, it's three views. my_data(request) find out what to
> do (change or add), and calls the proper view, either userprofile_add
> or userprofile_change.
>
> Hope the python code is not too ugly!
>
> Thanks a million for taking the time to help, köszönöm szépen!
>
>
> def my_data(request):
> """ allow a logged user to change his data. proxy view that
> calls proper views (add or change) """
>
> if request.user.is_anonymous():
> return redirect_to_login(request.path)
>
> u = User.objects.get(pk=request.user.id)
> try:
> up = u.userprofile # trigger exception, if not found
> return userprofile_change(request, u.id)
> except UserProfile.DoesNotExist:
> return userprofile_add(request)
>
> def userprofile_add(request):
> """ Handle adding new userprofiles (one2one rel to User objects) """
>
> from django import forms
>
> manipulator = UserProfile.AddManipulator()
>
> if request.POST:
> # If data was POSTed, we're trying to create a new 
> UserProfile.
> new_data = request.POST.copy()
> user_id = request.user.id
>
> # Check for errors.
> errors = manipulator.get_validation_errors(new_data)
>
> if not errors:
> # No errors. This means we can save the data!
> manipulator.do_html2python(new_data)
> if new_data['user_id']:
> pass
> else:
> new_data['user_id'] = user_id
> new_userprofile = manipulator.save(new_data)
>
> # Redirect to the object's "edit" page. Always
> use a redirect
> # after POST data, so that reloads don't
> accidently create
> # duplicate entires, and so users don't see
> the confusing
> # "Repost POST data?" alert box in their browsers.
> return HttpResponseRedirect("/my_data/")
> else:
> # No POST, so we want a brand new form without any
> data or errors.
> errors = new_data = {}
>
> # Create the FormWrapper, template, context, response.
> form = forms.FormWrapper(manipulator, new_data, errors)
>
> rc = RequestContext(request, {
> 'form': form,
> })
> return render_to_response('userprofile.html', rc)
>
>
> def userprofile_change(request, userprofile_id):
> """ Handle editing userprofiles (one2one rel to User objects) """
> from django import forms
>
> from django.http import Http404
>
> try:
> manipulator = UserProfile.ChangeManipulator(userprofile_id)
> except UserProfile.DoesNotExist:
> raise Http404
>
> # Grab the  object in question for future use.
> userprofile = manipulator.original_object
>
> if request.POST:
> new_data = request.POST.copy()
> errors = manipulator.get_validation_errors(new_data)
> if not errors:
> manipulator.do_html2python(new_data)
> manipulator.save(new_data)
> # Do a post-after-redirect so that reload works, etc.
> return HttpResponseRedirect("/my_data/")
> else:
> errors = {}
> # This makes sure the form accurately represents the
> fields of the object.
> new_data = manipulator.flatten_data()
>
> form = forms.FormWrapper(manipulator, new_data, errors)
>
> rc = RequestContext(request, {
> 'form': form,
> 'userprofile': userprofile,
> })
>
>

Re: Manipulators problem -- anyone? please help!

2006-10-06 Thread Carlos Yoder

Patrick, thanks for your reply.

I had actually tried similar methods to what you wrote -- the trouble
was with using the default Manipulators, since they need the passed
request collection to have the proper names, and since I was
"injecting" my PK via a template, the trouble was there... no idea why
this was not triggered in my local environment (maybe Sqlite is not as
picky ;-)

Regards and thanks again,

Carlos

On 10/6/06, patrickk <[EMAIL PROTECTED]> wrote:
>
> don´t know if this might help, but:
>
> let´s say you have this in your manipulator:
>
>  def save(self, data):
>  temp = UserExtendedProfile(
>  user = data['user'],
> 
>  )
>  temp.save()
>
> you could also use this:
>
>  def save(self, data):
>  temp = UserExtendedProfile(
>  user_id = data['user_id'],
> 
>  )
>  temp.save()
>
> so, depending on which version you choose ... your view could look
> like this:
>
> new_data = request.POST.copy()
> new_data['user'] = request.user
> errors = manipulator.get_validation_errors(new_data)
>
> or this:
>
> new_data = request.POST.copy()
> new_data['user_id'] = request.user.id
> errors = manipulator.get_validation_errors(new_data)
>
> patrick.
>
>
>
> Am 06.10.2006 um 09:04 schrieb Carlos Yoder:
>
> >
> > Here you go Gábor, it's three views. my_data(request) find out what to
> > do (change or add), and calls the proper view, either userprofile_add
> > or userprofile_change.
> >
> > Hope the python code is not too ugly!
> >
> > Thanks a million for taking the time to help, köszönöm szépen!
> >
> >
> > def my_data(request):
> > """ allow a logged user to change his data. proxy view that
> > calls proper views (add or change) """
> >
> > if request.user.is_anonymous():
> > return redirect_to_login(request.path)
> >
> > u = User.objects.get(pk=request.user.id)
> > try:
> > up = u.userprofile # trigger exception, if not found
> > return userprofile_change(request, u.id)
> > except UserProfile.DoesNotExist:
> > return userprofile_add(request)
> >
> > def userprofile_add(request):
> > """ Handle adding new userprofiles (one2one rel to User
> > objects) """
> >
> > from django import forms
> >
> > manipulator = UserProfile.AddManipulator()
> >
> > if request.POST:
> > # If data was POSTed, we're trying to create a new
> > UserProfile.
> > new_data = request.POST.copy()
> > user_id = request.user.id
> >
> > # Check for errors.
> > errors = manipulator.get_validation_errors(new_data)
> >
> > if not errors:
> > # No errors. This means we can save the data!
> > manipulator.do_html2python(new_data)
> > if new_data['user_id']:
> > pass
> > else:
> > new_data['user_id'] = user_id
> > new_userprofile = manipulator.save(new_data)
> >
> > # Redirect to the object's "edit" page. Always
> > use a redirect
> > # after POST data, so that reloads don't
> > accidently create
> > # duplicate entires, and so users don't see
> > the confusing
> > # "Repost POST data?" alert box in their
> > browsers.
> > return HttpResponseRedirect("/my_data/")
> > else:
> > # No POST, so we want a brand new form without any
> > data or errors.
> > errors = new_data = {}
> >
> > # Create the FormWrapper, template, context, response.
> > form = forms.FormWrapper(manipulator, new_data, errors)
> >
> > rc = RequestContext(request, {
> > 'form': form,
> > })
> > return render_to_response('userprofile.html', rc)
> >
> >
> > def userprofile_change(request, userprofile_id):
> > """ Han

Migrating from ASP.NET to Django?

2006-10-20 Thread Carlos Yoder

Hello folks,

I have this idea in my head going for a lng time now. Since I
already deployed my first Django app and everybody's happy (especially
me), I'm getting excited about migrating my main project to Django.

First of all, it's a not a small site, so planning is of the absolute
essence (we do price comparisons for a big catalogue of products).

Has anybody tried to tackle this yet? At all? It's the whole deal:
MSSQL database (I know, I know), IIS6+, C#, a lot of very specific
code, etc.

Is there hope, doctor?

-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: Migrating from ASP.NET to Django?

2006-10-23 Thread Carlos Yoder

Julio,

>   Sure there is hope.
>
>   I haven't found any website that couldn't be made with Django. After
> all, it's about HTTP communication. There are even two websites that
> deal with price comparison in the wiki
> (http://code.djangoproject.com/wiki/DjangoPoweredSites):
>
>   http://www.gutata.com/ and http://niftylist.co.uk/

Thanks for those, I had missed them.

> But I believe none can answer your question besides yourself. Are
> you sure you can code in Python this C# specific code that you have?
> Does your database serves others apps which you'll have to modify? And
> what's a small website or a large one? I've seen Django powering
> social networks with more than one million members, but what's the
> load? Does it use cache? Does the DBA knows what she do?

All interesting and meaningful questions that I'm trying to answer
myself. Over the weekend I fetched all our C# code from SVN, and
started the 'migration', so to speak, to my Kubuntu laptop. As I
thought, the biggest monster to tackle would be the database. A 6GB+
behemoth of MSSQL2K goodies is not something you could call a piece of
cake. But the experience of removing so much cruft from the
'templates' (or aspx files) was almost rapturous.

I'm more and more convinced I can do with the Python code for the
views and such, but the database would have to remain in place as it
is: hundreds of stored procedures, a huge, mission-critical DTS
process running every day, etc preclude me from going the
fundamentalist way and migrate everything away to Postgres :-)

Say, if I can successfully introspect my DB into Django models (as
much as possible, I don't expect magic here), I could technically use
Django just for the Front End's views, right? (initially I'd keep our
own admin, since it's the primary interface for our dataentry people).

What do you people say? How would Django running on Windows/IIS6 (now
it's possible, I hear), talking to a MSSQL database, and being used
'just' for the frontend's views sound to you? =)

>   If you're confident you can do whatever you do in Django, I say go for it.

That's the thing -- I'm getting very hooked on Django and by
extension, Python. It just makes too much sense to let it go. Myself I
started coding webpages by hand back in '96, with CGI (bash), Perl,
PHP, and then ASP (because of market share), and finally I've been
forced to work in ASP.NET for the last 3 years or so. Don't get me
wrong, I prefer C# over VBScript any day, but I was longing for the
same feeling I got when I first got a whiff of Perl back in the day --
and Python did *just* that.

Anyways, thanks for everything, obrigado, etc. Best regards,
-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: Returning an average from a Related Field.

2006-10-24 Thread Carlos Yoder

While I believe this mini tutorial on signals is great, I guess this
functionality would be better accomplished in the DB itself, via a
trigger.



On 10/16/06, MerMer <[EMAIL PROTECTED]> wrote:
>
> John,
>
> Excellent.  The requirement to make it easily sortable makes your
> solution compelling. Thanks for detailing. Plus Im sure that there will
> lots of places where this type of Signals method would be handy.
>
> MerMer
>
>
> >
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-25 Thread Carlos Yoder

Hey Sean, I'm trying to give this a go. Running into walls, I'm  afraid.

I read 'introspection' and thought this patched "manage.py inspectdb"
to handle mssql servers. Unless I did something wrong (very possible),
that doesn't seem to work.

Could you explain how do I get to the 'full instrospection' part? :-)
Thanks a lot,

Carlos

On 8/26/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> Sorry for the double-post :)
>
>
> On 8/25/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> >
> > I've posted a patch that adds full introspection functionality for
> > ado_mssql backends
> (http://code.djangoproject.com/ticket/2563).  I'd
> > appreciate it if those of you who run Django/mssql could test it out
> > and let me know if any problems are found.
> >
> > Thanks,
> >
> > Sean
> >
> > * Note: the patch relies on the changes in
> > http://code.djangoproject.com/ticket/2358
> >
> >
> >
> > > >
> >
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-25 Thread Carlos Yoder

I'm afraid I already applied that patch. Actually I tried many
combinations but no luck.

I'm running (from the project's directory, where settings.py is)
"manage.py inspectdb". Maybe that's the problem, and I must absolutely
run it from django-admin.py ?

I admin this just crossed my mind, when i'm already at home and rested
;-) Thanks a million,

Carlos

On 10/25/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> Take a look at this ticket: http://code.djangoproject.com/ticket/2358.
>
> I combined that previous patch (2563) with 2358 because my patch was
> dependent on it.  Make sure that you've applied the latest patch
> (mssql_update5.diff) to your Django installation.  If you still have
> problems, please let me know.
>
> On 10/25/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> > Take a look at this ticket: http://code.djangoproject.com/ticket/2358.
> >
> > I combined that previous patch (2563) with 2358 because my patch was
> > dependent on it.  Make sure that you've applied the latest patch
> > (mssql_update5.diff) to your Django installation.  If you still have
> > problems, please let me know.
> >
> > Sean
> >
> > On 10/25/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > > Hey Sean, I'm trying to give this a go. Running into walls, I'm  afraid.
> > >
> > > I read 'introspection' and thought this patched "manage.py inspectdb"
> > > to handle mssql servers. Unless I did something wrong (very possible),
> > > that doesn't seem to work.
> > >
> > > Could you explain how do I get to the 'full instrospection' part? :-)
> > > Thanks a lot,
> > >
> > > Carlos
> > >
> > > On 8/26/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> > > > Sorry for the double-post :)
> > > >
> > > >
> > > > On 8/25/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > I've posted a patch that adds full introspection functionality for
> > > > > ado_mssql backends
> > > > (http://code.djangoproject.com/ticket/2563).  I'd
> > > > > appreciate it if those of you who run Django/mssql could test it out
> > > > > and let me know if any problems are found.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Sean
> > > > >
> > > > > * Note: the patch relies on the changes in
> > > > > http://code.djangoproject.com/ticket/2358
> > > > >
> > > > >
> > > > >
> > > > > > > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > Carlos Yoder
> > > http://blog.argentinaslovenia.com/
> > >
> >
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-25 Thread Carlos Yoder

As soon as I get to the office I'll let you know... thanks for replying!

> Hmm.  What's the exact error you are getting?  I'm running the code on
> 3 different boxes (2 Win XP Pro and 1 Windows Server 2003) against
> MSDE and SQL Server 2000 without issues.  What system and server are
> you using?
>
> You should be able to use either manage.py in the project directory or
> django-admin.py in the directory below the project directory.
> Remember to run django-admin.py with the --settings option so it knows
> where to look for your settings file.
>
> Sean

-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-25 Thread Carlos Yoder

OK, here I go.

I'm running the following, from my project's dir. Note: the SQL server
is not local, I connect to it via a VPN, and testing it, it works OK,
but who knows.

D:\dev\eclipse\eclipse_workspace\ceneje>manage.py inspectdb
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field name
s.
#
# Also note: You'll have to insert the output of 'django-admin.py sqlinitialdata
 [appname]'
# into your database.

from django.db import models

Error: 'inspectdb' isn't supported for the currently selected database backend.


My settings.py

DATABASE_ENGINE = 'ado_mssql'
DATABASE_NAME = 'obspm_testing'
DATABASE_USER = '*'
DATABASE_PASSWORD = '***'
DATABASE_HOST = '192.169.5.8'
DATABASE_PORT = '1433'

Hope this sheds some light!

Best regards and thank you.

On 10/26/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> As soon as I get to the office I'll let you know... thanks for replying!
>
> > Hmm.  What's the exact error you are getting?  I'm running the code on
> > 3 different boxes (2 Win XP Pro and 1 Windows Server 2003) against
> > MSDE and SQL Server 2000 without issues.  What system and server are
> > you using?
> >
> > You should be able to use either manage.py in the project directory or
> > django-admin.py in the directory below the project directory.
> > Remember to run django-admin.py with the --settings option so it knows
> > where to look for your settings file.
> >
> > Sean
>
> --
> Carlos Yoder
> http://blog.argentinaslovenia.com/
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder
), No
ne)


---
Strategy 3: Traceback:Traceback (most recent call last):
   File "D:\dev\Python23\lib\site-packages\adodbapi\adodbapi.py", line 539, in e
xecuteHelper
raise DatabaseError(e)
 DatabaseError: (-2147352567, 'Exception occurred.', (0, 'ADODB.Parameters', 'It
em cannot be found in the collection corresponding to the requested name or ordi
nal.', 'C:\\WINNT\\HELP\\ADO270.CHM', 1240649, -2146825023), None)


---
Strategy 4: Traceback:Traceback (most recent call last):
   File "D:\dev\Python23\lib\site-packages\adodbapi\adodbapi.py", line 540, in e
xecuteHelper
adoRetVal=self.cmd.Execute()
   File "", line 3, in Execute
   File "D:\dev\Python23\lib\site-packages\win32com\client\dynamic.py", line 258
, in _ApplyTypes_
result = self._oleobj_.InvokeTypes(*(dispid, LCID, wFlags, retType, argTypes
) + args)
 com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft OLE DB Provider
for SQL Server', "Line 1: Incorrect syntax near 's'.", None, 0, -2147217900), No
ne)

--- ADODBAPI on command:SELECT [Filters].[idFilters],[Filters].[idKategorije],[F
ilters].[filterName],[Filters].[filterType],[Filters].[filterDesc] FROM [Filters
] WHERE ([Filters].[idFilters] = %s) with parameters: [19]
>>>

Checking it with SQL Profiler, I see where the error lies:

SELECT 
[Filters].[idFilters],[Filters].[idKategorije],[Filters].[filterName],[Filters].[filterType],[Filters].[filterDesc]
FROM [Filters] WHERE ([Filters].[idFilters] = %s)

In this query, %s is not being interpolated to my requested value ("19").

Sorry for the long, ugly pastes. Hope this helps you helping us :-)

Regards,

Carlos



> OK, here I go.
>
> I'm running the following, from my project's dir. Note: the SQL server
> is not local, I connect to it via a VPN, and testing it, it works OK,
> but who knows.
>
> D:\dev\eclipse\eclipse_workspace\ceneje>manage.py inspectdb
> # This is an auto-generated Django model module.
> # You'll have to do the following manually to clean this up:
> # * Rearrange models' order
> # * Make sure each model has one field with primary_key=True
> # Feel free to rename the models, but don't rename db_table values or field 
> name
> s.
> #
> # Also note: You'll have to insert the output of 'django-admin.py 
> sqlinitialdata
>  [appname]'
> # into your database.
>
> from django.db import models
>
> Error: 'inspectdb' isn't supported for the currently selected database 
> backend.
>
>
> My settings.py
>
> DATABASE_ENGINE = 'ado_mssql'
> DATABASE_NAME = 'obspm_testing'
> DATABASE_USER = '*'
> DATABASE_PASSWORD = '***'
> DATABASE_HOST = '192.169.5.8'
> DATABASE_PORT = '1433'
>
> Hope this sheds some light!
>
> Best regards and thank you.
>
> On 10/26/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > As soon as I get to the office I'll let you know... thanks for replying!
> >
> > > Hmm.  What's the exact error you are getting?  I'm running the code on
> > > 3 different boxes (2 Win XP Pro and 1 Windows Server 2003) against
> > > MSDE and SQL Server 2000 without issues.  What system and server are
> > > you using?
> > >
> > > You should be able to use either manage.py in the project directory or
> > > django-admin.py in the directory below the project directory.
> > > Remember to run django-admin.py with the --settings option so it knows
> > > where to look for your settings file.
> > >
> > > Sean

--~--~-~--~~~---~--~~
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: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder

Looks like both abc123 and myself are experiencing the same problem
(at least one of them). Since I'm running MSSQL2000, wouldn't this
rule out MSSQL2005 being the problem?

Carlos

On 10/26/06, abc123 <[EMAIL PROTECTED]> wrote:
>
> Sean De La Torre wrote:
> > Can you post the entire traceback?  I don't see this behavior with SQL
> > Server 2000 or MSDE.  I may have to get a copy of SQL Server 2005.
>
> I can, the full traceback is rather long:
>
> E:\test>python manage.py syncdb
[snip snip snip]
-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-26 Thread Carlos Yoder

OK, if we can narrow the possibilities down to a patch mistake, I can
tell you what I did:

cywgin
go to django src dir (the 'trunk' directory of svn)
patch -p0 mssql_update5.diff

no errors reported, and TortoiseSVN's icons changed on selected
folders under 'trunk', to indicate code was altered. I took this as
proof the patch has worked ... but honestly, my patching abilities are
almost 0 (i just followed a tutorial, iirc).

My I'll give it another go before bugging you again. Thanks a million!

And yes I'm in continental Europe, so there's a big timezone gap between us.

Best,

On 10/26/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
>
> Carlos,
>
> This error, "Error: 'inspectdb' isn't supported for the currently
> selected database backend.", is usually thrown when the patch hasn't
> been applied correctly.  Otherwise, you'd see a different error.  Look
> at your \django\db\backends\ado_mssql\intropspection.py
> file.  Does the logic in this file match the patch?  If you are not
> sure, attach it to the email and I'll take a look at it.
>
> Sean
>
>
> On 10/25/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> >
> > OK, here I go.
> >
> > I'm running the following, from my project's dir. Note: the SQL server
> > is not local, I connect to it via a VPN, and testing it, it works OK,
> > but who knows.
> >
> > D:\dev\eclipse\eclipse_workspace\ceneje>manage.py inspectdb
> > # This is an auto-generated Django model module.
> > # You'll have to do the following manually to clean this up:
> > # * Rearrange models' order
> > # * Make sure each model has one field with primary_key=True
> > # Feel free to rename the models, but don't rename db_table values or field 
> > name
> > s.
> > #
> > # Also note: You'll have to insert the output of 'django-admin.py 
> > sqlinitialdata
> >  [appname]'
> > # into your database.
> >
> > from django.db import models
> >
> > Error: 'inspectdb' isn't supported for the currently selected database 
> > backend.
> >
> >
> > My settings.py
> >
> > DATABASE_ENGINE = 'ado_mssql'
> > DATABASE_NAME = 'obspm_testing'
> > DATABASE_USER = '*'
> > DATABASE_PASSWORD = '***'
> > DATABASE_HOST = '192.169.5.8'
> > DATABASE_PORT = '1433'
> >
> > Hope this sheds some light!
> >
> > Best regards and thank you.
> >
> > On 10/26/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > > As soon as I get to the office I'll let you know... thanks for replying!
> > >
> > > > Hmm.  What's the exact error you are getting?  I'm running the code on
> > > > 3 different boxes (2 Win XP Pro and 1 Windows Server 2003) against
> > > > MSDE and SQL Server 2000 without issues.  What system and server are
> > > > you using?
> > > >
> > > > You should be able to use either manage.py in the project directory or
> > > > django-admin.py in the directory below the project directory.
> > > > Remember to run django-admin.py with the --settings option so it knows
> > > > where to look for your settings file.
> > > >
> > > > Sean
> > >
> > > --
> > > Carlos Yoder
> > > http://blog.argentinaslovenia.com/
> > >
> >
> >
> > --
> > Carlos Yoder
> > http://blog.argentinaslovenia.com/
> >
> > >
> >
>
> >
>


-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Re: ado_mssql introspection patch

2006-10-27 Thread Carlos Yoder

Sean,

Good news!

I major blunder on my side. I was updating from SVN all the time, but
happily ignoring that install, since Python was 'seeing' and old stale
egg on site-packages. I removed everything, and svn'd from tunk
directly on site-packages, and voila. =)

Now I have a different problem, which I believe it could be a bug.
When inspecting my DB, which has a table called 'ADMIN', the indexing
part fails, with the following:

class Admin(models.Model):
Traceback (most recent call last):
  File "D:\dev\eclipse\eclipse_workspace\ceneje\manage.py", line 11, in ?
execute_manager(settings)
  File "D:\dev\Python23\lib\site-packages\django\core\management.py", line 1445,
 in execute_manager
execute_from_command_line(action_mapping, argv)
  File "D:\dev\Python23\lib\site-packages\django\core\management.py", line 1356,
 in execute_from_command_line
for line in action_mapping[action]():
  File "D:\dev\Python23\lib\site-packages\django\core\management.py", line 764,
in inspectdb
indexes = introspection_module.get_indexes(cursor, table_name)
  File "D:\dev\Python23\lib\site-packages\django\db\backends\ado_mssql\introspec
tion.py", line 97, in get_indexes
results.update(data)
AttributeError: keys

The first output line is class Admin(models.Model), and that should
point towards the fact that it could be a reserved name collision of
some sort. I'll try with a different test database, and also
temporarily renaming that ADMIN table, etc.

Thanks a lot! I'll keep you posted,

Carlos

On 10/27/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> OK, if we can narrow the possibilities down to a patch mistake, I can
> tell you what I did:
>
> cywgin
> go to django src dir (the 'trunk' directory of svn)
> patch -p0 mssql_update5.diff
>
> no errors reported, and TortoiseSVN's icons changed on selected
> folders under 'trunk', to indicate code was altered. I took this as
> proof the patch has worked ... but honestly, my patching abilities are
> almost 0 (i just followed a tutorial, iirc).
>
> My I'll give it another go before bugging you again. Thanks a million!
>
> And yes I'm in continental Europe, so there's a big timezone gap between us.
>
> Best,
>
> On 10/26/06, Sean De La Torre <[EMAIL PROTECTED]> wrote:
> >
> > Carlos,
> >
> > This error, "Error: 'inspectdb' isn't supported for the currently
> > selected database backend.", is usually thrown when the patch hasn't
> > been applied correctly.  Otherwise, you'd see a different error.  Look
> > at your \django\db\backends\ado_mssql\intropspection.py
> > file.  Does the logic in this file match the patch?  If you are not
> > sure, attach it to the email and I'll take a look at it.
> >
> > Sean
> >
> >
> > On 10/25/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > >
> > > OK, here I go.
> > >
> > > I'm running the following, from my project's dir. Note: the SQL server
> > > is not local, I connect to it via a VPN, and testing it, it works OK,
> > > but who knows.
> > >
> > > D:\dev\eclipse\eclipse_workspace\ceneje>manage.py inspectdb
> > > # This is an auto-generated Django model module.
> > > # You'll have to do the following manually to clean this up:
> > > # * Rearrange models' order
> > > # * Make sure each model has one field with primary_key=True
> > > # Feel free to rename the models, but don't rename db_table values or 
> > > field name
> > > s.
> > > #
> > > # Also note: You'll have to insert the output of 'django-admin.py 
> > > sqlinitialdata
> > >  [appname]'
> > > # into your database.
> > >
> > > from django.db import models
> > >
> > > Error: 'inspectdb' isn't supported for the currently selected database 
> > > backend.
> > >
> > >
> > > My settings.py
> > >
> > > DATABASE_ENGINE = 'ado_mssql'
> > > DATABASE_NAME = 'obspm_testing'
> > > DATABASE_USER = '*'
> > > DATABASE_PASSWORD = '***'
> > > DATABASE_HOST = '192.169.5.8'
> > > DATABASE_PORT = '1433'
> > >
> > > Hope this sheds some light!
> > >
> > > Best regards and thank you.
> > >
> > > On 10/26/06, Carlos Yoder <[EMAIL PROTECTED]> wrote:
> > > > As soon as I get to the office I'll let you know... thanks for replying!
> > > >
> > > >

How would you do this on Django?

2006-11-06 Thread Carlos Yoder

Hello people, I have a question for you.

I've been developing (in my head) a multilang, multisite, multiuser
blog application, that -at least for me- sounds like a very cool idea.
On to the details:

The project is actually a group of sister websites dealing with a
common subject, localised for different languages/cultures. It's
centered around the old "you learn a thing a day" saying, so Authors
would be able to post the thing they learned that day on a -usually
small- post. Of course, they would have to be able to post in many
different languages (initially either English, Slovenian or Spanish).

As to URLs, I'd need to support at least the following three schemes:

 * Language codes mapped to directories (http://maindomain.com/en/ and
http://maindomain.com/sl/ and  http://maindomain.com/es/)
 * Language codes mapped to subdomains (http://en.maindomain.com/ and
http://sl.maindomain.com/ and http://es.maindomain.com)
 * Completely different starting URLs (http://athingaday.com/ and
http://nekajnovega.com and httpd://algonuevo.com/

As to the post themselves, each different version would have to be
aware of its 'sister' posts in other languages, but that's already a
template thing I believe.

It goes without saying that these multiple localised versions would
have to get data off a single database.

OK, enough details for now, we all have work to do :-)

Anyway, I thought about the "sites" app on Django, but never used it
and I'm at a loss. I must admit I first too a look at Polyglot, a
plugin for Wordpress, but I really want to stay away from PHP and do
things right.

Could anyone help me a bit on how to approach this? Thanks a million,
and best regards,

-- 
Carlos Yoder
http://blog.argentinaslovenia.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: How would you do this on Django?

2006-11-06 Thread Carlos Yoder

Thank you Frankie.

I guess I'm OK with the i18n part of the idea. Not so sure about the
'best practises' to implement, though (that was the general idea of
this post).

But many thanks for the links anyway. Regards,

-- 
Carlos Yoder
http://blog.argentinaslovenia.com/


>> Hello people, I have a question for you.
>>
>> I've been developing (in my head) a multilang, multisite, multiuser
>> blog application, that -at least for me- sounds like a very cool idea.
>> On to the details:
>>
>> The project is actually a group of sister websites dealing with a
>> common subject, localised for different languages/cultures. It's
>> centered around the old "you learn a thing a day" saying, so Authors
>> would be able to post the thing they learned that day on a -usually
>> small- post. Of course, they would have to be able to post in many
>> different languages (initially either English, Slovenian or Spanish).
>>
>> As to URLs, I'd need to support at least the following three schemes:
>>
>>  * Language codes mapped to directories (http://maindomain.com/en/ and
> > http://maindomain.com/sl/ and  http://maindomain.com/es/)
> >  * Language codes mapped to subdomains (http://en.maindomain.com/ and
> > http://sl.maindomain.com/ and http://es.maindomain.com)
> >  * Completely different starting URLs (http://athingaday.com/ and
> > http://nekajnovega.com and httpd://algonuevo.com/
> >
> > As to the post themselves, each different version would have to be
> > aware of its 'sister' posts in other languages, but that's already a
> > template thing I believe.
> >
> > It goes without saying that these multiple localised versions would
> > have to get data off a single database.
> >
> > OK, enough details for now, we all have work to do :-)
> >
> > Anyway, I thought about the "sites" app on Django, but never used it
> > and I'm at a loss. I must admit I first too a look at Polyglot, a
> > plugin for Wordpress, but I really want to stay away from PHP and do
> > things right.
> >
> > Could anyone help me a bit on how to approach this? Thanks a million,
> > and best regards,
>
> I personally know nothing about this. But I will give you some links
> to get started (in order of importance):
>
> http://www.djangoproject.com/documentation/i18n/
> http://trac.studioquattro.biz/djangoutils/wiki/TranslationService
> http://trac.studioquattro.biz/djangoutils
>
> That might give you a some general ideas.
>
> --
> http://grimboy.co.uk
>

--~--~-~--~~~---~--~~
 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: how are you handling i18n and m10l content?

2006-11-09 Thread Carlos Yoder

> > Aidas Bendoraitis wrote:
> >> MyModel.objects.by_language("EN").all()
> >> MyModel.objects.by_language("EN").order_by('title')
> >
> > I think this would be greate.
>
> sensational is the word ;-)
>

Now we just need to get one of the Django-savvy developers to
implement it, since I'm sure they don't have anything else to do :-)

Now seriously, this would be fantastic. I'm in no position to help
with code (I started one of the reference threads, asking for help),
so I can only hope and cross my fingers for some guy(s) with with
enough time and skills will bite the bullet and start coding.

And now I read what I wrote. Enough time *and* skills? That could be tricky ;-)

Cheers,

-- 
Carlos Yoder
http://blog.argentinaslovenia.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: how are you handling i18n and m10l content?

2006-11-09 Thread Carlos Yoder

> David Bleweet said:
>> Actually this could be integrated into the core.
>> When you create a model, you could add translatable=True to fields
>> that have to be in the language-specific table.
>> When you make selections, you would need to set the language name in
>> the following or a similar way:
>> MyModel.objects.by_language("EN").all()
>> MyModel.objects.by_language("EN").order_by('title')
>> which would form queries like:
>> SELECT * FROM myapp_mymodel INNER JOIN myapp_mymodel_translatable ON
>> myapp_mymodel.id = myapp_mymodel_translatable.id ORDER BY title
>
> What about using generic relations for this? You could have something
> like this:
>
> class I18NText(models.Model):
> language = models.ForeignKey(Language)
> field = models.CharField(maxlength=25)
> translated_text = models.TextField()
>
> content_type = models.ForeignKey(ContentType)
> object_id = models.PositiveIntegerField()
> translated_object = models.GenericForeignKey()
>
> def __str__(self):
> return self.translated_text
>
> class ModelNeedingTranslation(models.Model):
> foo = models.IntegerField()
> bar = models.TextField()
>
> translations = models.GenericRelation(I18NText)
>
> Then you can add translations of field(s) by doing:
> a = ModelNeedingTranslation(1, 'nothing')
> a.translations.create(field='bar', translated_text='nada',
> language=Language('Spanish'))
>
> You can get the text for a specific translation like this:
> a.translations.filter(field='bar', language=Language('Spanish'))

:-O

Would it be really that simple?

-- 
Carlos Yoder
http://blog.argentinaslovenia.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
-~--~~~~--~~--~--~---



Do you know good guides to use ajax in django

2018-04-26 Thread carlos . davalos17
Im starting a social network for my school and i need to show the coments 
of my post without recharging the whole and for other things in my proyect

-- 
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/de939dae-605d-4cf1-9a7a-e5ee48f249ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


I canot upload files how can i fix it

2018-05-12 Thread carlos . davalos17
 views 

def ArticuloFormA(request,Materiaid): 
Articulos = Articulo.objects.filter(Materia_id= Materiaid) 
Articulos = Articulos.order_by('-Fecha_Publicacion')[:5] 
Pregunta_Form = ArticuloForm() 
args = {'Pregunta_Form': Pregunta_Form} 
if request.method == 'POST': 
form = ArticuloForm(request.POST or None, request.FILES or None)  
if form.is_valid(): 
Materias = Materia.objects.get(id = Materiaid) 
Preguntad = form.save(commit=False) 
Preguntad.user = request.user 
Preguntad.Texto_Pregunta = request.POST['Titulo'] 
Preguntad.Materia = Materias 
Preguntad.Pdf_articulo = request.FILES['Pdf_articulo'] 
Preguntad.save() 
return render(request,'articulos/detail.html',{'Preguntas': 
Articulos,'Materias': Materias}) 
else: 
Pregunta_Form = ArticuloForm() 
args = {'Pregunta_Form': Pregunta_Form} 
return render(request,'foro/FormPregunta.html',args) 


html

{% extends 'cuentas/base.html' %}

{% block body %}

CrearPregunta

{% csrf_token %}
{{ Pregunta_Form.docfile }}
Submit


{% endblock %}

-- 
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/353c96a5-5946-4530-beb4-71ad83c0366b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Channels 2 on AWS Elastic Beanstalk

2018-09-04 Thread Carlos Zillner


It works on my localhost. But when I deploy on AWS ElasticBeanstalk, I get 
this error:


Traceback (most recent call last):
File 
"/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
 line 35, in inner
response = get_response(request)
File 
"/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/handlers/base.py",
 line 113, in _get_response
resolver_match = resolver.resolve(request.path_info)
File 
"/opt/python/run/venv/local/lib/python3.6/site-packages/django/urls/resolvers.py",
 line 523, in resolveraise Resolver404({'tried': tried, 'path': new_path})

django.urls.exceptions.Resolver404: {'tried': [[], []], 'path': 'socket/comunidade/'}
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File 
"/opt/python/run/venv/local/lib/python3.6/site-packages/django/core/handlers/exception.py",
 line 99, in get_exception_response
response = callback(request, **dict(param_dict, exception=exception))
TypeError: handler404() got an unexpected keyword argument 'exception'


My routing.py:


application = ProtocolTypeRouter({

"websocket": OriginValidator(
AuthMiddlewareStack(
URLRouter([
# URLRouter just takes standard Django path() or url() entries.
path("socket/", MyConsumer),
url("socket/(?P[\w-]+)", MyConsumer),
]),
),
[".mydomain.com.br", "localhost"]
),})


My JS connection:


var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";var 
connection = new WebSocket( ws_scheme + "://" + window.location.host + 
"/socket" + window.location.pathname );


In AWS config, WSGIPath is pointing to wsgi.py. It seems to be routing 
channels 2 to urls.py

-- 
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/82b5bb8e-7722-42ee-9a32-0553ab6d6f87%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Ignoring empty forms in a formset

2017-04-15 Thread Carlos Jordán
its works

El jueves, 26 de abril de 2012, 8:25:42 (UTC+2), Martin Tiršel escribió:
>
> Thanks, form.has_changed() seems to be the way. But I don't understand the 
> empty_permitted attribute, it is usable only with ModelForm? I am using the 
> formset only for mass form processing not for inserting/updating models.
>
> Martin
>
>
> On Wednesday, April 25, 2012 2:35:20 PM UTC+2, Tom Evans wrote:
>>
>> Hmm. Internally, model formsets do this differently - they are aware
>> of which forms are extra forms, and which forms are existing forms.
>>
>> New forms will have form.empty_permitted=True, unmodified forms will
>> return True from form.has_changed(). This should be enough to skip
>> over blank new forms.
>>
>> Cheers
>>
>> Tom
>>
>> On Wed, Apr 25, 2012 at 12:55 PM, Martin Tiršel > > wrote:
>> > I am using class based views and my code is:
>> >
>> > class PayOrdersView(AdminFormSetView):
>> > form_class = PayOrderForm
>> > template_name = 'internal/orders/pay_orders_form.html'
>> > active_item = 'order_pay_orders'
>> > context_formset_name = 'pay_orders_formset'
>> > extra = 2
>> >
>> > def formset_valid(self, formset):
>> > logger.debug('Executing formset_valid')
>> > for form in formset:
>> > logger.debug('Is empty: %s' % form.empty_permitted)
>> > form.save()
>> > return super(PayOrdersView, self).formset_valid(formset)
>> >
>> >
>> > formset_valid method is called after formset.is_valid(). I start with 2
>> > empty forms, I insert into first form order number and the second form 
>> stays
>> > empty. After I submit, I get:
>> >
>> > [2012-04-25 13:42:07,776] DEBUG [31099 140249342375680]
>> > [project.internal.mixins:304] Processing POSTed form
>> > [2012-04-25 13:42:07,778] DEBUG [31099 140249342375680]
>> > [project.internal.forms:29] Cleaning order_number
>> > [2012-04-25 13:42:07,837] DEBUG [31099 140249342375680]
>> > [project.internal.mixins:307] Formset is valid
>> > [2012-04-25 13:42:07,842] DEBUG [31099 140249342375680]
>> > [project.internal.views:93] Executing formset_valid
>> > [2012-04-25 13:42:07,843] DEBUG [31099 140249342375680]
>> > [project.internal.views:95] Is empty: True
>> > [2012-04-25 13:42:07,843] DEBUG [31099 140249342375680]
>> > [project.internal.forms:54] Saving PayOrderForm
>> > [2012-04-25 13:42:09,914] DEBUG [31099 140249342375680]
>> > [project.internal.views:95] Is empty: True
>> > [2012-04-25 13:42:09,914] DEBUG [31099 140249342375680]
>> > [project.internal.forms:54] Saving PayOrderForm
>> >
>> > So both forms have empty_permitted == True. Management form in time of
>> > submit looks so:
>> >
>> > > > name="form-TOTAL_FORMS">
>> > > > name="form-INITIAL_FORMS">
>> > > name="form-MAX_NUM_FORMS">
>> >
>> > Thanks, Martin
>> >
>> > On Wednesday, April 25, 2012 11:03:49 AM UTC+2, Tom Evans wrote:
>> >>
>> >> On Sun, Apr 22, 2012 at 5:44 PM, Martin Tiršel > >
>> >> wrote:
>> >> > Hello,
>> >> >
>> >> > I have a formset and some JavaScript to add more forms into this
>> >> > formset. In
>> >> > a view, I iterate through the formset saving (not a ModelForm just 
>> Form
>> >> > with
>> >> > save method) each form:
>> >> >
>> >> > for form in formset:
>> >> > form.save()
>> >> >
>> >> > But I want to ignore empty forms that were added by JavasScript and 
>> not
>> >> > removed. How can I do this?
>> >> >
>> >> > Thanks,
>> >> > Martin
>> >> >
>> >>
>> >> You don't show much of your code, but I presume you have called
>> >> formset.is_valid() at this point?
>> >>
>> >> If so, this pattern is pretty canonical:
>> >>
>> >> if formset.is_valid():
>> >> for form in formset:
>> >> if form.is_valid() and not form.empty_permitted:
>> >> form.save()
>> >>
>> >> Extra forms in a formset are all instantiated with 
>> empty_permitted=True.
>> >>
>> >> There are other things to be aware of though. This logic will not take
>> >> into account deleted forms etc, which is why there is a
>> >> BaseModelFormSet with the right behaviour baked into it's save()
>> >> method.
>> >>
>> >> Cheers
>> >>
>> >> Tom
>> >
>> > --
>> > 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/-/aKliGdMNqGwJ.
>> >
>> > To post to this group, send email to django...@googlegroups.com 
>> .
>> > To unsubscribe from this group, send email to
>> > django-users...@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 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 w

Re: Please help me

2017-05-29 Thread Carlos Andre
https://docs.djangoproject.com/pt-br/1.11/intro/tutorial01/

2017-05-29 17:58 GMT-03:00 m712 - Developer :

> You just made my day.
>
> On 05/29/2017 12:52 PM, Opeyemi Gabriel wrote:
>
> Django girls, am a guy
>
> On May 29, 2017 13:20, "Jani Tiainen"  wrote:
>
>> Hi,
>>
>> If you feel that Django tutorial is too compact, Django Girls do have
>> much more verbose tutorial.
>> And welcome to Django-world.
>>
>> On 29.05.2017 11:57, Opeyemi Gabriel wrote:
>>
>> Hello, Am name is Gabriel, please am a novice and am interested in learn
>> django. Can you please put me through
>> Thank you
>> --
>> 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/ms
>> gid/django-users/CACbdT%3D0uo4XApksxz8yutWAMKXccCJACnD21icCa
>> huCe%2BB993g%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Jani Tiainen
>>
>> --
>> 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/ms
>> gid/django-users/06528c19-7727-67f3-7511-ff82e7c4039c%40gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CACbdT%3D36JiLapny11t4%3DpF0mHuv0g1mRV625i_FJAPP-
> syKB8A%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> 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/d658d7ef-4515-bbf9-538a-3cca60a8171b%
> 40getbackinthe.kitchen
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAA8yBMw1TWALrzvSGqef%2BgEAHgMg10g8udn9wyM3-4L6i%2BnhJA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing Django

2017-06-05 Thread Carlos Andre
pip install django==1.10



2017-06-05 13:59 GMT-03:00 Melvyn Sopacua :

> On Monday 05 June 2017 06:44:13 Oladipupo Elegbede wrote:
>
> > For the Python prompt from CMD and do the following
>
> >
>
> > >>>import Django
>
> > >>>Django.VERSION
>
>
>
> 1) it's django not Django
>
> > This should tell you what version of Django you have.
>
> >
>
> > On Jun 5, 2017 7:21 AM, "Daniel Roseman"  wrote:
>
> > > On Monday, 5 June 2017 12:33:28 UTC+1, Richard Mungai wrote:
>
> > >> Hi..
>
> > >> I'm trying to install django using the pip command i.e (pip install
>
> > >> django) but i keep getting the same error message i.e "Requirement
>
> > >> already satisfied: django in c:\program files\python
>
> > >> 35-32\lib\site-packages\django -1.10.6-py3.5.egg"
>
>
>
> 2) I'm betting it's 1.10.6 on Python 3.5 (32-bits, shooting for the bonus
> points).
>
> --
>
> Melvyn Sopacua
>
> --
> 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/9871067.85mFGhf4C7%40devstation
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAA8yBMz%2B8nkt88nezW_yPVHU4_%2BOAtV2hPsBa972PDZ3K-D_gQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Error on execute migration (create index) when set db_name with quoted string

2017-11-27 Thread Carlos Leite
I was making some introspections on meta attributes from a Model class
jsut to check what changes when we set some attributes on Meta class and 
etc...


TO check the Meta.db_name
I read the docs and saw that I could use quoted strings as told ..


"
... o prevent such transformations, use a quoted name as the value for 
db_table:

> db_table = '"name_left_in_lowercase"' 

 Such quoted names can also be used with Django’s other supported database 
backends; except for Oracle, however, the quotes have no effect. See the Oracle 
notes  
for more details.
"
at https://docs.djangoproject.com/en/1.8/ref/models/options/#db-table


Well, when I tried to *migrate* I got the error, during the index creation, 
described below.
Is it a bug ? or I miss soething ?
I just tried to set a custom name for a table, with quotes and hyphens 8P


'"big_name-with-hyphen-left_in_lowercase"'

the error hapends when PostgreSQL tries to create an index and Django named 
with part of the tables name. 


### The Model Class


class Publisher(models.Model):
"""
Book's Author - author is a Book's model supplement.
"""
name = models.CharField(verbose_name='publisher name', max_length=50, 
null=False)


class Meta:
db_table = '"big_name-with-hyphen-left_in_lowercase"'
get_latest_by = "name"
ordering = ['name', ]
verbose_name = 'Publiser'
verbose_name_plural = 'Publishers'
indexes = [
models.Index(fields=['name', ]),
]




### The Migration 0007


# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-11-28 03:15
from __future__ import unicode_literals


from django.db import migrations, models




class Migration(migrations.Migration):


dependencies = [
('testapp', '0006_auto_20171127_1927'),
]


operations = [
migrations.RemoveIndex(
model_name='publisher',
name='testapp_pub_name_88e073_idx',
),
migrations.AddIndex(
model_name='publisher',
index=models.Index(fields=['name'], name='"big_name-w_name_cd0539_idx'),
),
migrations.AlterModelTable(
name='publisher',
table='"big_name-with-hyphen-left_in_lowercase"',
),
]




### traceback


$python manage.py makemigrations
System check identified some issues:


Migrations for 'testapp':
testproject/testapp/migrations/0007_auto_20171128_0315.py
- Remove index testapp_pub_name_88e073_idx from publisher
- Create index "big_name-w_name_cd0539_idx on field(s) name of model 
publisher
- Rename table for publisher to "big_name-with-hyphen-left_in_lowercase"
(dj_datadictionary) 
20171125.Sat01:15:52cadu>/Volumes/p10G/prj/dj_datadictionary_testproject/testproject>




$python manage.py migrate
System check identified some issues:


Operations to perform:
Apply all migrations: admin, auth, contenttypes, sessions, testapp
Running migrations:
Applying testapp.0007_auto_20171128_0315...Traceback (most recent call 
last):
File "manage.py", line 22, in 
execute_from_command_line(sys.argv)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 363, in execute_from_command_line
utility.execute()
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 355, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/base.py",
 
line 283, in run_from_argv
self.execute(*args, **cmd_options)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/base.py",
 
line 330, in execute
output = self.handle(*args, **options)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/commands/migrate.py",
 
line 204, in handle
fake_initial=fake_initial,
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, 
fake_initial=fake_initial)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, 
fake_initial=fake_initial)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/migrations/executor.py",
 
line 244, in apply_migration
state = migration.apply(state, schema_editor)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/migrations/migration.py",
 
line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, 
project_state)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/migrations/operations/models.py",
 
line 785, in database_forwards
schema_editor.add_index(model, self.index)
File 
"/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/db/backends/base/schema.py",
 
line 330, in add_index
self.execute(index.create_sql(model, self))
File 
"/Users/cadu/Envs/dj_d

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-27 Thread Carlos Leite
ooops 


in the migration 0007 the index name seems badly formed 

```python 
   ...
migrations.AddIndex(
model_name='publisher',
index=models.Index(fields=['name'], 
name='"big_name-w_name_cd0539_idx'),   # <<<<<<<  there is a " in plus. and 
its never closed. 
),
```

On Tuesday, November 28, 2017 at 2:01:56 AM UTC-2, Carlos Leite wrote:
>
> I was making some introspections on meta attributes from a Model class
> jsut to check what changes when we set some attributes on Meta class and 
> etc...
>
>
> TO check the Meta.db_name
> I read the docs and saw that I could use quoted strings as told ..
>
>
> "
> ... o prevent such transformations, use a quoted name as the value for 
> db_table:
>
> > db_table = '"name_left_in_lowercase"' 
>
>  Such quoted names can also be used with Django’s other supported database 
> backends; except for Oracle, however, the quotes have no effect. See the 
> Oracle 
> notes <https://docs.djangoproject.com/en/1.8/ref/databases/#oracle-notes> 
> for more details.
> "
> at https://docs.djangoproject.com/en/1.8/ref/models/options/#db-table
>
>
> Well, when I tried to *migrate* I got the error, during the index 
> creation, described below.
> Is it a bug ? or I miss soething ?
> I just tried to set a custom name for a table, with quotes and hyphens 8P
>
>
> '"big_name-with-hyphen-left_in_lowercase"'
>
> the error hapends when PostgreSQL tries to create an index and Django 
> named with part of the tables name. 
>
>
> ### The Model Class
>
>
> class Publisher(models.Model):
> """
> Book's Author - author is a Book's model supplement.
> """
> name = models.CharField(verbose_name='publisher name', max_length=50, 
> null=False)
>
>
> class Meta:
> db_table = '"big_name-with-hyphen-left_in_lowercase"'
> get_latest_by = "name"
> ordering = ['name', ]
> verbose_name = 'Publiser'
> verbose_name_plural = 'Publishers'
> indexes = [
> models.Index(fields=['name', ]),
> ]
>
>
>
>
> ### The Migration 0007
>
>
> # -*- coding: utf-8 -*-
> # Generated by Django 1.11 on 2017-11-28 03:15
> from __future__ import unicode_literals
>
>
> from django.db import migrations, models
>
>
>
>
> class Migration(migrations.Migration):
>
>
> dependencies = [
> ('testapp', '0006_auto_20171127_1927'),
> ]
>
>
> operations = [
> migrations.RemoveIndex(
> model_name='publisher',
> name='testapp_pub_name_88e073_idx',
> ),
> migrations.AddIndex(
> model_name='publisher',
> index=models.Index(fields=['name'], name='"big_name-w_name_cd0539_idx'),
> ),
> migrations.AlterModelTable(
> name='publisher',
> table='"big_name-with-hyphen-left_in_lowercase"',
> ),
> ]
>
>
>
>
> ### traceback
>
>
> $python manage.py makemigrations
> System check identified some issues:
>
>
> Migrations for 'testapp':
> testproject/testapp/migrations/0007_auto_20171128_0315.py
> - Remove index testapp_pub_name_88e073_idx from publisher
> - Create index "big_name-w_name_cd0539_idx on field(s) name of model 
> publisher
> - Rename table for publisher to "big_name-with-hyphen-left_in_lowercase"
> (dj_datadictionary) 
> 20171125.Sat01:15:52cadu>/Volumes/p10G/prj/dj_datadictionary_testproject/testproject>
>
>
>
>
> $python manage.py migrate
> System check identified some issues:
>
>
> Operations to perform:
> Apply all migrations: admin, auth, contenttypes, sessions, testapp
> Running migrations:
> Applying testapp.0007_auto_20171128_0315...Traceback (most recent call 
> last):
> File "manage.py", line 22, in 
> execute_from_command_line(sys.argv)
> File 
> "/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/__init__.py",
>  
> line 363, in execute_from_command_line
> utility.execute()
> File 
> "/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/__init__.py",
>  
> line 355, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File 
> "/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/base.py",
>  
> line 283, in run_from_argv
> self.execute(*args, **cmd_options)
> File 
> "/Users/cadu/Envs/dj_datadictionary/lib/python2.7/site-packages/django/core/management/base.py&quo

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
Thanks Simon,

I tryied to find some issue related but found nothing.

The ticket #28792 seems exactly the case ...

I'll take a couple of hours (at work), but I'll try that patch
and regenarate the migrations.

thanks again.

-
Cadu Leite
| Twitter | Medium Blog | Google + |
| @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
<https://medium.com/@cadu_leite> | +CarlosLeite
<https://plus.google.com/u/0/+CarlosLeite> |

http://people.python.org.br/

On Tue, Nov 28, 2017 at 4:14 AM, Simon Charette 
wrote:

> Hey Carlos,
>
> I believe the trailing quote truncation issue might be solved in the yet
> to be released
> 1.11.8[0][1] version.
>
> Could you confirm whether or not it's the case? You'll have to regenerate
> your migration.
>
> Best,
> Simon
>
> [0] https://github.com/django/django/commit/a35ab95ed4eec5c62fa19bdc69ecfe
> 0eff3e1fca
> [1] https://code.djangoproject.com/ticket/28792
>
>
> Le lundi 27 novembre 2017 23:24:59 UTC-5, Carlos Leite a écrit :
>>
>> ooops
>>
>>
>> in the migration 0007 the index name seems badly formed
>>
>> ```python
>>...
>> migrations.AddIndex(
>> model_name='publisher',
>> index=models.Index(fields=['name'], name='"big_name-w_name_cd0539_idx'),
>>  # <<<<<<<  there is a " in plus. and its never closed.
>> ),
>> ```
>>
>> On Tuesday, November 28, 2017 at 2:01:56 AM UTC-2, Carlos Leite wrote:
>>>
>>> I was making some introspections on meta attributes from a Model class
>>> jsut to check what changes when we set some attributes on Meta class and
>>> etc...
>>>
>>>
>>> TO check the Meta.db_name
>>> I read the docs and saw that I could use quoted strings as told ..
>>>
>>>
>>> "
>>> ... o prevent such transformations, use a quoted name as the value for
>>> db_table:
>>>
>>> > db_table = '"name_left_in_lowercase"'
>>>
>>>  Such quoted names can also be used with Django’s other supported
>>> database backends; except for Oracle, however, the quotes have no effect.
>>> See the Oracle notes
>>> <https://docs.djangoproject.com/en/1.8/ref/databases/#oracle-notes> for
>>> more details.
>>> "
>>> at https://docs.djangoproject.com/en/1.8/ref/models/options/#db-table
>>>
>>>
>>> Well, when I tried to *migrate* I got the error, during the index
>>> creation, described below.
>>> Is it a bug ? or I miss soething ?
>>> I just tried to set a custom name for a table, with quotes and hyphens 8P
>>>
>>>
>>> '"big_name-with-hyphen-left_in_lowercase"'
>>>
>>> the error hapends when PostgreSQL tries to create an index and Django
>>> named with part of the tables name.
>>>
>>>
>>> ### The Model Class
>>>
>>>
>>> class Publisher(models.Model):
>>> """
>>> Book's Author - author is a Book's model supplement.
>>> """
>>> name = models.CharField(verbose_name='publisher name', max_length=50,
>>> null=False)
>>>
>>>
>>> class Meta:
>>> db_table = '"big_name-with-hyphen-left_in_lowercase"'
>>> get_latest_by = "name"
>>> ordering = ['name', ]
>>> verbose_name = 'Publiser'
>>> verbose_name_plural = 'Publishers'
>>> indexes = [
>>> models.Index(fields=['name', ]),
>>> ]
>>>
>>>
>>>
>>>
>>> ### The Migration 0007
>>>
>>>
>>> # -*- coding: utf-8 -*-
>>> # Generated by Django 1.11 on 2017-11-28 03:15
>>> from __future__ import unicode_literals
>>>
>>>
>>> from django.db import migrations, models
>>>
>>>
>>>
>>>
>>> class Migration(migrations.Migration):
>>>
>>>
>>> dependencies = [
>>> ('testapp', '0006_auto_20171127_1927'),
>>> ]
>>>
>>>
>>> operations = [
>>> migrations.RemoveIndex(
>>> model_name='publisher',
>>> name='testapp_pub_name_88e073_idx',
>>> ),
>>> migrations.AddIndex(
>>> model_name='publisher',
>>> index=models.Index(fields=[&#

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
Can I use double quoted names with others SGDBs , PostgreSQL ?
or it is specific for Oracle ...

by the way the patch didint work. Its another problem Is not a metter of
"." namespaced name.
 Its about if I can or not use '"tb_custom_name"'  double quoted string  =
' " " '

if I can use that (' " " ') for any database engine, I believe its a bug
...
and even changed the migration manually, the same error occur when create
an INDEX (at my example) ...

so, the error is at the method that generates the db_name string passed for
the ORM to create tables and constraints.




-
Cadu Leite
| Twitter | Medium Blog | Google + |
| @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
<https://medium.com/@cadu_leite> | +CarlosLeite
<https://plus.google.com/u/0/+CarlosLeite> |

http://people.python.org.br/

On Tue, Nov 28, 2017 at 9:25 AM, Carlos Leite  wrote:

> Thanks Simon,
>
> I tryied to find some issue related but found nothing.
>
> The ticket #28792 seems exactly the case ...
>
> I'll take a couple of hours (at work), but I'll try that patch
> and regenarate the migrations.
>
> thanks again.
>
> -
> Cadu Leite
> | Twitter | Medium Blog | Google + |
> | @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
> <https://medium.com/@cadu_leite> | +CarlosLeite
> <https://plus.google.com/u/0/+CarlosLeite> |
>
> http://people.python.org.br/
>
> On Tue, Nov 28, 2017 at 4:14 AM, Simon Charette 
> wrote:
>
>> Hey Carlos,
>>
>> I believe the trailing quote truncation issue might be solved in the yet
>> to be released
>> 1.11.8[0][1] version.
>>
>> Could you confirm whether or not it's the case? You'll have to regenerate
>> your migration.
>>
>> Best,
>> Simon
>>
>> [0] https://github.com/django/django/commit/a35ab95ed4eec5c62fa1
>> 9bdc69ecfe0eff3e1fca
>> [1] https://code.djangoproject.com/ticket/28792
>>
>>
>> Le lundi 27 novembre 2017 23:24:59 UTC-5, Carlos Leite a écrit :
>>>
>>> ooops
>>>
>>>
>>> in the migration 0007 the index name seems badly formed
>>>
>>> ```python
>>>...
>>> migrations.AddIndex(
>>> model_name='publisher',
>>> index=models.Index(fields=['name'], name='"big_name-w_name_cd0539_idx'),
>>>  # <<<<<<<  there is a " in plus. and its never closed.
>>> ),
>>> ```
>>>
>>> On Tuesday, November 28, 2017 at 2:01:56 AM UTC-2, Carlos Leite wrote:
>>>>
>>>> I was making some introspections on meta attributes from a Model class
>>>> jsut to check what changes when we set some attributes on Meta class
>>>> and etc...
>>>>
>>>>
>>>> TO check the Meta.db_name
>>>> I read the docs and saw that I could use quoted strings as told ..
>>>>
>>>>
>>>> "
>>>> ... o prevent such transformations, use a quoted name as the value for
>>>> db_table:
>>>>
>>>> > db_table = '"name_left_in_lowercase"'
>>>>
>>>>  Such quoted names can also be used with Django’s other supported
>>>> database backends; except for Oracle, however, the quotes have no effect.
>>>> See the Oracle notes
>>>> <https://docs.djangoproject.com/en/1.8/ref/databases/#oracle-notes>
>>>> for more details.
>>>> "
>>>> at https://docs.djangoproject.com/en/1.8/ref/models/options/#db-table
>>>>
>>>>
>>>> Well, when I tried to *migrate* I got the error, during the index
>>>> creation, described below.
>>>> Is it a bug ? or I miss soething ?
>>>> I just tried to set a custom name for a table, with quotes and hyphens
>>>> 8P
>>>>
>>>>
>>>> '"big_name-with-hyphen-left_in_lowercase"'
>>>>
>>>> the error hapends when PostgreSQL tries to create an index and Django
>>>> named with part of the tables name.
>>>>
>>>>
>>>> ### The Model Class
>>>>
>>>>
>>>> class Publisher(models.Model):
>>>> """
>>>> Book's Author - author is a Book's model supplement.
>>>> """

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-28 Thread Carlos Leite
 self.apply_migration(state, migration, fake=fake,
fake_initial=fake_initial)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/executor.py",
line 244, in apply_migration
state = migration.apply(state, schema_editor)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/migration.py",
line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state,
project_state)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/operations/models.py",
line 788, in database_forwards
schema_editor.add_index(model, self.index)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/backends/base/schema.py",
line 331, in add_index
self.execute(index.create_sql(model, self))
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/backends/base/schema.py",
line 120, in execute
cursor.execute(sql, params)
  File "/Users/cadu/Envs/dj28792/src/django/django/db/backends/utils.py",
line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File "/Users/cadu/Envs/dj28792/src/django/django/db/backends/utils.py",
line 64, in execute
return self.cursor.execute(sql, params)
  File "/Users/cadu/Envs/dj28792/src/django/django/db/utils.py", line 94,
in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/Users/cadu/Envs/dj28792/src/django/django/db/backends/utils.py",
line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.ProgrammingError: zero-length delimited identifier at or
near """"
LINE 1: CREATE INDEX ""tbl_litle__name_408be5_idx" ON "tbl_litle_nam...
 <===
 ^

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
even editing the migration manually
 ...  the problem appears again on created CONTRAINT for a PK
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

(dj28792)
20171128.Tue11:45:02cadu>/Volumes/p10G/prj/dj_datadictionary_testproject/testproject>
cadu.[566]$python manage.py migrate
System check identified some issues:

WARNINGS:
testapp.Book.author: (fields.W340) null has no effect on ManyToManyField.
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions, testapp
Running migrations:
  Applying testapp.0001_initial...Traceback (most recent call last):
  File "manage.py", line 22, in 
execute_from_command_line(sys.argv)
  File
"/Users/cadu/Envs/dj28792/src/django/django/core/management/__init__.py",
line 364, in execute_from_command_line
utility.execute()
  File
"/Users/cadu/Envs/dj28792/src/django/django/core/management/__init__.py",
line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/Users/cadu/Envs/dj28792/src/django/django/core/management/base.py", line
283, in run_from_argv
self.execute(*args, **cmd_options)
  File
"/Users/cadu/Envs/dj28792/src/django/django/core/management/base.py", line
330, in execute
output = self.handle(*args, **options)
  File
"/Users/cadu/Envs/dj28792/src/django/django/core/management/commands/migrate.py",
line 204, in handle
fake_initial=fake_initial,
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/executor.py",
line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake,
fake_initial=fake_initial)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/executor.py",
line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake,
fake_initial=fake_initial)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/migrations/executor.py",
line 244, in apply_migration
state = migration.apply(state, schema_editor)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/backends/base/schema.py",
line 93, in __exit__
self.execute(sql)
  File
"/Users/cadu/Envs/dj28792/src/django/django/db/backends/base/schema.py",
line 120, in execute
cursor.execute(sql, params)
  File "/Users/cadu/Envs/dj28792/src/django/django/db/backends/utils.py",
line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
  File "/Users/cadu/Envs/dj28792/src/d

Re: Error on execute migration (create index) when set db_name with quoted string

2017-11-29 Thread Carlos Leite
Sure,
its great to help the project.
thanks for your attention.

tonight (brazil) I will prepare the ticket.

cheers


-
Cadu Leite
| Twitter | Medium Blog | Google + |
| @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
<https://medium.com/@cadu_leite> | +CarlosLeite
<https://plus.google.com/u/0/+CarlosLeite> |

http://people.python.org.br/

On Tue, Nov 28, 2017 at 6:30 PM, Simon Charette 
wrote:

> Hello Carlos,
>
> Thank you for taking the time to reproduce the issue against the upcoming
> 1.11 release.
>
> It looks like `Index` class doesn't use the same name generation logic as
> the schema editor for some reason[0] so it will be have to be adjusted in
> a similar way.
>
> Could you file a new ticket[1] referencing this thread and detailing the
> issue
> you are encoutering? It should be eligible for a backport since this is a
> bug
> in a newly introduced feature.
>




>
> Until a 1.11.x version fixing the issue is released you can work around the
> issue by defining an Index(name)[2] manually.
>
> Cheers,
> Simon
>
> [0] https://github.com/django/django/blob/89db4293d40613626833860de2
> 8e8ccdd413/django/db/models/indexes.py#L96-L122
> [1] https://code.djangoproject.com/newticket
> [2] https://docs.djangoproject.com/en/1.11/ref/models/indexes/#name
>
>
> Le mardi 28 novembre 2017 09:01:06 UTC-5, Carlos Leite a écrit :
>
>>
>> Testing the pacth for ticket/28792 at [1]
>> with Python 2.7, Django 1.11
>> to test badly formed  double quoted db_table name
>>
>> db_table = '"tbl_litle_name"',
>>
>> [1] https://code.djangoproject.com/ticket/28792
>>
>>
>>
>> Django Branch 1.11
>> --
>>
>> I've aplied this commit
>>
>> $pip install -e git+https://github.com/django/
>> django.git@a35ab95ed#egg=django
>>
>>
>>
>> Migration Initial
>> -
>>
>> # -*- coding: utf-8 -*-
>> # Generated by Django 1.11.8.dev20171115030630 on 2017-11-28 13:44
>> from __future__ import unicode_literals
>>
>> from django.db import migrations, models
>> import django.db.models.deletion
>>
>>
>> class Migration(migrations.Migration):
>>
>> initial = True
>>
>> dependencies = [
>> ]
>>
>> operations = [
>> migrations.CreateModel(
>> name='Author',
>> fields=[
>> ('id', models.AutoField(auto_created=True,
>> primary_key=True, serialize=False, verbose_name='ID')),
>> ('name', models.CharField(max_length=50,
>> verbose_name='author name')),
>> ],
>> options={
>> 'ordering': ['name'],
>> 'get_latest_by': 'name',
>> 'verbose_name': 'Author',
>> 'verbose_name_plural': 'Authors',
>> },
>> ),
>> migrations.CreateModel(
>> name='Book',
>> fields=[
>> ('id', models.AutoField(auto_created=True,
>> primary_key=True, serialize=False, verbose_name='ID')),
>> ('name', models.CharField(help_text="book's name",
>> max_length=50, verbose_name='book name')),
>> ('isbn_10', models.CharField(blank=True,
>> db_column='old_isbn_number', db_index=True, help_text='international
>> standart book number (old length 10)', max_length=10, null=True)),
>> ('isbn_13', models.CharField(blank=True, db_index=True,
>> help_text='international standart book number (after 2007 jan 01)',
>> max_length=13, unique=True)),
>> ('language', models.CharField(blank=True,
>> choices=[('PORTUGUESE_BRAZIL', 'Portugu\xeas Brasil'), ('PORTUGUES',
>> 'Portugu\xeas'), ('ENGLISH', 'English'), ('FRANCE', 'France'), ('ESPANISH',
>> 'Espa\xf1ol')], help_text='edition length', max_length=5, null=True)),
>> ],
>> options={
>> 'ordering': ['name'],
>> 'get_latest_by': 'name',
>> 'verbose_name': 'book

Re: Error on execute migration (create index) when set db_name with quoted string

2017-12-02 Thread Carlos Leite
Thanks again Simon

Ticket created  https://code.djangoproject.com/ticket/28876


-
Cadu Leite
| Twitter | Medium Blog | Google + |
| @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
<https://medium.com/@cadu_leite> | +CarlosLeite
<https://plus.google.com/u/0/+CarlosLeite> |

http://people.python.org.br/

On Wed, Nov 29, 2017 at 3:59 PM, Carlos Leite  wrote:

>
> Sure,
> its great to help the project.
> thanks for your attention.
>
> tonight (brazil) I will prepare the ticket.
>
> cheers
>
>
> -
> Cadu Leite
> | Twitter | Medium Blog | Google + |
> | @cadu_leite <https://twitter.com/cadu_leite> | @cadu_leite
> <https://medium.com/@cadu_leite> | +CarlosLeite
> <https://plus.google.com/u/0/+CarlosLeite> |
>
> http://people.python.org.br/
>
> On Tue, Nov 28, 2017 at 6:30 PM, Simon Charette 
> wrote:
>
>> Hello Carlos,
>>
>> Thank you for taking the time to reproduce the issue against the upcoming
>> 1.11 release.
>>
>> It looks like `Index` class doesn't use the same name generation logic as
>> the schema editor for some reason[0] so it will be have to be adjusted in
>> a similar way.
>>
>> Could you file a new ticket[1] referencing this thread and detailing the
>> issue
>> you are encoutering? It should be eligible for a backport since this is a
>> bug
>> in a newly introduced feature.
>>
>
>
>
>
>>
>> Until a 1.11.x version fixing the issue is released you can work around
>> the
>> issue by defining an Index(name)[2] manually.
>>
>> Cheers,
>> Simon
>>
>> [0] https://github.com/django/django/blob/89db4293d406136268
>> 33860de28e8ccdd413/django/db/models/indexes.py#L96-L122
>> [1] https://code.djangoproject.com/newticket
>> [2] https://docs.djangoproject.com/en/1.11/ref/models/indexes/#name
>>
>>
>> Le mardi 28 novembre 2017 09:01:06 UTC-5, Carlos Leite a écrit :
>>
>>>
>>> Testing the pacth for ticket/28792 at [1]
>>> with Python 2.7, Django 1.11
>>> to test badly formed  double quoted db_table name
>>>
>>> db_table = '"tbl_litle_name"',
>>>
>>> [1] https://code.djangoproject.com/ticket/28792
>>>
>>>
>>>
>>> Django Branch 1.11
>>> --
>>>
>>> I've aplied this commit
>>>
>>> $pip install -e git+https://github.com/django/
>>> django.git@a35ab95ed#egg=django
>>>
>>>
>>>
>>> Migration Initial
>>> -
>>>
>>> # -*- coding: utf-8 -*-
>>> # Generated by Django 1.11.8.dev20171115030630 on 2017-11-28 13:44
>>> from __future__ import unicode_literals
>>>
>>> from django.db import migrations, models
>>> import django.db.models.deletion
>>>
>>>
>>> class Migration(migrations.Migration):
>>>
>>> initial = True
>>>
>>> dependencies = [
>>> ]
>>>
>>> operations = [
>>> migrations.CreateModel(
>>> name='Author',
>>> fields=[
>>> ('id', models.AutoField(auto_created=True,
>>> primary_key=True, serialize=False, verbose_name='ID')),
>>> ('name', models.CharField(max_length=50,
>>> verbose_name='author name')),
>>> ],
>>> options={
>>> 'ordering': ['name'],
>>> 'get_latest_by': 'name',
>>> 'verbose_name': 'Author',
>>> 'verbose_name_plural': 'Authors',
>>> },
>>> ),
>>> migrations.CreateModel(
>>> name='Book',
>>> fields=[
>>> ('id', models.AutoField(auto_created=True,
>>> primary_key=True, serialize=False, verbose_name='ID')),
>>> ('name', models.CharField(help_text="book's name",
>>> max_length=50, verbose_name='book name')),
>>> ('isbn_10', models.CharField(blank=True,
>>> db_column='old_isbn_number', db_index=True, help_text='inte

Openings for software developers in São Paulo, Brazil

2018-01-12 Thread Carlos Ribas
Hello all,

The Research, Innovation and Dissemination Center on Neuromathematics (RIDC 
NeuroMat) is offering scholarships for information technology professionals 
interested in being part of a breakthrough and innovative scientific 
project.

It’s a FAPESP Technical Expertise Scholarship of level 5, in the value of 
BRL 7.174,40, for 40 hours of work per week.

To apply for the position, please send your CV to vagas...@numec.prp.usp.br 
until 
January 31st 2018.

More details: 
http://neuromat.numec.prp.usp.br/content/openings-software-developers

-- 
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/36479959-b5b8-43ed-aeb5-053fd6cc2420%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Any advice on linguistic project?

2019-01-30 Thread Carlos Eduardo
You can do all that stuff with Python and use Django as an UI. 

I'm doing something similar. I'm from computational linguistics area as 
well.

My first advice for you is to study a special book related to python and 
linguistics. The book is not 100% but the read it is worthwhile.
Here is the link:

https://faculty.sbs.arizona.edu/hammond/ling508-f17/pyling.pdf

This text will open your mind. 

As soon as you get pro I suggest you to to start using the NLTK tools for 
python:

https://www.nltk.org/

These materials will give you a solid basis and most of your needs will be 
fully covered. 
However if you need something more specific you can convert any algorithm 
to Python and create your own modules. 

In case you can share them on github for others members of the community 
use it as well would be a plus.

thanks!! 

Em quarta-feira, 30 de janeiro de 2019 10:24:33 UTC-2, monkb...@gmail.com 
escreveu:
>
> I'm a student of linguistics and just started to learn python and django a 
> few months ago. Planning to apply some utilities of linguistic with some 
> advanced function into a showcase on the website, but still not sure how to 
> achieve it through django.
>
> Can anyone recommend some similar projects(package) for me to learn from?  
> (basic function like corpora analyse, comparison, some words statistics, 
> simple graphic illustration, and any guru technique is welcomed too !) 
>
> Really appreciate your advice, thank you.
>

-- 
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/52b1b21f-de76-47e2-b0b8-cfafe8519d6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to create a Django project without using an IDE, but using the django-admin startproject command

2019-03-11 Thread Carlos Eduardo
Another tip is using templates to create your project. I'm developing one 
but the first version is already published. I added the template on GitHub 
with a good how-to.

https://github.com/tresloukadu/Django-Bootstrap-Project

Em sábado, 9 de março de 2019 15:15:01 UTC-3, Ando Rakotomanana escreveu:
>
> Hello, I'm still starting with django. And I have a problem with the 
> creation of the project, I write: "django-admin startproject DjangoTest" in 
> the cmd of my windows and it tells me that django-admin is not an internal 
> command. While I typed the same code this morning in the cmd and it worked. 
> And I do not understand why?
> I have python 2.7.0 and 3.7.2 and django 1.6.2 installed on my windows 8.1
>

-- 
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/547baceb-dd22-49a0-a667-18bce52b4dfd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Was I supposed to be able to create a question on the website using 'runserver'?

2020-11-11 Thread Carlos Henrique
I'm following this 
 
Django tutorial. So far I haven't had an issue so far, but now I'm not 
really sure if I understood it correctly. We created a shortcut function to 
create questions, but I thought that it was meant to be user-side and when 
I use 'runserver', on the website there's no such option, only the 
previously created question. This is the code for the function:
def create_question(question_text, days): """ Create a question with the 
given `question_text` and published the given number of `days` offset to 
now (negative for questions published in the past, positive for questions 
that have yet to be published). """ time = timezone.now() + 
datetime.timedelta(days=days) return 
Question.objects.create(question_text=question_text, pub_date=time) 

Did I get it wrong? This function is only admin-sided? It's on 
'polls/test.py' and it's outside every class.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f4dfe964-3417-4605-af26-d99a0d8fa4b5n%40googlegroups.com.


Django access the Default database (prod/dev) when testing and Fatal Error

2020-08-13 Thread Carlos Leite
Hello everyone, 

I run into a odd situation while trying to run some tests in an old project 
(dj 1.8)
Then I tried the same on a django 3.1 and the problem is still there. 

# models.py  #
class Disco(models.Model):
nome = models.CharField('disco', max_length=50)

class Musica(models.Model):
disco = models.ForeignKey(Disco, on_delete=models.CASCADE)
nome = models.CharField('nome do disco', max_length=50)

# forms.py  #
class MusicForm(forms.Form):
 ''' ... like a search form, I need option from database '''
 disco = forms.ChoiceField(choices=Disco.objects.all())

# tests.py  #
# in the tests.py I just need to import the form to have the odd bahaviour

from django.test import TestCase
from .forms import MusicForm

... I just need to import the `MusicForm` to have the erros 
# the error #
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
   django.db.utils.OperationalError: FATAL:  database "disccollection" does 
not exist

I was trying to run tests, so the database to hit should be  `test_
disccollection`
but not `disccollection` (in my settings.py). 
That may happends because django test framework only changes the 
settings.database.default alias after my form was initialized.

Is it a known bug or a bug at all ? 

I dont kknow not even search for this on django bugs . 

Have anybody seem there before ?

PS: I put a sample code on 
https://github.com/cadu-leite/django18py2testdb/tree/dj33py3test



-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/91dcb131-749c-4065-bd37-e94d62249398n%40googlegroups.com.


Forbidden (403) - CSRF verification failed. Request aborted.

2022-11-22 Thread Carlos Roberto
Hi everyone!

I use ngrok to make my projects available in django. I'm having trouble 
accessing the admin page. After I enter the username and password I get the 
error 403.

Has anyone had the same problem and could help me?

Regards


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/de5c4738-f540-4596-b1bf-0b0b16aabbf2n%40googlegroups.com.


Accounts signup does not create user

2023-06-24 Thread Carlos Pimentel_leanTech
Hello fellows,

I have a django app with leaflet map,
That allows users to create accounts through a sign up template and view.

Before installing allauth it worked fine after I installed it, everything
seems to be working but the user is not created and my CustomUsers app in
admin area remains unchanged.

Any tip on how to solve this?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BUhrNB%3DyPawCs-H7rBee-V%2B1m9Su7-PM7nSDaOu4mQE4TEoFA%40mail.gmail.com.


Re: Problem with my website

2023-07-12 Thread Carlos Pimentel_leanTech
If your website appears as a blank white page when you set `DEBUG = False`
in your Django settings, it indicates that an error has occurred, and
Django is not providing detailed error information to the end-user for
security reasons. When `DEBUG` is set to `True`, Django shows detailed
error messages, making it easier to identify and fix issues during
development.

To troubleshoot the problem and determine the cause of the white page, you
can follow these steps:

1. Check the Server Logs: When `DEBUG` is set to `False`, Django logs
errors and exceptions to the server logs instead of displaying them to the
user. Review the server logs to identify any error messages or exceptions
that are being logged. The location of the logs depends on your server
configuration.

2. Custom Error Pages: Django allows you to define custom error pages for
different HTTP error codes. Make sure you have configured the appropriate
error handling and error pages for your production environment. Check if
any custom error pages are causing the white page issue.

3. Static Files: If your website relies on static files (CSS, JavaScript,
images), ensure that they are being served correctly in the production
environment. Check if the static files are properly collected and
accessible.

4. Database Connection: Verify that your Django application can
successfully connect to the database in your production environment. Ensure
that the database credentials and configuration are correct.

5. Third-party Libraries and Dependencies: Check if any third-party
libraries or dependencies used by your Django project are causing conflicts
or errors in the production environment. Make sure you have installed and
configured them correctly.

6. Security Settings: Certain security settings, such as the
`ALLOWED_HOSTS` setting, need to be properly configured for your production
environment. Ensure that `ALLOWED_HOSTS` includes the appropriate domain
names or IP addresses for your website.

7. Email Configuration: If your Django application sends emails,
double-check that the email configuration is properly set up in your
production settings.

By investigating these areas, you should be able to identify the cause of
the white page issue when `DEBUG` is set to `False`. It's important to note
that when running in production, it's generally recommended to keep `DEBUG`
set to `False` for security reasons. Remember to restart your Django server
after making any changes to the settings file.

On Wed, Jul 12, 2023 at 4:47 PM Théodore KOSSI 
wrote:

> Hello everyone,
> I have a problem with my website. When I put DEBUG = False, my website
> appears in white page but when it is in True, my website works normally.
> Please, anyone can help me ??
>
> --
> theodoros17@python-developer
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKiMjQGQRQ_eanYNBrqAFBU3ayakQUxuQuNmMhn8km%2BCuysfBA%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BUhrNDLdcgha1ab76OQg9aSm3H2STda4zGDMkuU642rKDyBjw%40mail.gmail.com.


User.objects.filter( theUser.get_profile().paid='No' )

2009-11-14 Thread Carlos Ricardo Santos
Hi,

I extended the user class with a UserProfile, with the Django docs tutorial.
But now I need to do a query to list all users that haven't payed
(pay='No').


I tried something like this: *User.objects.filter(
User.get_profile().paid='No' )*
or *User.objects.filter( User.profile.paid='No' )*

But no lucky...
Even tried an objects.extra like this:

*User.objects.extra(*
* ** select={*
* **'users': 'SELECT * FROM auth_user, app_userprofile \*
* **WHERE app_userprofile.id = auth_user.id \*
* **AND app_userprofile.paid=\'No\''*
* ** }*
* ** )*

But the template raises an exception:
"Caught an exception while rendering: only a single result allowed for a
SELECT that is part of an expression"



Any advices?


-- 
Greetings,
Carlos Ricardo Santos

--

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




Re: User.objects.filter( theUser.get_profile().paid='No' )

2009-11-14 Thread Carlos Ricardo Santos
Thanks for the help, Karen, Solved :D
Django is really so simple... I just keep thinking it has limits... The
limit is only the mind.
--

Karen's way:

*User.objects.filter( profile__paid='N' )* #works great!

Or even another way I found now:

*profiles= UserProfile.objects.filter(paid='N')*

and in template, to access the User object just call:

(...)

{% *for profile in profiles*%}
   User {% *profile.user.username* %} haven't payed yet

(...)

By this way I just rendered the profile and accessed the super class

Thanks Karen.


2009/11/14 Karen Tracey 

> On Sat, Nov 14, 2009 at 11:21 AM, Carlos Ricardo Santos <
> carlosricardosan...@gmail.com> wrote:
>
>> Hi,
>>
>> I extended the user class with a UserProfile, with the Django docs
>> tutorial.
>> But now I need to do a query to list all users that haven't payed
>> (pay='No').
>>
>>
>> I tried something like this: *User.objects.filter(
>> User.get_profile().paid='No' )*
>> or *User.objects.filter( User.profile.paid='No' )*
>>
>>
> The user profile is just a model with a ForeignKey to User, so you can use
> standard ORM methods for accessing it from the User model, you do not have
> to go through get_profile().  So try:
>
> User.objects.filter(userprofile__paid='No')
>
> Karen
>
>
> --
> 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=.
>



-- 
Cumprimentos,
Carlos Ricardo Santos

--

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




Re: weird error on django basic blog

2009-11-14 Thread Carlos Ricardo Santos
I can only see that you're missing the
templates_path/blog/post_archive_day.html
template.



2009/11/14 Bobby Roberts 

> anyone know what this traceback means?
>
>
> http://www.thecigarcastle.com/blog/2009/nov/1/my-first-blog-post/
>
> --
>
> 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=.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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




Re: Auth and Sites in Admin

2009-11-14 Thread Carlos Ricardo Santos
I don't know for auth... neither sites... But to disable stuff from admin
you just:

admin.site.unregister(TheTargetModel)
on urls.py

[]


2009/11/15 Zeynel 

>
> Is it possible to remove "Auth" and "Sites" sections from the Admin
> panel?
>
> --
>
> 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=.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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




Django i18n

2009-11-16 Thread Carlos Ricardo Santos
Hi:

I tried all the ways possible and impossible to make my Django project have
i18n...
Put all settings (INSTALLED_APPS, CONTEXT_PROCESSORS), generated languages,
compiled messages, edited the ".po" files, setted the ugettext to "_", in
views all the strings are like this: toSend= _("Hello"), but so far... only
the Administrator panel is translated cause I checked (put a post form to
change the language in the backoffice).

I found that changing language only works for POST requests... Ok, DONE.
But even with a post... only the backoffice seems to be responding to my
language change request...

I use to folders at app/locale:

pt-PT
en-GB

Any ideas? Someone has implemented a foreign language before?

Thanks in advance.

-- 
Carlos Ricardo Santos

--

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




Re: Django i18n

2009-11-16 Thread Carlos Ricardo Santos
I think pt-BR will fit. Just can't understand why the backoffice is
translated and the main app not : (
Even in pt-Pt.

On Nov 17, 2009 2:30 AM, "Kenneth Gonsalves"  wrote:

On Monday 16 Nov 2009 9:46:58 pm Carlos Ricardo Santos wrote: > I use to
folders at app/locale: > >...
I have implemented english ;-) I assume you mean implementing a non-english
language? This support has been there since 2005, and I have implemented
sites
in finnish, tamil also. One thing is that unless django itself has the
language
translated, i18n will not work. I do not see pt-PT, I only see pt and pt-BR.
Perhaps you can try one of those - or translate django in pt-PT. If you have
done everything else correctly, it should work.
--
regards
Kenneth Gonsalves
Senior Project Officer
NRC-FOSS
http://nrcfosshelpline.in/web/

-- You received this message because you are subscribed to the Google Groups
"Django users" group

--

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




Re: Django tag cloud

2009-11-21 Thread Carlos Ricardo Santos
I used this approach, was explained on "Learning website development with
Django book", give a look there:
*
*
*
*
*style.css *file:
*
*
.tag-cloud-0 { font-size: 100%; }
.tag-cloud-1 { font-size: 120%; }
.tag-cloud-2 { font-size: 140%; }
.tag-cloud-3 { font-size: 160%; }
.tag-cloud-4 { font-size: 180%; }
.tag-cloud-5 { font-size: 200%; }

And generated the tag number dynamically counting the objects that has that
tag.




2009/11/21 Alessandro Ronchi 

> I have a model with with a variable number of objects.
>
> I want to make a tag cloud with font-size to be a proportion of
> objects.count() (wich goes from 1 to 150 ).
>
> Obviously I can't use that number in font-size (150pt is too big) and
> I have to make a proportion (150 -> 20pt, 1 -> 5pt, 50 ~>10pt and so
> on).
>
> How can I accomplish that?
>
> --
> Alessandro Ronchi
>
> SOASI
> Sviluppo Software e Sistemi Open Source
> http://www.soasi.com
> http://www.linkedin.com/in/ronchialessandro
>
> --
>
> 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=.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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




Re: Django Flatpage Internationalization BUG

2009-12-07 Thread Carlos Ricardo Santos
Check in the admin panel if you have linked it to a site, then check
settings.Py if the site_id matches the id of the site you associated in the
admin.

On Dec 7, 2009 12:08 PM, "Cyberbiagio"  wrote:

Hi,

i'm a new django developer, i need help for a strange bug:

I have a web sit in 2 languages: en, es
In this website the Internationalization system (i18n) works fine in
exception for the only flatpage that i have.
In fact when the user is on that web page (named "about-us") if he
change language with the language-flag, the page does not update
itself.
So i need (i think) to redirect the page by urls.py to flatpage.view
manually but i receive a strange url in my browser address bar:
"http://about-us//"; instead of http://www.mysite.com/en-about-us/

Here the code:

Base.html (button link):



Urls.py:

url(r'^(?P[a-zA-Z0-9-_]+)/
$','PROJECTNAME.APPNAME.views.translated_url',
{},name='flatpage_translate'),

Views.py:

from django.utils import translation
from django.contrib.flatpages.views import flatpage

def translated_url(request,slug):
   curr_lang = translation.get_language()
   return flatpage(request,'/%s-%s'%(curr_lang,slug))


I hope anyone can help me.

Thank You very much!

--

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.

--

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 Flatpage Internationalization BUG

2009-12-07 Thread Carlos Ricardo Santos
So just put your http://localhost:PORT if you're in development, or the real
link if you are in production

:D


2009/12/7 Cyberbiagio 

> Thanks for your suggestion but in site there is mysite.com and the
> sites_id is correctly linked to flat page id
>
> :(
>
> On 7 Dic, 14:42, Carlos Ricardo Santos 
> wrote:
> > Check in the admin panel if you have linked it to a site, then check
> > settings.Py if the site_id matches the id of the site you associated in
> the
> > admin.
> >
> > On Dec 7, 2009 12:08 PM, "Cyberbiagio"  wrote:
> >
> > Hi,
> >
> > i'm a new django developer, i need help for a strange bug:
> >
> > I have a web sit in 2 languages: en, es
> > In this website the Internationalization system (i18n) works fine in
> > exception for the only flatpage that i have.
> > In fact when the user is on that web page (named "about-us") if he
> > change language with the language-flag, the page does not update
> > itself.
> > So i need (i think) to redirect the page by urls.py to flatpage.view
> > manually but i receive a strange url in my browser address bar:
> > "http://about-us//"; instead ofhttp://www.mysite.com/en-about-us/
> >
> > Here the code:
> >
> > Base.html (button link):
> >
> > 
> >
> > Urls.py:
> >
> > url(r'^(?P[a-zA-Z0-9-_]+)/
> > $','PROJECTNAME.APPNAME.views.translated_url',
> > {},name='flatpage_translate'),
> >
> > Views.py:
> >
> > from django.utils import translation
> > from django.contrib.flatpages.views import flatpage
> >
> > def translated_url(request,slug):
> >curr_lang = translation.get_language()
> >return flatpage(request,'/%s-%s'%(curr_lang,slug))
> >
> > I hope anyone can help me.
> >
> > Thank You very much!
> >
> > --
> >
> > 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 athttp://
> 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-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.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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 HTTPS and HTTP Sessions

2009-12-10 Thread Carlos Ricardo Santos
Is is possible to change the uploaded filename like:

request.FILES['file']['filename']=current.user.username+'_'+str(
current.user.id)

It says 'InMemoryUploadedFile' object does not support item assignment.

Anyway to override this?

Thanks.

--

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.




django.contrib.comments Templates

2009-12-12 Thread Carlos Ricardo Santos
Hi:

I fully implemented the django.contrib.comments on my django app and
comments are saved, showed, etc.
Just one thing that annoys me... The write comment page and the confirmation
page are not extending my base.html template.
I found this post
http://www.djangrrl.com/view/taking-ugly-out-django-comments/ but when I try
to comment, no "preview comment" page appears.

Anyone has ever tried to change comments templates?


Carlos Ricardo Santos

--

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: about django model save

2009-12-25 Thread Carlos Ricardo Santos
You may want to try django-evolution.
It "clones" the rake migrations of Rails :D
Not so good... but if fits.

2009/12/25 Victor Lima 

> Try deleting the table and then syncdb again...
>
> Att,
> Victor Lima
>
> Em 25/12/2009, às 00:02, chen gang  escreveu:
>
> > Hi,
> > I am really new to this tool... and need you help about this issue,
> > thanks in advance!
> >
> > I create models.py like this,
> >
> > ...
> > class Sms_detailed(models.Model):
> >group = models.CharField(max_length=15)
> >phone_num = models.CharField(max_length=15)
> >IMEI  = models.CharField(max_length=15)
> >sw_ver= models.CharField(max_length=20)
> >project   = models.CharField(max_length=10)
> >sw_checksum = models.CharField(max_length=10)
> >recv_date_time = models.DateTimeField()
> >raw_data = models.CharField(max_length=30)  # raw reset data
> > ...
> >
> > Then create the db
> > [gac...@pipi autosms]$ python manage.py sql asms
> > BEGIN;
> > 
> > CREATE TABLE "asms_sms_detailed" (
> >"id" integer NOT NULL PRIMARY KEY,
> >"group" varchar(15) NOT NULL,
> >"phone_num" varchar(15) NOT NULL,
> >"IMEI" varchar(15) NOT NULL,
> >"sw_ver" varchar(20) NOT NULL,
> >"project" varchar(10) NOT NULL,
> >"sw_checksum" varchar(10) NOT NULL,
> >"recv_date_time" datetime NOT NULL,
> >"raw_data" varchar(30) NOT NULL
> > )
> > ;
> > ...
> > COMMIT;
> >
> > but when I am trying to save a object,
> > sms_detailed = Sms_detailed(group='test',phone_num =
> > '123456'
> > ,IMEI=
> > '1234'
> > ,sw_ver=
> > '3.03'
> > ,sw_checksum=
> > '1234',project='rh-125',recv_date_time=datetime.datetime.now
> > (),raw_data='s1234')
> >>>> sms_detailed.save()
> > Traceback (most recent call last):
> >  File "", line 1, in 
> >  File "/usr/lib/python2.6/site-packages/django/db/models/base.py",
> > line
> > 410, in save
> >self.save_base(force_insert=force_insert,
> > force_update=force_update)
> >  File "/usr/lib/python2.6/site-packages/django/db/models/base.py",
> > line
> > 495, in save_base
> >result = manager._insert(values, return_id=update_pk)
> >  File "/usr/lib/python2.6/site-packages/django/db/models/manager.py",
> > line 177, in _insert
> >return insert_query(self.model, values, **kwargs)
> >  File "/usr/lib/python2.6/site-packages/django/db/models/query.py",
> > line 1087, in insert_query
> >return query.execute_sql(return_id)
> >  File
> > "/usr/lib/python2.6/site-packages/django/db/models/sql/subqueries.py",
> > line 320, in execute_sql
> >cursor = super(InsertQuery, self).execute_sql(None)
> >  File "/usr/lib/python2.6/site-packages/django/db/models/sql/
> > query.py",
> > line 2369, in execute_sql
> >cursor.execute(sql, params)
> >  File "/usr/lib/python2.6/site-packages/django/db/backends/util.py",
> > line 19, in execute
> >return self.cursor.execute(sql, params)
> >  File
> > "/usr/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py",
> > line 193, in execute
> >return Database.Cursor.execute(self, query, params)
> > OperationalError: table asms_sms_detailed has no column named
> > phone_num
> >
> >
> > Br, Chen Gang
> >
> > --
> >
> > 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
> > .
> >
> >
>
> --
>
> 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.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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: about django model save

2009-12-26 Thread Carlos Ricardo Santos
Thanks for remind me about South.
This really looks amazing!
No more "rm db && manage.py syncdb"
:D

2009/12/25 Shawn Milochik 

> Django-south is the best solution right now. Django-evolution is no longer
> developed, as the author thinks South is the current best solution.
>
> http://south.aeracode.org/
>
> Shawn
>
> --
>
> 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.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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: Twitter API

2009-12-27 Thread Carlos Ricardo Santos
You have python-twitter and pyscrobble.


2009/12/27 Mario 

> Good afternoon,
>
> Is there a Twitter API that would allow me to update a Twitt via
> Django?  If so would you be kind enough to send me the link?
>
> _Mario
>
> --
>
> 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.
>
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

--

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: Twitter API

2009-12-27 Thread Carlos Ricardo Santos
Sorry.. scrobble is Last.fm, LOL
:D

2009/12/27 Carlos Ricardo Santos 

> You have python-twitter and pyscrobble.
>
>
> 2009/12/27 Mario 
>
> Good afternoon,
>>
>> Is there a Twitter API that would allow me to update a Twitt via
>> Django?  If so would you be kind enough to send me the link?
>>
>> _Mario
>>
>> --
>>
>> 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.
>>
>>
>>
>
>
> --
> Cumprimentos,
> Carlos Ricardo Santos
>



-- 
Cumprimentos,
Carlos Ricardo Santos

--

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: where is my os.path

2010-08-02 Thread Carlos Ricardo Santos
So "import os"

On 2 August 2010 05:57, yalda.nasirian  wrote:

> hi
> when i type import sys or os i have error that unknown os
>
> --
> 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.
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

-- 
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: Many to many ajax widget for admin

2010-08-02 Thread Carlos Ricardo Santos
Already tried to find a better approach without success, raw_id is now the
best option.

On 2 August 2010 10:54, Sævar Öfjörð  wrote:

> If someone is interested,
> I just used raw_id_fields in my intermediary inline modeladmin.
>
> class AuthorshipInline(admin.TabularInline):
>raw_id_fields = ('author',)
>
> This isn't exactly what I was going for, but it takes the really big
> select fields out of the picture.
>
> - Sævar
>
> On Jul 27, 5:24 am, ringemup  wrote:
> > You might want to check out grappelli and its Related Lookups feature:
> >
> > http://code.google.com/p/django-grappelli/
> >
> > On Jul 26, 4:30 pm, Sævar Öfjörð  wrote:
> >
> >
> >
> > > Hi
> >
> > > I have some models (Song and Author) that are related through an
> > > intermediary model (Authorship) like this:
> >
> > > class Song(models.Model)
> > > authors = models.ManyToManyField('Author', through='Authorship')
> >
> > > class Author(models.Model)
> > > name = models.CharField(max_length=255)
> >
> > > class Authorship(models.Model):
> > > AUTHORSHIP_TYPES = (
> > > ('lyrics', 'Lyrics'),
> > > ('melody', 'Melody'),
> > > ('cover', 'Cover'),
> > > )
> > > author = models.ForeignKey(Author)
> > > song = models.ForeignKey(Song)
> > > authorship_type = models.CharField(choices=AUTHORSHIP_TYPES)
> >
> > > I have inline editing set up in the admin for Song, so that
> > > authorships can be created/edited/deleted from the Song instance.
> > > But now the Authors have grown to about 2500 objects, which means that
> > > each select box contains 2500 options. This is too slow and I'm
> > > looking for an alternative.
> >
> > > I have come across Django Ajax Selects:
> http://code.google.com/p/django-ajax-selects/
> > > And Django Ajax Filtered Fields:
> http://code.google.com/p/django-ajax-filtered-fields/
> > > (actually I'm not sure if this can be used in the django admin)
> >
> > > But I haven't seen anything in their documentation about support for
> > > intermediary models like my Authorship model.
> >
> > > Has anyone had this problem and found a solution for it?
> >
> > > - Sævar
>
> --
> 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.
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

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



Django 1.0 admin - no "select all" checkbox

2010-02-27 Thread Carlos Ricardo Santos
Anyone noticed that django 1.0 admin has no "select all" checkbox in every
model object view?\
Do i have to clear objects in shell if I need to clean them all?

-- 
Carlos Ricardo Santos

-- 
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: relative links to css, images, javascript -> problem

2010-03-08 Thread Carlos Ricardo Santos
I Just add a "site_media" path to urls.py

*site_media = os.path.join( os.path.dirname(__file__), 'site_media' )*
*(r'^site_media/(?P.*)$', 'django.views.static.serve', {
'document_root': site_media }),*

Add to settings.py:

*MEDIA_URL = '/site_media/'*

and then:

**
*
*
*
*

On 8 March 2010 12:05, Martin N.  wrote:

> I encountered problems when I try to adopt HTML page layouts into
> django templates.
>
> These HTML files often reference their CSS files like
> 
> or
> 
> because they expect these files (and images, javascript, ...) in a
> location relative to the current HTML document.
>
> Can I use such HTML and CSS in django without searching them for each
> and every link to static content and change it to something like
> http://myserver.com/media/css/base.css";>?
> The relative links in the above example don't work for me in django
> templates. Absolute links are a nuisance when the templates are used
> on different hostnames and when CSS files must be included from a
> number of subdirectories.
>
> What is the easiest solution?
>
> Thanks
> Martin
>
> --
> 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.
>
>


-- 
Cumprimentos,
Carlos Ricardo Santos

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



E-commerce framework for downloadable content

2013-02-08 Thread Carlos Edo Méndez
Hi!

I'm looking for a django framework for e-commerce.
I've been searching and i found LFS, Satchless, Plata... but I don't know 
which is the most suitable for my needs.
My project is similar to iPhone's Appstore. The content to sell is 
downloadable and it is uploaded by third party developers or designers. I 
also need it to be fast and easy to pay, maybe storing credit card 
information or a similar solution.
Do you know which framework would be best for this?

Thanks in advance,
Carlos

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: E-commerce framework for downloadable content

2013-02-12 Thread Carlos Edo Méndez
Thank you both for your help.

I found Django-Oscar, what do you think of it? Would it be good for a start?

-- 
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 http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




[database-api] Using .select_related() with a multi-table query (bug?)

2007-04-18 Thread Luiz Carlos Geron

Hi,
I have three models, listed at [1], that I want to get data from with
only one query, because of performance issues with my app. The way
that worked so far is:

league_ids = [12, 21]
bets = 
models.Bet.objects.filter(game__league__id__in=league_ids).order_by('bet__game__league.id',
'game_part', 'bet__game.venuedate')

The problem with this is that for each bet I iterate, the database
will be hit one or more times because I need to use
bet.game.league.name and so on. So I tried adding .select_related() to
the query and now it returns no results, while without
select_related() I get 172 results. Looking at the sql generated by
the query with and without select_related() I noticed that with it,
the sql was very strange, when the orm could have just added fields
from the other tables to the select list. Please look at the original
generated sql at [2] and the one with select_related() at [3]. This
looks like a bug to me, at least on the documentation, if I am not
supposed to use select_related() with queries like this.

BTW, is there are any better way to do what I want (get columns from
the three models in only one query) with the django orm? I tried to
use .values() in the query but it turns out that I cannot specify
columns from other tables in it. For now I'll be using the sqlalchemy
model I already have for this database, but I'd really appreciate to
do everything with the django parts, since they seem to fit very good
together and this is the first really bad problem I found while
developing with django.


[1] http://dpaste.com/8743/
[2] http://dpaste.com/8581/
[3] http://dpaste.com/8582/

-- 
[]'s,
Luiz Carlos Geron

--~--~-~--~~~---~--~~
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-api] Using .select_related() with a multi-table query (bug?)

2007-04-21 Thread Luiz Carlos Geron

Any ideas on how I can do this with one query?

On 4/18/07, Luiz Carlos Geron <[EMAIL PROTECTED]> wrote:
> Hi,
> I have three models, listed at [1], that I want to get data from with
> only one query, because of performance issues with my app. The way
> that worked so far is:
>
> league_ids = [12, 21]
> bets = 
> models.Bet.objects.filter(game__league__id__in=league_ids).order_by('bet__game__league.id',
> 'game_part', 'bet__game.venuedate')
>
> The problem with this is that for each bet I iterate, the database
> will be hit one or more times because I need to use
> bet.game.league.name and so on. So I tried adding .select_related() to
> the query and now it returns no results, while without
> select_related() I get 172 results. Looking at the sql generated by
> the query with and without select_related() I noticed that with it,
> the sql was very strange, when the orm could have just added fields
> from the other tables to the select list. Please look at the original
> generated sql at [2] and the one with select_related() at [3]. This
> looks like a bug to me, at least on the documentation, if I am not
> supposed to use select_related() with queries like this.
>
> BTW, is there are any better way to do what I want (get columns from
> the three models in only one query) with the django orm? I tried to
> use .values() in the query but it turns out that I cannot specify
> columns from other tables in it. For now I'll be using the sqlalchemy
> model I already have for this database, but I'd really appreciate to
> do everything with the django parts, since they seem to fit very good
> together and this is the first really bad problem I found while
> developing with django.
>
>
> [1] http://dpaste.com/8743/
> [2] http://dpaste.com/8581/
> [3] http://dpaste.com/8582/
>
> --
> []'s,
> Luiz Carlos Geron
>


-- 
[]'s,
Luiz Carlos Geron

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



Help with DetailView

2018-08-15 Thread Carlos Wilfrido Montecinos
Hello all! I'm new in Django and have some problems understanding how I 
made this DetaiView work. 

I started changing my FBV to GCBV. This one, that the only thing it does is 
group articles by a tag:

def tag(request, tag_name):
> tag = get_object_or_404(Tag, tag_name=tag_name)
> articles = tag.article_set.all().order_by('-created_at')
> context = {
> 'tag': tag,
> 'articles': articles,
> }
> return render(request, 'default/index.html', context)
>

 I somehow made it work like this:

class TagDetailView(DetailView):
> model = Tag
> template_name = 'default/index.html'
> slug_field = 'tag_name' # get the tag name for the url
>
> def get_context_data(self, **kwargs):
> tag_ = self.kwargs.get('slug') # get the tag_name (slug)
> context = super().get_context_data(**kwargs)
> context['tag'] = get_object_or_404(Tag, tag_name=tag_)
> context['articles'] = context['tag'] \
> .article_set.all().order_by('-created_at')
> return context
>

This made sense to me, but I continued playing with it and still worked 
after I removed tag_ and context['tag']

class TagDetailView(DetailView):
> model = Tag
> template_name = 'default/index.html'
> slug_field = 'tag_name' # get the tag name for the url
>
> def get_context_data(self, **kwargs):
> context = super().get_context_data(**kwargs)
> context['articles'] = context['tag'] \
> .article_set.all().order_by('-created_at')
> return context
>

How can both, {{ tag }} and {{ articles }} be rendering in the template? I 
really want to understand that before I continue. I have read the 
documentation, some articles and don get it. Thank you. 

-- 
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/56c418c1-bd80-4bd7-b20c-9de257a9f1c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django 1.11 and PostgreSQL 10 compatibility

2017-10-19 Thread Carlos Augusto Machado
Hi,
You can use 9.4, 9.5 and 10.

Em qui, 19 de out de 2017 07:27, Edandweb 
escreveu:

> Hi,
>
> I am developing a new application in Python and Django, for the database
> we want to use the last version of PostgreSQL v10.
> The django Documentation says in
> https://docs.djangoproject.com/en/1.11/ref/databases/#postgresql-notes:
>
>
>
>
> *Django supports PostgreSQL 9.3 and higher. psycopg2
>  2.5.4 or higher is required, though the latest
> release is recommended.*
> I am not sure to understand, it's just 9.3 and higher like 9.3.1 or 9.3.2
> or 9.3.4 ... or can we use 9.4 and 9.5 ... ?
>
> Thanks
>
> --
> 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/99f8fa1b-e892-4d72-93e6-afac2f54736b%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAK2MEjuBAK2NE%2BTaSTsE2DSce8TZzfFJ%3DqDQ47jeamwaAytvdw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Looking to join a team in a Django Project to gain Experience

2020-11-30 Thread Carlos Romero Martin
I'm interested

Regards

Carlos Romero Martin



Le lundi 30 novembre 2020, 5 h 16 min 24 s CET Nagaraju Singothu a écrit :
> I'm interested
> 
> On Mon 30 Nov, 2020, 8:56 AM ,  wrote:
> > Hi Cesar,
> > 
> > 
> > 
> > If you can send me you email to contact you as I am interested
> > 
> > 
> > 
> > Ahmed Khairy
> > 
> > ahmed.heshamel...@gmail.com
> > 
> > 
> > 
> > *From:* django-users@googlegroups.com  *On
> > Behalf Of *Cesar Alvarez
> > *Sent:* Monday, September 21, 2020 9:25 PM
> > *To:* django-users@googlegroups.com
> > *Subject:* Re: Looking to join a team in a Django Project to gain
> > Experience
> > 
> > 
> > 
> > Hi there,
> > 
> > At the moment I am working in a web application which I am going to offer
> > to a company who I know need it, this web application will be used to
> > improve internal auditors jobs from that company!
> > 
> > It would be a pleasure to involve you in this project and becoming us
> > partners went the client buys the web app...
> > 
> > 
> > 
> > Thank you and regards
> > 
> > César Álvarez Moná
> > 
> > From Colombia
> > 
> > 
> > 
> > El lun., 21 sep. 2020, 7:39 p.m., ahmed.he...@gmail.com <
> > ahmed.heshamel...@gmail.com> escribió:
> > 
> > Hi all,
> > 
> > 
> > 
> > I am looking for a team of developers to join them in a project to enhance
> > my skills and add to my portfolio.  I am available part time.
> > 
> > 
> > 
> > Thanks
> > 
> > --
> > 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 view this discussion on the web visit
> > https://groups.google.com/d/msgid/django-users/6e15411d-b25d-40c8-a987-e65
> > da9b3c297n%40googlegroups.com
> > <https://groups.google.com/d/msgid/django-users/6e15411d-b25d-40c8-a987-e
> > 65da9b3c297n%40googlegroups.com?utm_medium=email&utm_source=footer> .
> > 
> > --
> > You received this message because you are subscribed to a topic in the
> > Google Groups "Django users" group.
> > To unsubscribe from this topic, visit
> > https://groups.google.com/d/topic/django-users/K6Q9JLiQIfk/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to
> > django-users+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/django-users/CABTGc-oxkVweLCY5V5fE198yBK
> > Rj77U1ROKmJRJQF0t00qeHzw%40mail.gmail.com
> > <https://groups.google.com/d/msgid/django-users/CABTGc-oxkVweLCY5V5fE198y
> > BKRj77U1ROKmJRJQF0t00qeHzw%40mail.gmail.com?utm_medium=email&utm_source=fo
> > oter> .
> > 
> > --
> > 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 view this discussion on the web visit
> > https://groups.google.com/d/msgid/django-users/004a01d6c6c8%2463af73d0%242
> > b0e5b70%24%40gmail.com
> > <https://groups.google.com/d/msgid/django-users/004a01d6c6c8%2463af73d0%2
> > 42b0e5b70%24%40gmail.com?utm_medium=email&utm_source=footer> .

-- 





-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5504404.8cx8xeCeO2%40laptopcrm.


Re: Ongoing project

2020-12-19 Thread Carlos Romero Martin
Hello Peter, 
I’m interested to join team. 
Carlos Romero Martin

Le vendredi 18 décembre 2020, 17 h 49 min 30 s CET Sujayeendra G a écrit :
> Hello Peter,
> I’m interested to join team.

-- 







-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/10946928.OTuG6Y1yve%40laptopcrm.


How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.
Hi everybody

I am new and I need to know if the library or how I could generate the 
kilometer points starting from a polyline. 

Thanks for the info  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e8a7444f-5136-4977-986e-e0114fcaab32n%40googlegroups.com.


How can I segment a roads?

2021-01-05 Thread Juan Carlos F.
Hi everyone, 

I'm a new in django and python and i have a problem .I would like to know 
how I can segment a road by kilometer points . 

Any help is welcome. Thank you  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3e6aa653-58d4-4cbd-853b-7ef5e1227221n%40googlegroups.com.


Re: How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.

Exactly, what I need is to calculate the point on the road from the 
kilometer point PK 50 + 350 meters on the road, but not in a straight line 
but following the road  

El martes, 5 de enero de 2021 a las 14:12:56 UTC, Juan Carlos F. escribió:

> Hi everybody
>
> I am new and I need to know if the library or how I could generate the 
> kilometer points starting from a polyline. 
>
> Thanks for the info  
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4098522f-cc63-4f4d-9cd1-613c4166eaedn%40googlegroups.com.


Re: How to generate points kilometers from a road

2021-01-05 Thread Juan Carlos F.

Exactly, what I need is to calculate the point on the road from the 
kilometer point PK 50 + 350 meters on the road, but not in a straight line 
but following the road  

El martes, 5 de enero de 2021 a las 14:12:56 UTC, Juan Carlos F. escribió:

> Hi everybody
>
> I am new and I need to know if the library or how I could generate the 
> kilometer points starting from a polyline. 
>
> Thanks for the info  
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7716ea17-be8b-40e6-bb6f-9e49a5b4a21en%40googlegroups.com.


Re: Freelance Django and Python work

2023-06-30 Thread Carlos Romero Martin
I'm interested

Le jeu. 29 juin 2023 à 23:56, M. Guy Sylvestre 
a écrit :

> Je suis intéressé .
>
>
> Le mar. 13 juin 2023, 11:30, אורי  a écrit :
>
>> Hi,
>>
>> I'm looking for a programmer to hire as a freelancer for Django and
>> Python work.
>>
>> - Experience with Python and Django
>> - Experience with open source
>> - Committed to the Django repository on GitHub - an advantage
>> - Committed to other open-source projects in Python - an advantage
>> - Experience with Stack Overflow -  an advantage
>> - BSc or BA in computers or science (math, physics) -  an advantage
>> - Knowledge of HTML, CSS, and JavaScript - an advantage
>> - Can issue receipts
>>
>> I need about 5 hours per month on average. Some months I might need up to
>> 15 hours per month. Some months I might not need anything. The work is
>> remote. My project is open source. I can give you a free license to
>> PyCharm. My website is at https://en.speedy.net/ and
>> https://github.com/speedy-net/speedy-net
>>
>> To apply please send one email to jobs+jango-freelan...@speedy.net, with
>> your name, your email address, where you live, your experience, how many
>> commits you committed to Django, how many commits you committed to other
>> open source projects, a link to your profile on LinkedIn, a link to your
>> profile on GitHub, a link to your profile on Stack Overflow, your diploma
>> if you have any, how much you charge per hour and in which currency (I
>> prefer USD or Euro), and if you can issue receipts. If you don't have a
>> profile on one of the above websites please mention this too.
>>
>> Thanks,
>> Uri Rodberg, Speedy Net.
>> אורי
>> u...@speedy.net
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CABD5YeHjQyFa75Mgq7nzcJ6AoX-WDeu75OOPfa2OngG2VTMaDQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAEsEyq8uA%2BJEOabMdNV4XA8jsOmgeGo%3DJ4RgRD%3DAf%2B3gNSNyfA%40mail.gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACc4Y%2BdN_Y15Bx-XdCra_u5gJqv3cf%3DRJdnscDucm--_eypdtA%40mail.gmail.com.


Re: Redesign of agricultural project with python django and next.js technologies.

2024-02-18 Thread Carlos Romero Martin
terface.
>>>> · Implement logic to handle search queries and apply filters to search
>>>> results.
>>>>
>>>> Shopping Cart:
>>>>
>>>> · Create pages and components to manage the shopping cart.
>>>> · Design and develop a shopping cart page that displays all products
>>>> added to the cart.
>>>> · Implement components to increase, decrease, or delete the quantity
>>>> of a product in the cart.
>>>> · Develop logic to update the shopping cart page when changes are made
>>>> to the cart.
>>>>
>>>> Payment System:
>>>>
>>>> · Develop the payment flow and notifications.
>>>> · Design and develop a payment flow to guide users through the
>>>> checkout process.
>>>> · Implement logic to display real-time notifications about payment
>>>> status.
>>>>
>>>> Ratings & Reviews:
>>>>
>>>> · Develop interfaces for rating products and vendors.
>>>> · Design and develop forms for users to submit ratings and reviews.
>>>> · Implement the logic to display ratings and reviews of products and
>>>> vendors on their respective pages.
>>>>
>>>> Messaging:
>>>>
>>>> · Implement notifications for new messages.
>>>> · Design and develop a user interface to display notifications of new
>>>> messages.
>>>> · Implement logic to update notifications in real-time when new
>>>> messages are received.
>>>>
>>>> Notification System:
>>>>
>>>> · Create a section in profiles to view and manage notifications.
>>>> · Design and develop a notifications section in the profile page of
>>>> each user.
>>>> · Implement logic to display notifications in real-time and allow
>>>> users to manage (e.g., mark as read, delete, etc.) their notifications.
>>>>
>>>> Order Management:
>>>>
>>>> · Create pages to manage orders from the seller and consumer side.
>>>> · Design and develop an order management page for sellers, where they
>>>> can view and manage their orders.
>>>> · Implement an order tracking page for consumers, where they can see
>>>> the status of their orders.
>>>>
>>>> --
>>>> 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 view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-users/6a7570f0-9dda-4b1f-82a3-7f1ce681b535n%40googlegroups.com
>>>> <https://groups.google.com/d/msgid/django-users/6a7570f0-9dda-4b1f-82a3-7f1ce681b535n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> 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 view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAC8VzwUE9p3pQhryduFJcMN5_imBz9%3Dr9d_9%2BMO5zGGie6B_1w%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CAC8VzwUE9p3pQhryduFJcMN5_imBz9%3Dr9d_9%2BMO5zGGie6B_1w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CABnQiK7L5j1bmmKuredJz46mNZp-bgnWoYs8H-KUGQ6MxQkdvg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CABnQiK7L5j1bmmKuredJz46mNZp-bgnWoYs8H-KUGQ6MxQkdvg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
*Carlos Romero Martin*
IT Consultant, CRMDevAppIT

+32(0)489 091 244 <+32(0)489+091+244> | carlosromeromartin1...@gmail.com
Create your own email signature
<https://www.wisestamp.com/create-own-signature/?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=>
‌

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACc4Y%2BcsyS7cbTP2Yb836JcYcPeU2wmYC%3D0PUUNfWg5tsi6BWA%40mail.gmail.com.


Re: Django And os.path Behavior

2008-12-05 Thread Carlos A. Carnero Delgado
Hello,

> The path in this demo contains "El Camarón de la Isla", where the
> accent character is the trouble maker.

Can you post your music.models?

Best regards,
Carlos.

--~--~-~--~~~---~--~~
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: Where to put jquery/dojo js files

2009-03-08 Thread Carlos A. Carnero Delgado

Hi there,

On Sun, Mar 8, 2009 at 2:32 PM, raj  wrote:
> This causes a js error, stating no dojo is defined. Similar error is
> raised for jquery also. What went wrong with the above code?

Have you looked at
http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs?
Maybe it helps...

Regards,
Carlos.

--~--~-~--~~~---~--~~
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: Accessing django app that is start with FCGI

2009-03-13 Thread Carlos A. Carnero Delgado

> I think I kinda understand the way it works now. I can see that I
> require a mysite.fcgi. How does that file look like? It is not written
> in the docs

You could try 
http://cleverdevil.org/computing/24/python-fastcgi-wsgi-and-lighttpd
although I've had more luck with
http://iamtgc.com/2007/07/04/django-on-lighttpd-with-fastcgi/.

Props to the original authors.

HTH,
Carlos.

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



Select Multiple objects

2009-06-26 Thread Carlos Eduardo Sotelo Pinto

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi people

I am trying to do a multiple select choice form from multiple objects

my models are http://pastebin.com/m28887b6f
my forms are http://pastebin.com/m6e757770
my views are http://pastebin.com/m474b64c0
my html is http://pastebin.com/m45a1591e

my idea is having a forr cfor completing each select box, is for a suuport site

thanks a lot



- --
 . ''`. Carlos Eduardo Sotelo Pinto ( KrLoS )  ,= ,-_-. =.
: :'  : Free and OpenSource Software Developer((_/)o o(\_))
`. `'`  GNULinux Registered User #379182   `-'(. .)`-'
  `-GNULinux Registered Machine #277661\_/
GNULinux Arequipa Users Group||Debian Arequipa Users Group
- --
pgp.rediris.es 0xF8554F6B
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkpE6QkACgkQnj1XYfhVT2vBlgCgrPiZYxNZ7qd2skVyX9J4OsYP
peAAoKapp3US8A9wByprdyTNyaRYqeKc
=OtRh
-END PGP SIGNATURE-

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



too many values to unpack

2009-07-04 Thread Carlos Eduardo Sotelo Pinto

Hi people

I have this form , as my subject says, it is giving me "to many values
to unpack"

class ProductModelForm(forms.ModelForm):
product_model = forms.ModelChoiceField(ProductModel.objects.all(),
 None, u'Modelo')
class Meta:
model = ProductModel
exclude = ['maker', 'product_type']
def __init__(self, maker_filter,  *args, **kwargs):
self.base_fields['product_model'].query =
ProductModel.objects.all().filter('maker_id = ',maker_filter)
self.base_fields['product_model'].widget.choices =
self.base_fields['product_model'].choices
super(ProductModelForm, self).__init__(*args, **kwargs)

my view is
#just for tesnting I am no using product_type_id, no yet

def product(request, maker_id, product_type_id):
if request.method == 'POST':
pmform = ProductModelForm(request.POST)
if mform.is_valid():
maker = topic = mform.cleaned_data['maker']
path = '/support/helping/product/%s' % maker
return HttpResponseRedirect(path)
else:
pmform = ProductModelForm(maker_filter=maker_id,  data=None,
instance=ProductModel)
return render_to_response('helping.html', {'mform': pmform})

please give a hand
-- 
Carlos Eduardo Sotelo Pinto a.k.a. krlos
GNULinux RU #379182 || GNULinux RM #277661
GNULinux Arequipa Users Group || Debian Arequipa Users Group
--
http://krlosaqp.blogspot.com
pgp.rediris.es 0xF8554F6B
GPG FP:697E FAB8 8E83 1D60 BBFB 2264 9E3D 5761 F855 4F6B

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



<    1   2   3   4   5   6   >