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
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 :
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
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
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()
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
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()
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 =
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
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
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
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
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
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
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
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
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
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
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"
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
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
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
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
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,
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
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
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
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
:
>
> 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
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
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
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
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
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
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
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
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
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).
&
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
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
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
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.
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
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
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
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
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
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
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
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
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
: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
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
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
=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
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
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.
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
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
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
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
61 matches
Mail list logo