Re: about QuerySet
do you mean that queryset will query database every time i call user[0]? On 1月30日, 午前9:29, akaariaiwrote: > On Jan 20, 10:12 am, newme wrote: > > > user = User.objects.filter(pk="") > > user is a QuerySet > > > every time i call user[0], i returns a different reference. > > > maybe it should be a python question. > > i want to know i QuerySet does that. > > The reason is that Django does not do "instance caching". That is, you > will get different reference each time from a queryset because that is > how it works. If you need to use the same instance, then you need to > store that somewere yourself. This is all the help I can give based on > your question. > > - Anssi -- 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: online transactions with python
Thanks guys, I use Satchmo by the moment but my I'm interested in some project with protocols differents with some exclusive credit cards (VISA, MasterCard, Dinners Club)... This part of the project is very difficult but I'm thinking to do something more general or more pleasant for customers and sellers, and thanks for the information posted in github. They are very helpful for me I will write more comments during the project See you!! -- Diego Velásquez Ríos Movistar : 959920238 RPM: #991205 -- 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: GIS Distance from Point to Geometry Collection
It should return whatever the units are in the coordinate system you have set. You will probably want to transform the geometry to UTM first. Something that treats the geometry as flat and sets distance to be in meters or similar. srid=3857 or 900913 will do this nicely (caveat emptor). -- Jeff On Tue, Jan 31, 2012 at 9:07 PM, Alex Koppwrote: > Yes Jeff, this is what I want to do. I wasn't sure if there was an easier > way. What units does the distance function return? I tried this and it > seems to return the distance in units of 10km, is this correct? > > Thanks again! > > > On Tue, Jan 31, 2012 at 9:04 PM, Jeff Heard > wrote: > >> Got it. So what you want to do is a list comprehension over the geometry >> object, which *should* give you individual geometries is what it sounds >> like. Then you can calculate distance() from each of these. Something >> like this? >> >> interesting_point = Point(x, y) >> collection = result.geom >> min_dist = min([g.distance(interesting_point) for g in collection]) >> >> or for every geometrycollection in a queryset: >> >> result = MyModel.objects.all() >> min_dist = min([min([g.distance(interesting_point) for g in coll]) for >> coll in result]) >> >> Brute force and thus a bit slow, but it should work if I understand you >> correctly... >> >> -- Jeff >> >> >> On Tue, Jan 31, 2012 at 8:45 PM, Alex Kopp wrote: >> >>> Here's a more concrete example, say I am storing shapes of all >>> countries. Now, the US can't be stored in one polygon (we have hawaii and >>> alaska), therefore I have to store the many polygons in one >>> geometrycollection. >>> >>> Now, say I have another point on the map, I would like to know how ar it >>> is from ANY of the polygons... >>> >>> >>> On Tue, Jan 31, 2012 at 8:41 PM, Alex Kopp wrote: >>> Perhaps I didn't explain it well, Jeff. I am just trying to get the smallest distance from one point to any of the points, lines, or polygons inside of a queryset. The data I am receiving from the queryset is a geometrycollection already... That is how it is being stored in the database. On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heard < jefferson.r.he...@gmail.com> wrote: > You should be able to create a geometrycollection object from a > queryset (you may have to use a list comprehension for this), then > calculate the centroid and take the distance from that. Taking the > distance > from the edge should only be a little more > Complicated. Check the django GEOS API docs For complete details > > > > On Jan 31, 2012, at 6:36 PM, Loafer wrote: > > > I have a model that currently stores a Geographic Point (Using Django > > GIS (GeoDjango)) and another model that has a field to store a > > geometry collection (A collection of polygons, lines, and or points). > > > > I am trying to find the distance from the point to any one of the > > shapes in the geometry collection. Apparently the distance function > > only works on single shapes, not a collection. Are there any > > workarounds to this? > > > > Any help is appreciated. > > > > 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-users@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google > Groups "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To post to this group, send email to django-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users"
Re: Creating a hierarchy of objects in my api.py
Hello, Any luck on this yet? Best Regards, Stanwin Siow On Jan 31, 2012, at 11:39 AM, St@n wrote: > Hello, > > I am playing around with tastypie and i want to create a hierarchy of > data. > > What i currently have is this: > > > class keywordResource(ModelResource): >tweets = fields.ToManyField(timelineResource, 'tweets', full=True) >class Meta: >queryset = Keyword.objects.all() >resource_name = 'keyword' >excludes = ['id', 'keyword_id'] >include_resource_uri = False > >def alter_list_data_to_serialize(self, request, data_dict): >if isinstance(data_dict, dict): >if 'meta' in data_dict: ># Get rid of the "meta". >del(data_dict['meta']) ># Rename the objects. >data_dict['keyword'] = copy.copy(data_dict['objects']) >del(data_dict['objects']) >return data_dict > > > > Can someone explain the relationship to me in creating such a > hierarchy? > > in the line tweets = fields.ToManyField(timelineResource, 'tweets', > full=True) > > it means that timelineResource is a child of Keyword right? and > "tweets" would be the column name in timeline table or just a generic > name? > > or must i map a matching column that appears in both tables (keyword, > timeline)? > > > Thank you > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: GIS Distance from Point to Geometry Collection
Yes Jeff, this is what I want to do. I wasn't sure if there was an easier way. What units does the distance function return? I tried this and it seems to return the distance in units of 10km, is this correct? Thanks again! On Tue, Jan 31, 2012 at 9:04 PM, Jeff Heardwrote: > Got it. So what you want to do is a list comprehension over the geometry > object, which *should* give you individual geometries is what it sounds > like. Then you can calculate distance() from each of these. Something > like this? > > interesting_point = Point(x, y) > collection = result.geom > min_dist = min([g.distance(interesting_point) for g in collection]) > > or for every geometrycollection in a queryset: > > result = MyModel.objects.all() > min_dist = min([min([g.distance(interesting_point) for g in coll]) for > coll in result]) > > Brute force and thus a bit slow, but it should work if I understand you > correctly... > > -- Jeff > > > On Tue, Jan 31, 2012 at 8:45 PM, Alex Kopp wrote: > >> Here's a more concrete example, say I am storing shapes of all >> countries. Now, the US can't be stored in one polygon (we have hawaii and >> alaska), therefore I have to store the many polygons in one >> geometrycollection. >> >> Now, say I have another point on the map, I would like to know how ar it >> is from ANY of the polygons... >> >> >> On Tue, Jan 31, 2012 at 8:41 PM, Alex Kopp wrote: >> >>> Perhaps I didn't explain it well, Jeff. I am just trying to get the >>> smallest distance from one point to any of the points, lines, or polygons >>> inside of a queryset. The data I am receiving from the queryset is a >>> geometrycollection already... That is how it is being stored in the >>> database. >>> >>> On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heard >> > wrote: >>> You should be able to create a geometrycollection object from a queryset (you may have to use a list comprehension for this), then calculate the centroid and take the distance from that. Taking the distance from the edge should only be a little more Complicated. Check the django GEOS API docs For complete details On Jan 31, 2012, at 6:36 PM, Loafer wrote: > I have a model that currently stores a Geographic Point (Using Django > GIS (GeoDjango)) and another model that has a field to store a > geometry collection (A collection of polygons, lines, and or points). > > I am trying to find the distance from the point to any one of the > shapes in the geometry collection. Apparently the distance function > only works on single shapes, not a collection. Are there any > workarounds to this? > > Any help is appreciated. > > 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-users@googlegroups.com. > To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- 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: GIS Distance from Point to Geometry Collection
Got it. So what you want to do is a list comprehension over the geometry object, which *should* give you individual geometries is what it sounds like. Then you can calculate distance() from each of these. Something like this? interesting_point = Point(x, y) collection = result.geom min_dist = min([g.distance(interesting_point) for g in collection]) or for every geometrycollection in a queryset: result = MyModel.objects.all() min_dist = min([min([g.distance(interesting_point) for g in coll]) for coll in result]) Brute force and thus a bit slow, but it should work if I understand you correctly... -- Jeff On Tue, Jan 31, 2012 at 8:45 PM, Alex Koppwrote: > Here's a more concrete example, say I am storing shapes of all > countries. Now, the US can't be stored in one polygon (we have hawaii and > alaska), therefore I have to store the many polygons in one > geometrycollection. > > Now, say I have another point on the map, I would like to know how ar it > is from ANY of the polygons... > > > On Tue, Jan 31, 2012 at 8:41 PM, Alex Kopp wrote: > >> Perhaps I didn't explain it well, Jeff. I am just trying to get the >> smallest distance from one point to any of the points, lines, or polygons >> inside of a queryset. The data I am receiving from the queryset is a >> geometrycollection already... That is how it is being stored in the >> database. >> >> On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heard >> wrote: >> >>> You should be able to create a geometrycollection object from a queryset >>> (you may have to use a list comprehension for this), then calculate the >>> centroid and take the distance from that. Taking the distance from the edge >>> should only be a little more >>> Complicated. Check the django GEOS API docs For complete details >>> >>> >>> >>> On Jan 31, 2012, at 6:36 PM, Loafer wrote: >>> >>> > I have a model that currently stores a Geographic Point (Using Django >>> > GIS (GeoDjango)) and another model that has a field to store a >>> > geometry collection (A collection of polygons, lines, and or points). >>> > >>> > I am trying to find the distance from the point to any one of the >>> > shapes in the geometry collection. Apparently the distance function >>> > only works on single shapes, not a collection. Are there any >>> > workarounds to this? >>> > >>> > Any help is appreciated. >>> > >>> > 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-users@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> > For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> > >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To post to this group, send email to django-users@googlegroups.com. >>> To unsubscribe from this group, send email to >>> django-users+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/django-users?hl=en. >>> >>> >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: GIS Distance from Point to Geometry Collection
Here's a more concrete example, say I am storing shapes of all countries. Now, the US can't be stored in one polygon (we have hawaii and alaska), therefore I have to store the many polygons in one geometrycollection. Now, say I have another point on the map, I would like to know how ar it is from ANY of the polygons... On Tue, Jan 31, 2012 at 8:41 PM, Alex Koppwrote: > Perhaps I didn't explain it well, Jeff. I am just trying to get the > smallest distance from one point to any of the points, lines, or polygons > inside of a queryset. The data I am receiving from the queryset is a > geometrycollection already... That is how it is being stored in the > database. > > On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heard > wrote: > >> You should be able to create a geometrycollection object from a queryset >> (you may have to use a list comprehension for this), then calculate the >> centroid and take the distance from that. Taking the distance from the edge >> should only be a little more >> Complicated. Check the django GEOS API docs For complete details >> >> >> >> On Jan 31, 2012, at 6:36 PM, Loafer wrote: >> >> > I have a model that currently stores a Geographic Point (Using Django >> > GIS (GeoDjango)) and another model that has a field to store a >> > geometry collection (A collection of polygons, lines, and or points). >> > >> > I am trying to find the distance from the point to any one of the >> > shapes in the geometry collection. Apparently the distance function >> > only works on single shapes, not a collection. Are there any >> > workarounds to this? >> > >> > Any help is appreciated. >> > >> > 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-users@googlegroups.com. >> > To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> > For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> > >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To post to this group, send email to django-users@googlegroups.com. >> To unsubscribe from this group, send email to >> django-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-users?hl=en. >> >> > -- 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: GIS Distance from Point to Geometry Collection
Perhaps I didn't explain it well, Jeff. I am just trying to get the smallest distance from one point to any of the points, lines, or polygons inside of a queryset. The data I am receiving from the queryset is a geometrycollection already... That is how it is being stored in the database. On Tue, Jan 31, 2012 at 8:36 PM, Jeff Heardwrote: > You should be able to create a geometrycollection object from a queryset > (you may have to use a list comprehension for this), then calculate the > centroid and take the distance from that. Taking the distance from the edge > should only be a little more > Complicated. Check the django GEOS API docs For complete details > > > > On Jan 31, 2012, at 6:36 PM, Loafer wrote: > > > I have a model that currently stores a Geographic Point (Using Django > > GIS (GeoDjango)) and another model that has a field to store a > > geometry collection (A collection of polygons, lines, and or points). > > > > I am trying to find the distance from the point to any one of the > > shapes in the geometry collection. Apparently the distance function > > only works on single shapes, not a collection. Are there any > > workarounds to this? > > > > Any help is appreciated. > > > > 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-users@googlegroups.com. > > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- 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: GIS Distance from Point to Geometry Collection
You should be able to create a geometrycollection object from a queryset (you may have to use a list comprehension for this), then calculate the centroid and take the distance from that. Taking the distance from the edge should only be a little more Complicated. Check the django GEOS API docs For complete details On Jan 31, 2012, at 6:36 PM, Loaferwrote: > I have a model that currently stores a Geographic Point (Using Django > GIS (GeoDjango)) and another model that has a field to store a > geometry collection (A collection of polygons, lines, and or points). > > I am trying to find the distance from the point to any one of the > shapes in the geometry collection. Apparently the distance function > only works on single shapes, not a collection. Are there any > workarounds to this? > > Any help is appreciated. > > 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-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Using Context Processor as form with HttpResponseRedirect
Hi i have seen alot of people saying to use a context processor to include forms in multiple page. I have written a context processor login form that just returns the django Authentication form and everything works great including the form.errors etc except that I cant seem to redirect from the context processor after is_valid is called. Are context processors not supposed ot be used in this way? My thoughts inititally were that if it seems to support a request and can do the validation why not? Basically stuck on using HttpResponseRedirect in a context processor. I have managed to get this working by passing a variable called redirect in the dictionary returned to my template and then saying if the redirect tag is available use the browsers meta tag to redirect me but i dont think this is the way it should work. code below please advise thanks. context_processors.py from django.contrib.auth.forms import AuthenticationForm from django.http import HttpResponseRedirect def login_form(request): if request.method == 'POST': form = AuthenticationForm(data=request.POST) if form.is_valid(): #return HttpResponseRedirect('/home') ONLY THING THATS NOT WORKING return {'login_form': form, 'redirect': '/home'} else: form = AuthenticationForm(request) return {'login_form': form} template.html {{ form.non_field_errors}} # works fine after post with errors showing {{ form.username}} {{ form.password}} {% if redirect %} {% endif %} -- 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: Testing
Another option, if you're using unittest2 (and if you're using Django's TestCase, you're using unittest2) is assertIn -- self.assertIn(first, [one_value, another_value]) Yours, Russ Magee %-) On 01/02/2012, at 8:42 AM, Furbee wrote: > I think you can do something like: > assertTrue(first == one_value or first == second_value) > > At the same time, when unit testing, you should really know exactly what a > value returned from a method is. > > Furbee > > On Tue, Jan 31, 2012 at 4:32 PM, xino12wrote: > Hello, I'm doing unitTesting and I want to know if it's possible to > accept more than one value in the assetEqual method. > > Maybe this works > > assertEqual(first, one_value or another_value) > > Sorry but I'm new programming with django. > > Lots of thanks, > > Rubén > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- 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: Testing
I think you can do something like: assertTrue(first == one_value or first == second_value) At the same time, when unit testing, you should really know exactly what a value returned from a method is. Furbee On Tue, Jan 31, 2012 at 4:32 PM, xino12wrote: > Hello, I'm doing unitTesting and I want to know if it's possible to > accept more than one value in the assetEqual method. > > Maybe this works > > assertEqual(first, one_value or another_value) > > Sorry but I'm new programming with django. > > Lots of thanks, > > Rubén > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Testing
Hello, I'm doing unitTesting and I want to know if it's possible to accept more than one value in the assetEqual method. Maybe this works assertEqual(first, one_value or another_value) Sorry but I'm new programming with django. Lots of thanks, Rubén -- 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.
GIS Distance from Point to Geometry Collection
I have a model that currently stores a Geographic Point (Using Django GIS (GeoDjango)) and another model that has a field to store a geometry collection (A collection of polygons, lines, and or points). I am trying to find the distance from the point to any one of the shapes in the geometry collection. Apparently the distance function only works on single shapes, not a collection. Are there any workarounds to this? Any help is appreciated. 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-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django Model Errors : TypeError: 'class Meta' got invalid attribute(s): using
Hi all, I am newbie in django and while trying to write a database router for using multiple database I did something like : class Meta: using = 'somedatabasename' in Django models.py. However while doing a syncdb I get an error like this : TypeError: 'class Meta' got invalid attribute(s): using what am I missing here?? any pointers or docs will be of great help. - Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Admin completely empty
On Jan 30, 5:14 pm, darwin_techwrote: > hmmm. I am the superuser, but I went ahead and tried the createuser > command to make another. Still the same in the admin. No models or > user/privilege options. The strange thing is there are boxes where you > would expect apps/models top be, but they are totally empty. > > Any other suggestions? > > Sam > > On Jan 30, 3:40 pm, Andres Reyes wrote: > > > > > > > > > Do you have permissions on the models you want to see? > > > You can create a new superuser with > > python manage.py createsuperuser > > > 2012/1/30 darwin_tech : > > > > Hi, > > > > On my development server my Django Admin works as expected, showing > > > all my > > > models and the auth models. However, on the production server, even > > > though the whole application works fine, when I log into the admin I > > > see nothing. No models, no auth. Just a stack of empty boxes. > > > If anyone has any idea as to why this might be, your input would be > > > much appreciated. > > > > Sam Look at the source of the page. Maybe there is a clue there. I was wondering if you might have white letters on white background for some weird reason? -- 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: Problem with admin
On Tuesday, 31 January 2012 20:04:33 UTC, Kolbe wrote: > > Hi guys, I created a new app and within that app, I also specified a > new admin.py file. Is that how the admin portion for that app is > managed? > > Anyway, after I created my models and syncdb, then run server, I have > been unable to access the admin gui. > > I keep getting this error below, but I don't understand it because I > did not edit the admin template files? Am I handling the admin > wrongly? What is the norm for handling multiple apps in the admin? > > TemplateSyntaxError at /admin/ > Caught IndentationError while rendering: unindent does not match any > outer indentation level (views.py, line 25) > Why do you think this has anything to do with template files? The error is quite specific: you have an indentation error in views.py, at or before line 25. Go and have a look at that file. -- DR. -- 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/-/0caiDsL4sAIJ. 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: Help using index view to render registration form from registration app
Hi Dennis, thanks for the reply. The index / root of my site will contain the registration page for new users to sign up and contain a login page for people who are already registered to log in. so yes i would want this functionality on the default page and not have to redirect to a specific registration url for member to register. On Tue, Jan 31, 2012 at 7:34 PM, Dennis Lee Bieberwrote: > On Tue, 31 Jan 2012 07:43:53 -0800 (PST), richard > wrote: > >>to have my index view contain the registration form from django the >>registration app so when the user visits the index page the >>registration form is rendered there and when they submit the form it >>goes back to the index page if there are any form errors. >> > So ANYTIME anyone visits your root site (since that is what > "index.html" normally represents) they are going to have a registration > page inflicted upon them? What if they registered yesterday, shut down > their computer, and come back next week -- do they have to go through > your registration form again? > > If your intent is that one must either be "logged in" before seeing > this "index page", then I'd think /any/ access that doesn't have a > "logged in" session cookie should redirect to a "log in" page -- and > this log-in page should have a link to a registration page for new users > to fill out (obviously both the "log in" and the registration pages must > NOT require a "logged in" cookie status). > > Whether you return the "log in" page or the "index page" then > becomes a matter of having a valid session cookie in the request. > > CAVEAT: this is my conceptual view; implementation is not in my purview > -- > Wulfraed Dennis Lee Bieber AF6VN > wlfr...@ix.netcom.com HTTP://wlfraed.home.netcom.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 > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Problem with admin
Hi guys, I created a new app and within that app, I also specified a new admin.py file. Is that how the admin portion for that app is managed? Anyway, after I created my models and syncdb, then run server, I have been unable to access the admin gui. I keep getting this error below, but I don't understand it because I did not edit the admin template files? Am I handling the admin wrongly? What is the norm for handling multiple apps in the admin? TemplateSyntaxError at /admin/ Caught IndentationError while rendering: unindent does not match any outer indentation level (views.py, line 25) Request Method: GET Request URL:http://localhost:8000/admin/ Django Version: 1.3 Exception Type: TemplateSyntaxError Exception Value: Caught IndentationError while rendering: unindent does not match any outer indentation level (views.py, line 25) Exception Location: /Library/Frameworks/Python.framework/Versions/2.7/ lib/python2.7/site-packages/django/utils/importlib.py in import_module, line 35 Python Executable: /Library/Frameworks/Python.framework/Versions/2.7/ Resources/Python.app/Contents/MacOS/Python Python Version: 2.7.1 Python Path: ['/Users/max/Documents/Python/djproj3', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/setuptools-0.6c11-py2.7.egg', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages/MySQL_python-1.2.3-py2.7-macosx-10.6-x86_64.egg', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- darwin', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- mac', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat- mac/lib-scriptpackages', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- tk', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- old', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib- dynload', '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site- packages', '/Library/Python/2.7/site-packages'] Server time:Wed, 1 Feb 2012 03:50:29 +0800 Template error In template /Library/Frameworks/Python.framework/Versions/2.7/lib/ python2.7/site-packages/django/contrib/admin/templates/admin/ base.html, error at line 31 Caught IndentationError while rendering: unindent does not match any outer indentation level (views.py, line 25) -- 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: I need help with Python Tools for Visual Studio 2010 and Django
On Tuesday, 31 January 2012 18:38:18 UTC, JJ Zolper wrote: > > Sam, > > Since I'm on Ubuntu know with my Python and Django I'm wondering which > CPython I should download? > > I saw stackless python on the python.org site but I'm not sure if that's > what CPython version I would need. I thought there was a standard CPython? > Any help about my interpreter for Python on Ubuntu would be helpful. > > As for Django I think I'm in good shape since it is now ready to go along > side Ubuntu. And that's how i would move to production, on a Linux machine > for it. I can open a python interpreter from the terminal but I thought I > should have more than that such as IronPython or CPython? > > JJ > > There isn't such a thing as "CPython" that's separate from the Python interpreter already on your VM. That interpreter *is* CPython. You have no need to install anything else. In any case, that's the version that works with the other Python tools on the system, so installing a different one would be complicated and unnecessary. -- DR. -- 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/-/mwcx__cjWMsJ. 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: I need help with Python Tools for Visual Studio 2010 and Django
Sam, Since I'm on Ubuntu know with my Python and Django I'm wondering which CPython I should download? I saw stackless python on the python.org site but I'm not sure if that's what CPython version I would need. I thought there was a standard CPython? Any help about my interpreter for Python on Ubuntu would be helpful. As for Django I think I'm in good shape since it is now ready to go along side Ubuntu. And that's how i would move to production, on a Linux machine for it. I can open a python interpreter from the terminal but I thought I should have more than that such as IronPython or CPython? JJ -- 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/-/x9WHmF2Td2UJ. 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.
Help using index view to render registration form from registration app
Hi if anyone could point me in the right direction it would be greatly appreciated. Basically i have my index view which renders to index.html the main page for a site. I need to know the best practice to have my index view contain the registration form from django the registration app so when the user visits the index page the registration form is rendered there and when they submit the form it goes back to the index page if there are any form errors. Is it better to just make the registration app views render to my index template instead but i wouldnt think this is a clean way. any advice 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-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
django-private-views
Useful little package for y'all, written by Julien Phalip, which I've packaged and pushed to PyPI. django-private-views - https://github.com/dabapps/django-private-views Inverts the usual @login_required logic, and instead makes all your views private by default, and gives you a @login_not_required. (And a few other useful bits and pieces.) Hope it's useful. Let me know if there's any problems. 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/-/aGoC8rU_eaAJ. 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: online transactions with python
https://github.com/agiliq/merchant the braintree backend is good, so is stripe. Depends on your type of transaction and the pricing you get. -- 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/-/bZO5GTdC9C0J. 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: Question regarding ticket #17062
> If you don't want to use a custom version of Django, and can't wait > for 1.4, you should be able to set the time zone for per database > user. Connect to the database with your database user, and do this: > ALTER USER "thedbuser" SET TIME ZONE 'wanted_zone'; -- where > wanted_zone would be UTC for you. > So, for example for me the above would look: > ALTER USER "akaariai" SET TIME ZONE 'Europe/Helsinki'; > > The per-user settings are a really nice feature. Many problems in > PostgreSQL can be neatly solved by usage of the per-user settings. > > You can verity that the change took place by reconnecting (the per > user settings are only changed on connect), and running: > select current_setting('timezone'); > > The effect of this is that the rollback will still reset you timezone, > but as the default is UTC there is nothing to worry :) In fact, once > 1.4 is out, it will no longer run SET TIME ZONE at all, as 1.4 is able > to recognize that the time zone is already correct for the connection! Thank you very much, that's perfect. -- Ashe -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Caching appended character issue
If it was a BOM issue, wouldn't it get prepended? Unfortunately, I don't have any better ideas either. Aaron -- This message was sent from a mobile device On Jan 31, 2012, at 7:56, Ustun Ozgurwrote: > No idea actually, but I would look for BOM related issues. > > Ustun > -- > 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/-/YpAgjT_A98MJ. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: field name hiding workaround
On Tue, Jan 31, 2012 at 07:59:38AM -0800, Jaroslav Dobrek wrote: class Lexeme(models.Model): class Meta: unique_together = ((u"entity", u"language"),) I beleive this will not work because Lexeme is not abstract, and it has no 'entity' field. language = models.ForeignKey(Language) # ... I would like to have different types of lexemes, each of which has another field type as "entity". Like so: class CommodityLexeme(Lexeme): class Meta: verbose_name_plural = "Commodities" entity = models.ForeignKey(Commodity) class CountryLexeme(Lexeme): class Meta: verbose_name_plural = "Countries" entity = models.ForeignKey(Country) I know this doesn't work, because field name hiding is not permitted. (See https://docs.djangoproject.com/en/1.1/topics/db/models/#field-name-hiding-is-not-permitted). You have not hidden any field names (note that the restriction only applies to fields inherited from models.Model, not other attributes, like the Meta class). But what would be the most elegant workaround? I suppose someone has had a similar problem before. I think you can just move the "unique_together" into the Meta classes for your Lexeme subclasses, and it should work as you expect. -- 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: Dynamic runtime modeling: which is the best choice?
Unfortunately I deal with very different shapefiles and I create models on the fly with ogrinspect tool. I cannot know the shapefile structure, before user upload: for this reason a table per shape is IMHO mandatory (as well as a clearer approach). Are you sure you need a new model for every shape your user inserts? Most likely you need to design a generic models in which you would insert new rows for every shape. I mean generic in the sense that it is designed to contain different shapes not any special Django or Python stuff 2012/1/31 Alessandro Candini: Hi list. I need to create an app in which the user can upload a shapefile, which must be stored in a database table with LayerMapping from django.contrib.gis.utils, as explained here: https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#layermapping The problem is that I need to update dynamically my models.py with a new model and add a table for every shape inserted by the user, without using syncdb. Trying to document myself about this topic, I encountered a lot of interesting extensions like south, django-eav and django-mutant for example. (An interesting discussion here: http://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577) But I'm very confused about what could be the best solution for my needs. Has anybody experience with this kind of tools? Thanks in advance. Alessandro -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
field name hiding workaround
Hello, I have got a class Lexeme which I would like to define as follows: class Lexeme(models.Model): class Meta: unique_together = ((u"entity", u"language"),) language = models.ForeignKey(Language) # ... I would like to have different types of lexemes, each of which has another field type as "entity". Like so: class CommodityLexeme(Lexeme): class Meta: verbose_name_plural = "Commodities" entity = models.ForeignKey(Commodity) class CountryLexeme(Lexeme): class Meta: verbose_name_plural = "Countries" entity = models.ForeignKey(Country) I know this doesn't work, because field name hiding is not permitted. (See https://docs.djangoproject.com/en/1.1/topics/db/models/#field-name-hiding-is-not-permitted). But what would be the most elegant workaround? I suppose someone has had a similar problem before. Jaroslav -- 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: Dynamic runtime modeling: which is the best choice?
Are you sure you need a new model for every shape your user inserts? Most likely you need to design a generic models in which you would insert new rows for every shape. I mean generic in the sense that it is designed to contain different shapes not any special Django or Python stuff 2012/1/31 Alessandro Candini: > Hi list. > I need to create an app in which the user can upload a shapefile, which must > be stored in a database table with LayerMapping from > django.contrib.gis.utils, as explained here: > https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#layermapping > > The problem is that I need to update dynamically my models.py with a new > model and add a table for every shape inserted by the user, without using > syncdb. > > Trying to document myself about this topic, I encountered a lot of > interesting extensions like south, django-eav and django-mutant for example. > (An interesting discussion here: > http://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577) > > But I'm very confused about what could be the best solution for my needs. > > Has anybody experience with this kind of tools? > > Thanks in advance. > > Alessandro > > -- > 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. > -- Andrés Reyes Monge armo...@gmail.com +(505)-8873-7217 -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django Caching appended character issue
No idea actually, but I would look for BOM related issues. Ustun -- 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/-/YpAgjT_A98MJ. 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: Displaying template location in html
+1 for debug toolbar. If you choose to do it manually though, you can make use of a middleware instead of passing templates in each view function explicitly, as shown here: http://djangosnippets.org/snippets/766/ Ustun -- 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/-/2UyWy8MPMjQJ. 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: ANN: OGC Web Feature Service for GeoDjango
Wow! Congratulations on this release. I'm looking at it right now. :D On Tue, Jan 31, 2012 at 1:11 PM, Jeff Heardwrote: > https://github.com/JeffHeard/ga_ows > > http://geoanalytics.renci.org/uncategorized/ogc-wfs-for-django-released-on-github/ > > It's not feature complete yet by any means, but it is quite usable. There > is also an implementation of WMS included, but it is currently undocumented > as I clean up that code and make it similar to my more recently implemented > WFS. This package is a reusable app that will allow you to expose any > GeoDjango model as a Web Feature Service. > > Supported formats for output are currently anything that is supported by a > single-file format in OGR. Shapefiles are not yet supported for output but > will be soon. > > Also, you can adapt WFS to any python object (including other ORMs) by > deriving from WFSAdapter. > > -- Jeff > > > -- > 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. > -- George R. C. Silva Desenvolvimento em GIS http://geoprocessamento.net http://blog.geoprocessamento.net -- 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.
Dynamic runtime modeling: which is the best choice?
Hi list. I need to create an app in which the user can upload a shapefile, which must be stored in a database table with LayerMapping from django.contrib.gis.utils, as explained here: https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/#layermapping The problem is that I need to update dynamically my models.py with a new model and add a table for every shape inserted by the user, without using syncdb. Trying to document myself about this topic, I encountered a lot of interesting extensions like south, django-eav and django-mutant for example. (An interesting discussion here: http://stackoverflow.com/questions/7933596/django-dynamic-model-fields/7934577#7934577) But I'm very confused about what could be the best solution for my needs. Has anybody experience with this kind of tools? Thanks in advance. Alessandro -- 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.
ANN: OGC Web Feature Service for GeoDjango
https://github.com/JeffHeard/ga_ows http://geoanalytics.renci.org/uncategorized/ogc-wfs-for-django-released-on-github/ It's not feature complete yet by any means, but it is quite usable. There is also an implementation of WMS included, but it is currently undocumented as I clean up that code and make it similar to my more recently implemented WFS. This package is a reusable app that will allow you to expose any GeoDjango model as a Web Feature Service. Supported formats for output are currently anything that is supported by a single-file format in OGR. Shapefiles are not yet supported for output but will be soon. Also, you can adapt WFS to any python object (including other ORMs) by deriving from WFSAdapter. -- Jeff -- 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: online transactions with python
On Tue, Jan 31, 2012 at 5:43 AM, jj_Diegowrote: > Well... > > I'm form Perú and nowadays I'm working with my friends on a proyect > based on python... > > but our first difficulty its the online transactions using credit > cards (visa, mastercard, diners club) in aweb store > > If anybody knows something or can help me... please send me an email. > Hi, I know about this 3 posible solutions: • django-paypal[1] , which is a pluggable application that implements PayPal Payments Standard and Payments Pro. • django-authorizenet[2] , which implements Django integration with Autho- rize.NET payment gateway. Includes SIM and AIM implementations • Satchmo[3] payment application. Satchmo is an ecommerce framework built on the Django framework, it includes a payment application with support for several different payment modules including Authorize.net, TrustCommerce, CyberSource, PayPal, Google Checkout, Sage Pay (For- merly Protx) and Sermepa. [1] http://github.com/johnboxall/django-paypal [2] http://github.com/zen4ever/django-authorizenet [3] http://www.satchmoproject.com -- Marc -- 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.
online transactions with python
Well... I'm form Perú and nowadays I'm working with my friends on a proyect based on python... but our first difficulty its the online transactions using credit cards (visa, mastercard, diners club) in aweb store If anybody knows something or can help me... please send me an email. 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-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: Displaying template location in html
Thanks donarb, I'll give that toolbar a try. Mario: I though Python has all that fancy metaprogramming stuff like Ruby with Objective C style reflection? On Mon, Jan 30, 2012 at 12:19 PM, donarbwrote: > Use the Django Debug Toolbar, it shows all kinds of things. For > templates, it shows the names of all the templates that make up the > given page as well as which tags are used on the page. > > With DDT, you don't have to annotate (and un-annotate) anything. > > http://pypi.python.org/pypi/django-debug-toolbar > > On Jan 28, 10:26 pm, Alec Taylor wrote: >> With 40+ HTML files it's easy to get confused as to where each >> component comes from. >> >> I don't want to annotate each file with its relative path manually, as >> this will prove cumbersome when the site finally goes production. >> >> Is there a trick to displaying the template location on-screen? >> >> Thanks for all suggestions, >> >> Alec Taylor > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Django and Zinnia blogpost
Hi all I am presently setting up my shop using satchmo. I managed to integrate zinnia for my blogging. I am looking forward to integrate on how to embed youtube video using zinnia blogpost. Has anyone come across this requirement and help me out of this please..? ++ -- 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.