Django Logical Deletes on Models

2015-08-04 Thread psychok7
So i decided to fork pinax-models because i need the capability of soft deleting objects and their related (setting a flag but not really deleting them). This is a project that seems to be unmaintained , so i diged into the code and i am trying to make some improvements. It basically

django-tastypie REST update or delete resource with username

2013-05-16 Thread psychok7
Hi there i am using django tastypie and i can update (PUT) a resource if i provide an id like this : http://mysite.com:8000/api/v1/user/1/ But my question is, can i do an update without the id (pk) but with a username instead? And if yes, how can i do that? It would be something like this :

Re: creating resource with django-tastypie

2013-04-08 Thread psychok7
GOT IT WORKING. It was a problem with the default tastypie read only authorization On Monday, April 8, 2013 12:00:35 PM UTC+1, psychok7 wrote: > > it was a quoting problem.. but now i get another error: > > HTTP/1.0 401 UNAUTHORIZED > > curl --dump-header - -H "Content-Typ

Re: creating resource with django-tastypie

2013-04-08 Thread psychok7
3 Access-Control-Allow-Origin: * Access-Control-Allow-Methods: POST,GET,OPTIONS,PUT,DELETE Content-Type: text/html; charset=utf-8 Access-Control-Allow-Headers: Content-Type,* Access-Control-Allow-Credentials: true On Monday, April 8, 2013 11:41:11 AM UTC+1, psychok7 wrote: > > guys i am having

creating resource with django-tastypie

2013-04-08 Thread psychok7
guys i am having problems creating a new resource with django tastypie. i get the following error: class RatingResource(ModelResource): city = fields.ForeignKey(CityResource, 'city') user_id = fields.ForeignKey(UserResource, 'user') class Meta: queryset = Rating.objects.all()

Re: Call Class based view from another class based view

2013-02-19 Thread psychok7
Thats it, it now works. thanks a bunch On Tuesday, February 19, 2013 12:26:35 PM UTC, JirkaV wrote: > > You have > > ShowAppsView.as_view()(self.request) > > at the end of the code you pasted below. That means that you get result of > the ShowAppsView which gets immediatelly discarded

Re: Call Class based view from another class based view

2013-02-19 Thread psychok7
What do you mean not returnig?? i have a return statement. how should i do it? > if u.username == username: > > > cities_list=City.objects.filter(user_id__exact=self.current_user_id(request)).order_by('-kms') > > > > allcategories = Category.objects.all() > > allcities = City.objects.all()

Call Class based view from another class based view

2013-02-19 Thread psychok7
hi, i am trying to call a class based view and i am able to do it, but for some reason i am not getting the context of the new class class ShowAppsView(LoginRequiredMixin, CurrentUserIdMixin, TemplateView): template_name = "accounts/thing.html" def compute_context(self, request, username): u =

Re: sort cache

2013-01-08 Thread psychok7
the trick thanks for your time On Tuesday, January 8, 2013 12:45:07 PM UTC, psychok7 wrote: > > Hi guys, just wondering if its possible to sort a django cache? I need to > add data with an auto increment id to the cache and sort it in reverse > order to get it back. I no this c

sort cache

2013-01-08 Thread psychok7
Hi guys, just wondering if its possible to sort a django cache? I need to add data with an auto increment id to the cache and sort it in reverse order to get it back. I no this can be easily accomplished with the normal mysql database but since the cache is faster i would like to do it there

Re: Django Celery FIFO ORDER

2012-12-17 Thread psychok7
ok i see your point.. Well i am going to use my redis db already used by celerey to do the sorting then. hope its fast enough. Thanks for your time to help me out ;) On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API

Re: Django Celery FIFO ORDER

2012-12-15 Thread psychok7
solution. For know i can work with your idea, but wouldn't want it to be long term. If you have any more ideas please share. On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json messages). > One written in Django and

Re: Django Celery FIFO ORDER

2012-12-14 Thread psychok7
with the retry option given by celery so i that's were i need some help figuring that out. On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json messages). > One written in Django and the other in Php. I have an exact

Re: Django Celery FIFO ORDER

2012-12-11 Thread psychok7
I got the named queues working with 1 worker, but i am not able to make it FIFO.. Its only fifo for the tasks that were rescheduled, but my latest task runs and i only want that to happen after the other ones get executed.. any more ideas? On Monday, December 10, 2012 4:20:52 PM UTC, psychok7

Re: Django Celery FIFO ORDER

2012-12-11 Thread psychok7
thanks guys you pointed me in the write path now ill try to figure it out by myself. cheers On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json messages). > One written in Django and the other in Php. I have

Re: Django Celery FIFO ORDER

2012-12-11 Thread psychok7
me know. On Monday, December 10, 2012 4:20:52 PM UTC, psychok7 wrote: > > So I have this 2 applications connected with a REST API (json messages). > One written in Django and the other in Php. I have an exact database > replica on both sides (using mysql). > > When i pre

Django Celery FIFO ORDER

2012-12-10 Thread psychok7
So I have this 2 applications connected with a REST API (json messages). One written in Django and the other in Php. I have an exact database replica on both sides (using mysql). When i press "submit" on one of them, i want that data to be saved on the current app database, and start a cron

Re: django synchronize database over REST

2012-12-06 Thread psychok7
Thanks for the answer.. but what I. Could have synchronous replication? What do you advise over a rest interface? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

django synchronize database over REST

2012-12-05 Thread psychok7
So I have this 2 applications connected with a REST API (json messages). One written in Django and the other in Php. I have an exact database replica on both sides (using mysql). My question is, how can i keep this 2 applications databases synchronized? In other words, when i press "submit"

Re: django ajax Post returns empty message

2012-10-24 Thread psychok7
got it, the problem was that i had to change this request.GET.get('type','') to thisrequest.POST.get('type','') On Wednesday, October 24, 2012 9:56:15 PM UTC+1, psychok7 wrote: > > using django 1.4, I can Post but the Post response comes (undefined) empty > but GET works fine. i

Re: django ajax Post returns empty message

2012-10-24 Thread psychok7
it seems like its not posting propely, irequest.GET.get('type','') but it prints empty string and the Post response comes (undefined) empty but GET works fine. On Wednesday, October 24, 2012 9:56:15 PM UTC+1, psychok7 wrote: > > using django 1.4, I can Post but the Post response

django ajax Post returns empty message

2012-10-24 Thread psychok7
using django 1.4, I can Post but the Post response comes (undefined) empty but GET works fine. i am using the csrf checks not sure if the problem also comes from there my django view: @csrf_protect def edit_city(request,username): conditions = dict() #if request.is_ajax(): if

django_multiuploader Uncaught TypeError: Object [object Object] has no method 'fileupload'

2012-10-13 Thread psychok7
i am using django_multiuploader in my app, and even thou i can upload the image, the fancy jquery eye candy is not happening (js,css), and after it finishes uploading it doesn't show me my image, only some json text info about the image. What am i doing wrong? i am getting this error when i

Re: django socialauth username not showing correctly

2012-10-09 Thread psychok7
the fb > username. > check it. > > On Tuesday, October 9, 2012 5:19:00 PM UTC+2, psychok7 wrote: >> >> hey thanks for the reply. Can you point out some examples here i can get >> do all that in the right way? >> >> On Tuesday, October 9, 2012 3:15:13 PM UTC+1,

Re: django socialauth username not showing correctly

2012-10-09 Thread psychok7
hey thanks for the reply. Can you point out some examples here i can get do all that in the right way? On Tuesday, October 9, 2012 3:15:13 PM UTC+1, Daniel Molina Wegener wrote: > > On 09/10/12 10:52, psychok7 wrote: > > So i am using django socialauth and its working

django socialauth username not showing correctly

2012-10-09 Thread psychok7
So i am using django socialauth and its working fine, except for the part where my usernames do not match my Facebook or twitter accounts after i log in. In other words for example if i my username is 'john', after i log in in my app it shows 'john820579c6960e4677'. What am i doing wrong? how

Sending post request from Django to Couchdb remote server

2012-08-28 Thread psychok7
So, i have a fully operational django project with postgresql to manage its contents. Nevertheless i decided to create a second database using couchdb to keep just one part of that data. Should i use *urllib2* and send post requests to my couchdb to save the new data or this is just bad

help with Can't pickle : attribute lookup __builtin__.instancemethod failed

2012-07-13 Thread psychok7
i there, i am getting a Can't pickle : attribute lookup __builtin__.instancemethod failed *Traceback:* *File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response* * 188. response = middleware_method(request, response)* *File

Re: dashboard for user profile

2012-07-13 Thread psychok7
: > > This should be really easy. Google something like "extending user profile" > with user being a foreign key to your model. The you can grab the use from > the request in you view and get the info from db and just spit it out on > the screen. > > M > On Jul 13

dashboard for user profile

2012-07-12 Thread psychok7
i there, i am trying to write a dashboard page to present after user login. i have been searching google and only found *django-admin-tools . won*dering if there is something like that for a user profile page (tried django-profiles with no luck) thanks -- You received this message because

Re: help with rss feed ImproperlyConfigured

2012-07-07 Thread psychok7
anyone?? On Saturday, July 7, 2012 3:52:52 AM UTC+1, psychok7 wrote: > > hi, i am trying to implement the syndicate feed framework simple rss with > my program, but i get a ImproperlyConfigured at /latest/feed/ > > Give your Debt class a get_absolute_url() method, or defi

Re: help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
urday, July 7, 2012 3:52:52 AM UTC+1, psychok7 wrote: > > hi, i am trying to implement the syndicate feed framework simple rss with > my program, but i get a ImproperlyConfigured at /latest/feed/ > > Give your Debt class a get_absolute_url() method, or define an item_link() > met

help with rss feed ImproperlyConfigured

2012-07-06 Thread psychok7
hi, i am trying to implement the syndicate feed framework simple rss with my program, but i get a ImproperlyConfigured at /latest/feed/ Give your Debt class a get_absolute_url() method, or define an item_link() method in your Feed class. I know i am supposed to create a get_absolute_url in my

Re: django-registration simple backend help

2012-05-28 Thread psychok7
cribi�: > > El 28/05/12 21:28, psychok7 escribi�: > > yes i read that part before posting, but i just dont understand the > beahaviour of the normal login that redirects me somewhere and the login > after registration that redirects me elsewhere. wich one should i use? > > On M

Re: django-registration simple backend help

2012-05-28 Thread psychok7
El 28/05/12 20:18, psychok7 escribió: > > anyone? > > On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: >> >> hi there i am writing an app using django-registration 0.8 installed from >> pip and using the simple-backend >> >> my problem is

Re: django-registration simple backend help

2012-05-28 Thread psychok7
anyone? On Monday, May 28, 2012 1:54:20 AM UTC+1, psychok7 wrote: > > hi there i am writing an app using django-registration 0.8 installed from > pip and using the simple-backend > > my problem is, when i register a new user it logs me in after inserting in > the db and redi

django-registration simple backend help

2012-05-27 Thread psychok7
hi there i am writing an app using django-registration 0.8 installed from pip and using the simple-backend my problem is, when i register a new user it logs me in after inserting in the db and redirects me to /users// but if i login normally using the django.contrib.auth it redirects me to

Re: help with foreignkeys

2012-05-14 Thread psychok7
ocs.djangoproject.com/en/dev/topics/db/queries/#related-objects > > _Nik > > On May 13, 2012, at 7:03 PM, psychok7 wrote: > > i think you are right :) , i can always get the parks associated comments > if i query comments model (im used to only doing it the other way around). &

Re: help with foreignkeys

2012-05-13 Thread psychok7
unday, May 13, 2012 7:53:58 PM UTC-6, psychok7 wrote: >> >> yes, like a park doesn't have to have comments, but all the comments must >> have an associated park and user all the time. >> >> what is the django syntax for me to achieve this? >> >> On Monday, M

Re: help with foreignkeys

2012-05-13 Thread psychok7
l have to be unique=True and > null=False. > > I want to get a better sense of what you are trying to achieve. Is it that > you want to link comment and park only some of the time? > > JD > > On Sunday, May 13, 2012 7:41:39 PM UTC-6, psychok7 wrote: >> >> so i have this

help with foreignkeys

2012-05-13 Thread psychok7
so i have this 2 models (Comment and Park) Comment has a foreign key to USER and PARK PARK has a foreign key to Comment my question is, isn't there going to be a deadlock if i don't have a comment or a park created? i mean , in order to create a Park i need to have a comment, and in order to

Re: help with "Key 'timeout' not found in "

2012-05-04 Thread psychok7
by the way kurtis, i had a bug in the park_id and didn't even notice that cause it was working lol, u solve it for me :P On Friday, May 4, 2012 9:00:43 AM UTC+1, Kurtis wrote: > > ahh, okay. Let’s try another approach to see if you can nail down that > error. I’m not sure why it’s not working.

Re: help with "Key 'timeout' not found in "

2012-05-04 Thread psychok7
thanks guys it worked. i did a POST from and it worked ;) cheers On Friday, May 4, 2012 8:58:58 AM UTC+1, Jani Tiainen wrote: > > > 4.5.2012 1:22, psychok7 kirjoitti: > > hi i have done a succefull query and i converted the results into links > > so i can make a post by

Re: help with "Key 'timeout' not found in "

2012-05-03 Thread psychok7
timeout field is just an INTEGER.. just saying the amount of time the space will be reserved. class Reservation(models.Model):user = models.ForeignKey(User)park = models.ForeignKey(Park)notification = models.ForeignKey(Notification) timeout = models.IntegerField()active

help with "Key 'timeout' not found in "

2012-05-03 Thread psychok7
hi i have done a succefull query and i converted the results into links so i can make a post by clicking on the links to make a reservation. my problem is, theres a variable timeout that i want to specify manually, but i get a "Key 'timeout' not found in " i know i am supposed to pass that

Re: Server push ajax

2012-04-24 Thread psychok7
forget it thats an alpha version just noticed now. ill give it a go with the servers.. they replace djangos default server ?? or its an addon? On Tuesday, April 24, 2012 4:33:12 PM UTC+1, psychok7 wrote: > > i read and tried to implement all of them with no luck then > (mostly dep

Re: Server push ajax

2012-04-24 Thread psychok7
two Django packages - download and install them, try them > out, see which one fits your needs best. If you have a specific > problem with one of them and need some assistance, I'm sure people on > this list (or StackOverflow) will be happy to help. > > On Apr 24, 2:46 pm, psy

Re: Server push ajax

2012-04-24 Thread psychok7
UTC+1, psychok7 wrote: > > hi, i have to implement a S > erver push with django for a school project. my friend said that its very > hard to make it work, that the software around is still buggy and all. > > it that true? can you guide me to a easy way to implement this t

Re: Server push ajax

2012-04-24 Thread psychok7
i have searched for ajax before and found very "divergente" comments (most of them being related to updates and stuff) so thats why i am asking here, i suposed you guys know better and can guide me towards the right way PS: django-pubsub could work for wht i need, but i didnt see any ajax or

Re: Server push ajax

2012-04-24 Thread psychok7
what about websockets?? are they better and easier to implement than ajax or not? On Tuesday, April 24, 2012 12:14:17 PM UTC+1, psychok7 wrote: > > hi, i have to implement a Server push with django for a school project. > my friend said that its very hard to make it work, that the

Server push ajax

2012-04-24 Thread psychok7
hi, i have to implement a Server push with django for a school project. my friend said that its very hard to make it work, that the software around is still buggy and all. it that true? can you guide me to a easy way to implement this that works without any problems or workarounds? i am

Re: request.is_ajax() not working

2012-04-23 Thread psychok7
:16 PM UTC+1, Masklinn wrote: > > > On 2012-04-23, at 13:48 , psychok7 wrote: > > > yes i did that now, and still doesnt work.. it still returns false and > > doesnt print the line after request.is_ajax() > > > > I can't reproduce the issue with a trivial repro

Re: request.is_ajax() not working

2012-04-23 Thread psychok7
yes i did that now, and still doesnt work.. it still returns false and doesnt print the line after request.is_ajax() On Monday, April 23, 2012 4:36:06 AM UTC+1, Amao wrote: > > dear psychok7: > You have no data from your ajax post, you should post some data with > your aja

request.is_ajax() not working

2012-04-22 Thread psychok7
hi there i am trying a simple example using AJAX, DJANGO, JQUERY, JSON and my if request.is_ajax() is not working for some reason.. here is my code: URLS: (r'api/newdoc/$', 'rose_miracle.views.newdoc'), VIEW: def newdoc(request): # only process POST request print "entrei" if

Re: user registration help please

2012-04-21 Thread psychok7
=instance) post_save.connect(create_user_profile, sender=User) On Saturday, April 21, 2012 10:51:18 PM UTC+1, Ejah wrote: > > No problem. You would need to upgrade to 0.8 to make this work. > Enjoy! > > On Apr 21, 11:46 pm, psychok7 <nun...@gmail.com> wrote: > > yes 0

Re: image KeyError

2012-04-21 Thread psychok7
ok i was copy pasting from example on the internet.. where do i check if it exists or not? On Saturday, April 21, 2012 11:14:12 PM UTC+1, akaariai wrote: > > On Apr 21, 11:30 pm, psychok7 <nun...@gmail.com> wrote: > > hi there , so i am not sure if i am doing this the righ

Re: user registration help please

2012-04-21 Thread psychok7
form in which you add your profile fields, that > you pass to the registration view via de url, and get the form fields > from the request that also gets sent to the > create_superduper_user_function. Please note I did not run this sample > code, so some bugs certainly will be there.

Re: user registration help please

2012-04-21 Thread psychok7
up now? > > > On Saturday, April 21, 2012 9:38:51 AM UTC-5, psychok7 wrote: > >> its seemed to work, thanks >> from django.contrib import admin >> >> from registration.models import RegistrationProfile , UserProfile >> >> >> class Registration

Re: user registration help please

2012-04-21 Thread psychok7
ook something like this: > > > > from poll.models import Poll > > from django.contrib import admin > > > > admin.site.register(Poll) > > > > > > > > On Saturday, April 21, 2012 12:28:05 AM UTC-5, psychok7 wrote: > > > h

Re: user registration help please

2012-04-21 Thread psychok7
g like this: > > from poll.models import Poll > from django.contrib import admin > > admin.site.register(Poll) > > > On Saturday, April 21, 2012 12:28:05 AM UTC-5, psychok7 wrote: > >> hi there, i am quite new to django and i am having a little trouble >> ex

user registration help please

2012-04-21 Thread psychok7
hi there, i am quite new to django and i am having a little trouble extending my User with Userprofile. i have read lots of documentation about it and i have implemented as an extension of https://bitbucket.org/ubernostrum/django-registration a version but i am not sure it works the way its