#django

/

      • bwreilly joined the channel
      • jvasallo joined the channel
      • Jikan joined the channel
      • datakid
        ok, next q: What about ModelA has a var = OneToOneField(ModelB) - but I want the editing of ModelB to happen on ModelA's get_absolute_url()/update_modelB (for instance) - is that into model forms territory?
      • SpoutBE has quit
      • that sentence is appalling
      • apols
      • and I meant "modelformsets"
      • djapo
        datakid: inlineformset_factory
      • mstrcnvs joined the channel
      • datakid
        djapo: I thought so, tx
      • al1o has quit
      • bkuberek joined the channel
      • actually, that's not quite what I want,
      • I wanted there to be only one form - no editing of ModelA, only ModelB
      • but I want that form to be within the ModelA namespace
      • aarose joined the channel
      • and with the ModelA data on the page
      • djapo
        easy, render the form so those fields you don't want to show up as input fields, just show up as data
      • datakid
        "adding an invoice to a job" - we can see the job's data, the form to add/update the invoice is in the job's namespace, but we are only adding invoice data.
      • al1o joined the channel
      • FunkyBob
        sl
      • datakid
        djapo: ah, of course
      • djapo
        or just create a view that only edits that data, custom queryset
      • unbracketed has quit
      • datakid
        FunkyBob: ?
      • robvdl has quit
      • EyePulp joined the channel
      • al1o has quit
      • aarose has quit
      • vovanbo joined the channel
      • naro joined the channel
      • robmorrissey has quit
      • vovanbo has quit
      • gazprom has quit
      • EyePulp has quit
      • gazprom joined the channel
      • HowardwLo
        is there a way to randomize a queryset but also let me query it again? I’m trying ot do a random pagination
      • but i want to retain that random query per page
      • if that makes sense..
      • djapo
        HowardwLo: yes, store the results of your random query in the database :P ... :|
      • robmorrissey joined the channel
      • mattmcc
        Put the PKs in the session.
      • FunkyBob
        gak
      • if I switch from auth.user to a custom user model... do I have to migrate admin too? just got an error because it's still trying to use auth.user
      • cleme1mp joined the channel
      • mattmcc
        If the logentry table existed before you switched, yeah.
      • Switching AUTH_USER_MODEL is probably never going to be a pretty process.
      • HowardwLo
        djapo: :|....
      • djapo
        FunkyBob: i think you have to unregister user and re-register it
      • Frosh has quit
      • FunkyBob
        got a DB exception
      • I think I know why...
      • robmorrissey has quit
      • unfortunately, looks like I might have tgo drop django_auth_log on each site
      • freakboy3742: your input?
      • freakboy3742
        FunkyBob: Hang 5 - in the middle of something
      • cleme1mp has quit
      • LordVan joined the channel
      • jtiai joined the channel
      • benregn joined the channel
      • permutationcity joined the channel
      • warrenjin joined the channel
      • sayan joined the channel
      • Sharebear joined the channel
      • warrenjin has quit
      • djapo
        i don't know if my memory servs me right, but i remember that through the urls function one could pass in a dictionary to the view i can not however find anything about it in https://docs.djangoproject.com/en/1.7/ref/urls/...
      • FunkyBob
        you can pass additional kwargs to the view
      • url(pattern, view, kwargs, name=)
      • url(regex, view, kwargs=None, name=None, prefix='')¶
      • right there in the link you pasted
      • djapo
        oh, i always thought that the parameter was extra_context
      • FunkyBob
        that would be silly... given it would assume all views used a template
      • snurfery joined the channel
      • benregn has quit
      • w00tner has quit
      • aarose joined the channel
      • Debnet`Work joined the channel
      • Debnet`Work has quit
      • mstrcnvs has quit
      • Debnet`Work joined the channel
      • datakid has left the channel
      • aarose has quit
      • gyx1000 joined the channel
      • Sweetman joined the channel
      • doubleo2 has quit
      • naro has quit
      • muskan joined the channel
      • muskan
        I am making a django project and I am facing error :Views does not exist at admin..how sgould solve this problem?
      • FunkyBob
        muskan: erm...but what's the real error it's showing/
      • ?
      • amb1s1 has quit
      • bkuberek has quit
      • amb1s1 joined the channel
      • aagaard joined the channel
      • muskan
        Actually I made views and wrote urls for it ! After that when I am running server , and opening admin pafe.. error :views does not not exist is coming.
      • sudobangbang has quit
      • *page
      • cellofellow joined the channel
      • FunkyBob
        muskan: what is the _Exact_ error message? dpaste the error page so we can see it
      • muskan
        ViewDoesNotExist at /
      • Could not import librehatti.catalog.views.total.add_categories. Parent module librehatti.catalog.views.total does not exist.
      • Request Method: GET
      • Django Version: 1.7b4
      • Exception Type: ViewDoesNotExist
      • Exception Value:
      • Could not import librehatti.catalog.views.total.add_categories. Parent module librehatti.catalog.views.total does not exist.
      • Exception Location: /home/muskan/virtualenvironment/experimental/local/lib/python2.7/site-packages/django/core/urlresolvers.py in get_callable, line 104
      • Python Executable: /home/muskan/virtualenvironment/experimental/bin/python
      • FunkyBob
        DON'T PASTE IN HERE!!!!!!
      • muskan
        Python Version: 2.7.5
      • FunkyBob
        USE DPASTE!
      • muskan
        Python Path:
      • ['/home/muskan/virtualenvironment/experimental/LibreHatti/src',
      • '/home/muskan/virtualenvironment/experimental/lib/python2.7',
      • FunkyBob
        STOP IT !
      • muskan
        '/home/muskan/virtualenvironment/experimental/lib/python2.7/plat-x86_64-linux-gnu',
      • '/home/muskan/virtualenvironment/experimental/lib/python2.7/lib-tk',
      • '/home/muskan/virtualenvironment/experimental/lib/python2.7/lib-old',
      • '/home/muskan/virtualenvironment/experimental/lib/python2.7/lib-dynload',
      • '/usr/lib/python2.7',
      • '/usr/lib/python2.7/plat-x86_64-linux-gnu',
      • '/usr/lib/python2.7/lib-tk',
      • '/home/muskan/virtualenvironment/experimental/local/lib/python2.7/site-packages',
      • '/home/muskan/virtualenvironment/experimental/lib/python2.7/site-packages']
      • Server time: Tue, 1 Jul 2014 01:13:16 -0500
      • Error during template rendering
      • In template /home/muskan/virtualenvironment/experimental/LibreHatti/src/templates/base.html, error at line 59
      • Could not import librehatti.catalog.views.total.add_categories. Parent module librehatti.catalog.views.total does not exist.
      • 49 <nav class="navbar navbar-default" role="navigation">
      • 50 <div class="container-fluid">
      • 51 <!-- Brand and toggle get grouped for better mobile display -->
      • 52 <div class="navbar-header">
      • 53 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
      • 54 <span class="sr-only">Toggle navigation</span>
      • FunkyBob
        apollo13: can you kick muskan ?
      • muskan
        55 <span
      • FunkyBob:I am so sorry.what is dpaste?
      • FunkyBob
        muskan: READ THE CHANNEL TOPIC!
      • muskan
        FunkyBob:ok so sorry.This will not happen next time.
      • fleetfox
        you made him angry
      • FunkyBob
        06:13 < muskan> Could not import librehatti.catalog.views.total.add_categories. Parent module librehatti.catalog.views.total does not exist.
      • see this? the actual error message....
      • it's quite clear
      • muskan: from a python shell can you import librehatti.catalog.views.total ?
      • muskan
        FunkyBob: I am new to django.Yes , I can.
      • zkanda has quit
      • naro joined the channel
      • gyx1000 has quit