NoReverseMatch error raise when adding a new entry in django admin

2018-02-11 Thread Weifeng Pan
I got this wired issue. who can help. Python 3.6 Django Latest 2.0.2 following are stack trace--- Internal Server Error: /admin/nmm_tokenservice/userprofile/add/ Traceback (most recent call last): File "C:\Python36\lib\site-packages\django\core\handlers\exception.py",

Re: loading script deployment

2018-02-11 Thread Leif
Thank you, Jani, I will try. Best, Leif On Saturday, February 10, 2018 at 10:14:29 AM UTC-5, Leif wrote: > > Dear Django, > > Sorry if this question has been answered. I have a Django based web > application and I just developed a loading script to upload data to > database using django model.

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-11 Thread Andrew Godwin
Hi, This is a known issue with the Redis backend - https://github.com/django/channels/issues/859 I am looking at it today. Andrew On Sun, Feb 11, 2018 at 8:54 AM, Azamat Galimzhanov wrote: > After fixing this issue, here is the updated consumer: > > > from functools

Not raising exception when using form_class in generic CreateView

2018-02-11 Thread Tony
Hi, I am using a package called Django Embed Video for my project. It comes with a EmbedVideoField for the model and validation for the URL which checks whether the URL is Youtube or Vimeo. It raises exceptions when using generic create view

Re: Reference field in parent model from the child in a one-to-many relationships during clean

2018-02-11 Thread Daniel Roseman
On Sunday, 11 February 2018 13:41:25 UTC, David Williamson wrote: > > Hi, > > I have two fields in a model as follows: > > society_rowid = models.ForeignKey ( > 'Organisation', on_delete=models.PROTECT, related_name='society', > blank=True, null=True, db_column='society_rowid',

Re: How to fetch data from sql server and display on django web pages

2018-02-11 Thread carlos
maybe try with this app http://django-mssql.readthedocs.io/en/latest/settings.html On Sun, Feb 11, 2018 at 3:58 AM, PASCUAL Eric wrote: > Hi Amit, > > > There is no "Django Web page" as you write in your message, but Web pages > of the application built on top of the

Re: Testing Channels 2.0 consumers - problem with routing

2018-02-11 Thread Azamat Galimzhanov
After fixing this issue, here is the updated consumer: from functools import lru_cache from asgiref.sync import AsyncToSync from channels.generic.websocket import WebsocketConsumer class AuctionConsumer(WebsocketConsumer): @property @lru_cache(maxsize=None) def group_name(self):

Re: Integration between Two apps , Using Django Model

2018-02-11 Thread Etienne Robillard
Hi Dawar, You might want to check if you have __init__.py in your Taste and Taste.TasteApp modules. HTH, Etienne Le 2018-02-11 à 06:45, Dawar Sohail a écrit : want to import Django app models into another Django app, But I can import these models into another app models or view, Plese

redirect() doesn't work with a mock object in version 2

2018-02-11 Thread S.j. Sakib
Hello, When I try to call the django.shortcuts.redirect function with a Mock() object from unittest.mock, it results in error. I've found that, the problem happens in iri_to_uri function in django.utils.encoding. It used to use force_bytes in earlier versions of django. Any idea how to use a

Reference field in parent model from the child in a one-to-many relationships during clean

2018-02-11 Thread 'David Williamson' via Django users
Hi, I have two fields in a model as follows: society_rowid = models.ForeignKey ( 'Organisation', on_delete=models.PROTECT, related_name='society', blank=True, null=True, db_column='society_rowid', limit_choices_to={'type': 'whatson_society'},

Integration between Two apps , Using Django Model

2018-02-11 Thread Dawar Sohail
want to import Django app models into another Django app, But I can import these models into another app models or view, Plese help me,

Re: Admin Master-Detail: Dynamically filter selections in detail

2018-02-11 Thread Melvyn Sopacua
On zondag 11 februari 2018 11:36:01 CET Stephan Jaschke wrote: > If I change any of the Master-Fields I would like the select-boxes in > the inlines to reflect that change and to show only Fields which are > bound to that specific csv resp. index-schema. > > It seems that this should be doable

Re: loading script deployment

2018-02-11 Thread Jani Tiainen
Hi. Since you have so much data to pass and it's in CSV format I would suggest that instead of pushing data row by row over network upload that data in CSV format to your API. Then parse file using forms and save to database. 10.2.2018 22.47 "Leif" kirjoitti: Hi Dylan,

Admin Master-Detail: Dynamically filter selections in detail

2018-02-11 Thread Stephan Jaschke
Hi all. I'm trying to implement a customizable import-module for csv-data into elasticsearch-indices. The use may select a csv-schema with given fields and create a mapping to arbitary indices. This mapping schould be done on field level. So I ended up with following simplified models: class

Re: How to fetch data from sql server and display on django web pages

2018-02-11 Thread PASCUAL Eric
Hi Amit, There is no "Django Web page" as you write in your message, but Web pages of the application built on top of the Django framework. Hence how to display data depends on how the Web pages of *your* application are designed. Second point, one of the roles of Django is to isolate the