#django

/

      • MikiSoft
        oh
      • so this is only for bugtracking
      • odigem has quit
      • jtiai
        Nope, we just aren't fans of SO, and pastebin.com
      • plfiorini joined the channel
      • MikiSoft
        okay
      • so i need to rewrite question here then
      • but i suppose you got it from the SO url i've pasted
      • slav0nic joined the channel
      • wyoung
        hi MikiSoft! I is here!
      • mehola has quit
      • darkxploit joined the channel
      • MoDaX has quit
      • MikiSoft
        so does somebody know how to make custom m2m manager which returns only objects which are in symmetrical relationships?
      • sp1rs joined the channel
      • jtiai
        MikiSoft: User.objects.filter(relationship__person1__in=self.request.user.friends.all(), relationship__person1=self.request.user) should do the trick.
      • MoDaX joined the channel
      • cyphase has quit
      • jef79m has quit
      • MikiSoft
        thank you, i'll try now
      • juantamad123 has quit
      • timkofu joined the channel
      • kingarmadillo joined the channel
      • zealfire has quit
      • jef79m joined the channel
      • keimlink joined the channel
      • ulhas_ joined the channel
      • xterm has quit
      • mmalone joined the channel
      • cleder joined the channel
      • ulhas has quit
      • ximvan joined the channel
      • phinxy joined the channel
      • zanderle joined the channel
      • juantamad123 joined the channel
      • m4j joined the channel
      • adrian_lc joined the channel
      • xterm joined the channel
      • cyphase joined the channel
      • Ramunas joined the channel
      • c7h joined the channel
      • pembo13 has quit
      • jtiai: User.objects.filter(friends__person1__in=user.friends.all(), friends__person1=user)
      • ValueError: Cannot query "mikisoft": Must be "Relationship" instance.
      • sp1rs has quit
      • jtiai
        MikiSoft: Again, see the topic
      • zanderle
        MikiSoft, share your code and *full* traceback using dpaste.de
      • chl_ joined the channel
      • ytsejam
        can I ask you a simple deployment question ? where is the root of the project while deploying a django project? I mean while adding a google code html, where do add it if i use virtualenv ?
      • MikiSoft
      • here it is
      • sp1rs joined the channel
      • the_drow joined the channel
      • zanderle
        ytsejam, I don't understand your question? How are google code html (and what is that), deployment and virtualenv related?
      • Can you rephrase?
      • the_rat joined the channel
      • the_drow has quit
      • the_drow joined the channel
      • sonbasket has left the channel
      • jtiai
        MikiSoft: Now, what's the "a" is? A string?
      • MikiSoft: Also your models would be helpful.
      • MikiSoft
      • ycon_ has quit
      • now i'll paste models
      • ytsejam
        zanderle , I need to add HTML verification code from code , I am using virtualenv environment , here is my directory structure https://dpaste.de/mgch ... where do I public html file
      • sp1rs has quit
      • jladage joined the channel
      • zanderle, sorry html verification code from google
      • kezabelle
        a file, or a meta tag?
      • zanderle
        You mean the tracking code?
      • MikiSoft
      • ytsejam
        yes, tracking code .html file
      • kezabelle
        zanderle: I suspect ytsejam means whatever mechanism webmaster tools uses to verify a domain, these days
      • Gentle has quit
      • ChrisHC has quit
      • jladage has quit
      • ytsejam: have your HTTPd serve it from anywhere, *OR* map the request to a view in your root URLConf
      • zanderle
        kezabelle, ah I see. Completely confused :D
      • jtiai
        MikiSoft: And now the important question, what you want to filter?
      • kezabelle
        pour example, if you were using apache: "Alias /filename.html /path/to/filename.html"
      • MikiSoft
        i want to filter to return only users which are in symmetrical relationship
      • the_rat has quit
      • koniiiik
        Heh, kezabelle seems to have some mad crystal ball skillz. (-:
      • Gentle joined the channel
      • ChrisHC joined the channel
      • deadhound
        so I have my JSON requests working with django templates - but the json objects I'm getting back have escape characters in them such as {\"status\":"success\"}
      • what am I doing wrong here?
      • haaj joined the channel
      • ytsejam
        kezabelle, you are right , I dont know , I have a web address which is empty , but I have a malware warning from google , google guide tells me add a html and message us
      • ycon_ joined the channel
      • chl_
        hello everyone, I run django behind an nginx proxy. My POST requests are being appended with the refering URL and the target URL with a comma or "%2C" - has anyone had this problem before?
      • sp1rs joined the channel
      • tsukasa__ joined the channel
      • MikiSoft
        that's why i'm tried this command: User.objects.filter(friends__person1__in=user.friends.all(), friends__person1=user)
      • *i've
      • koniiiik
        chl_: Can you provide an example?
      • chl_
        sure, let me get a pastebin up
      • ytsejam
        kezabelle, zanderle I found the solution adding an url similar to this "
      • (r'^googlea14532fb912s486\.html$', lambda r: HttpResponse("google-site-verification: googlea14532fb912s486.html", mimetype="text/plain")), " is it enough?
      • peterrus has quit
      • kezabelle
        yeah that'll do
      • zanderle
        that should work
      • RileyII joined the channel
      • palinf has quit
      • mmalone has quit
      • MikiSoft
        so does anyone know solution to this?
      • uestra joined the channel
      • jtiai
        MikiSoft: Well first you should do some renaming to make your relation ships consistent.
      • petaflot joined the channel
      • PoliticsII has quit
      • zamro has quit
      • MikiSoft
        how do yo mean?
      • palinf joined the channel
      • peterrus joined the channel
      • tsukasa__ has quit
      • ycon_ has quit
      • jtiai
        MikiSoft: like "to_person = models.ForeignKey(..., related_name = 'to_people')" and same for "from_person". Makes it consistent than arbitrary person1 or person2.
      • duoi has quit
      • MikiSoft
        oh okay, i'll do
      • what to do then?
      • about returning users from symmetrical relationships
      • sonbasket joined the channel
      • that's the main concern now
      • sp1rs has quit
      • blackfry has quit
      • duoi joined the channel
      • iraycd joined the channel
      • JohnnySparkles joined the channel
      • chl_
      • blackfry joined the channel
      • jtiai
        MikiSoft: Then you should be able to do: User.objects.filter(friends__through__to_person=current_user, friends__through__from_person__in=current_user.friends.all())
      • darenthis joined the channel
      • darenthis has quit
      • benbacardi joined the channel
      • darenthis joined the channel
      • koniiiik
        chl_: Meh, pastebin...
      • chl_
        what would you prefer? :)
      • koniiiik
        chl_: /topic? d-:
      • holler has quit
      • nouser has quit
      • chl_: I don't mind *that* much with ad blockers, but still...
      • chl_
        my bad
      • holler joined the channel
      • MikiSoft
        thans jtiai, i'll try
      • *thanks
      • domino14 joined the channel
      • koniiiik
        chl_: Anyway, what do you get as the raw HTTP response?
      • sonbasket has left the channel
      • MikiSoft
        i've renamed fields, just to build sql base again and i'll test