Re: Django MySql weirdness

2016-07-25 Thread Constantine Covtushenko
Hi Steve, Can you please provide code snippet here for 'action_time' field? Regards, On Mon, Jul 25, 2016 at 9:11 PM, Steve Bischoff wrote: > > > http://stackoverflow.com/questions/38534734/django-42000-invalid-default-value-for-action-time > > I have been trying to

Re: How do I do a multiple select in the Admin filters ?

2016-07-25 Thread Constantine Covtushenko
Hi Hurlu, I can suggest two approaches here. 1. change your model so that it contains two fields: 'allowed' and 'disallowed'. Every of which is an array of allowed and disallowed items respectively. You can use JSON Field for that. This approach has benefit that your models looks

Re: How to add logo to django header

2016-07-28 Thread Constantine Covtushenko
Hi Gauri, One of approach is would be to override admin base template used as a parent for all admin pages. Please see that documentation link about how to do that. Regards, On Thu, Jul 28, 2016 at 9:04 AM,

Re: Any way to force Django to commit a write so another process can read the correct data from DB?

2016-07-28 Thread Constantine Covtushenko
Hi Mike, It is not a bug. It is just how it works. Regards On Thu, Jul 28, 2016 at 3:53 AM, Mike Dewhirst <mi...@dewhirst.com.au> wrote: > On 28/07/2016 5:46 AM, Constantine Covtushenko wrote: > >> Hi Stodge, >> >> As said in Django current versi

Re: Any way to force Django to commit a write so another process can read the correct data from DB?

2016-07-27 Thread Constantine Covtushenko
Hi Stodge, As said in Django current version of documentation , 'post_delete' signal is sent after record is deleted. This means also that transaction is closed at that moment. And DB should not has deleted instance any more. I have

Re: Query annotation with date difference

2016-07-31 Thread Constantine Covtushenko
Hi Yoann, I am not sure exactly but believes you are on the right way. Try improve your expression with ExpressionWrapper, as said here . Probably the problem is that you use values of different types in your

Re: Search multiple fields in Django Models

2016-08-01 Thread Constantine Covtushenko
Hi Jurgens, Django is the right choice. With Django all are possible. All that you described are possible. If you need more precise answer give us more precise question. Regards, On Mon, Aug 1, 2016 at 4:21 PM, Jurgens de Bruin wrote: > Hi, > > I am new to Django, I have

Re: Crispy forms and its "coercing to unicode need string or buffer nonetype found"

2016-08-11 Thread Constantine Covtushenko
Hi Rompe, >From you have posted I can suggest check your model. Can you post here code of it? Regards, On Thu, Aug 11, 2016 at 1:11 PM, RompePC wrote: > I was working on an admin panel, and when I try to get to the add/update > view of the model, it just throws this

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

2016-08-11 Thread Constantine Covtushenko
Great job done. You welcome! Regards, On Thu, Aug 11, 2016 at 8:46 PM, Evan Roberts wrote: > > Thanks for the help and guidance. I found a solution. I installed these > libs and was able to connect: > Django (1.9.9) > django-pyodbc-azure (1.9.9.0) > pip (8.1.2) >

Re: Parent initialization don't working

2016-08-11 Thread Constantine Covtushenko
Hi Rompe, As for your admin models it seems like they should extend: `admin.ModelAdmin`, see django documentation I am not sure that this is a problem you have encountered. But to move further please do like said in the documentation

Re: AttributeError overriding save_existing_objects in Formset class

2016-08-10 Thread Constantine Covtushenko
com> wrote: > The Django version I'm using is the 1.9.4 > > Il giorno martedì 9 agosto 2016 22:04:57 UTC+2, Constantine Covtushenko ha > scritto: >> >> Hi Vincenzo, >> >> Can you please specify Django version that you are using. >> >> Regards

Re: Accessing session in Django models?

2016-08-03 Thread Constantine Covtushenko
Hi Neto, As said in Documentation of 'limit_choices_to' value for this key should be: `Either a dictionary, a Q object, or a callable returning a dictionary or Q object can be used.` For your

Re: How do templates automatically convert dates to local timezone?

2016-08-03 Thread Constantine Covtushenko
Hi Robert, You have touched a very simple but always confusing questions - storing dates and showing them to users in different places. As I know Django uses that in very straightforward way. It always converts dates to UTC. Flow that converts them back to different users in different time-zones

Re: TemplateSyntaxError when using inbuilt views

2016-08-13 Thread Constantine Covtushenko
Hi Piyush, Welcome to community! Can you please give us your template snipped? Regards, On Sat, Aug 13, 2016 at 6:48 AM, Piyush Rungta wrote: > Hello this is my first time here. > So I am trying to create directory index to serve static files uploaded by > users by

Re: Parent initialization don't working

2016-08-12 Thread Constantine Covtushenko
Sorry, I did not mention your point about xadmin. Sorry again. I've checked its github page. It seems like they do not have documentation in English. So may be your problem should be addressed to them? Did you try that? Else as for me we should go to xadmin code and check there. On Fri, Aug

Re: DoesNotExist on ForeignKey Access

2016-08-12 Thread Constantine Covtushenko
HI guis, I need to mention one point that works well for me. If you check blob existence with: hasattr(widget, 'blob') then django responds False in the case Blob Does Not exist an True otherwise. At the same time DB request is performed but DoesNotExist exception is not raised. On Fri, Aug

Re: ProgrammingError: (2014, "Commands out of sync; you can't run this command now")

2016-08-12 Thread Constantine Covtushenko
Hi Anoop, I've checked that such kind of errors comes from MySQL server. You can check detailed explanation here . Do you have any procedure run on your server? On Fri, Aug 12, 2016 at 11:37 AM, ANOOP M.S

Re: Crispy forms and its "coercing to unicode need string or buffer nonetype found"

2016-08-12 Thread Constantine Covtushenko
Hi, Sounds great. On Fri, Aug 12, 2016 at 11:12 AM, RompePC wrote: > Ok, I just did again a *unicode(..)* call to a method that before worked > without it. Sincerely, I just have no idea why now I need to do it. > > Solved. > > > El jueves, 11 de agosto de 2016,

Re: QuerySet for related models

2016-08-04 Thread Constantine Covtushenko
Please check my notes below: On Thu, Aug 4, 2016 at 10:42 PM, M Hashmi wrote: > My field hits=models.ForeignKey(Hitcount) means that my Product model has > a related model with multiple fields and all the products in Product model > will have one or more hit records. >

Re: QuerySet for related models

2016-08-04 Thread Constantine Covtushenko
Hi M Hashmi, I believe that you are looking a way to use aggregation on related model. You should try the following snitppet: `trending_products = Product.objects.aggregate(hit=Max('hits__hits'))[:6]` (see more info here ) This will

Re: QuerySet for related models

2016-08-04 Thread Constantine Covtushenko
Hi M Hashmi, As I see your model scheme built with meaning that 1 record of HitCount relates to many records of Product. And in your queries you try to select all products that relate to 5 topmost HitCounts. Am I correct? Will be waiting for your response. On Thu, Aug 4, 2016 at 6:41 PM, M

Re: cookiecutter-django installation

2016-08-02 Thread Constantine Covtushenko
wrote: > On 08/01/2016 10:39 PM, Constantine Covtushenko wrote: > Hi Constantine > > I guess I didn't make my self clear. I have not installed > cookiecutter-debian because I haven't figured out how to do that with my > setup. There are no errors because there is no installation.,

Re: Query annotation with date difference

2016-08-02 Thread Constantine Covtushenko
') - timezone.now())/models.F('interval'), models.DateTimeField())) As we can see no dates format problem at all. Django works as expected - perfectly! Hope that helps. Regards, On Tue, Aug 2, 2016 at 8:35 AM, Constantine Covtushenko < constantine.covtushe...@gmail.com> wrote: > Hi,

Re: cookiecutter-django installation

2016-08-01 Thread Constantine Covtushenko
Hi Gary, It is not clear what errors you have gotten. Can you please describe them? I am not using Eclipse any more so can not reproduce you problem by my own. But all should be run without problem On Mon, Aug 1, 2016 at 11:14 PM, Gary Roach wrote: > I am having

Re: Query annotation with date difference

2016-08-01 Thread Constantine Covtushenko
ith Django ORM. I > may apply the dict method and work with the dictionary instead, so that I > can add custom fields more easily. > > Yoann > > > > Le dimanche 31 juillet 2016 09:25:58 UTC+2, Constantine Covtushenko a > écrit : >> >> Hi Yoann, >> >> I am not

Re: AttributeError overriding save_existing_objects in Formset class

2016-08-09 Thread Constantine Covtushenko
Hi Vincenzo, Can you please specify Django version that you are using. Regards, On Tue, Aug 9, 2016 at 6:06 PM, Vincenzo wrote: > Hi there, > I'm using the admin and I have a form admin and an inline admin form. For > this inline admin, I need to ignore modifications

Re: Query annotation with date difference

2016-08-03 Thread Constantine Covtushenko
Sorry, I did not specify. I have been using 'Postgresql' with 'psycopg2 v.2.6.2'. They gave me those results. Also here is a sql query given from log: SELECT "test_app_entity"."id", "test_app_entity"."due_date", "test_app_entity"."interval", (("test_app_entity"."due_date" -

Re: Heroku push failed

2017-02-05 Thread Constantine Covtushenko
Hi Jonathan, Sorry for stupid question but you did not specify that exactly. Did you add that module in requirements.txt or requirements.pip? Can you double check that? On Sun, Feb 5, 2017 at 2:54 PM, Jonathan Cheng wrote: > In Win10 > when i run "git push heroku

Re: Django query not returning all objects

2016-08-19 Thread Constantine Covtushenko
Todor Velichkov a écrit : >> >> Another solution would be to annotate min/max deadline date and order by >> the annotation. Something like: >> >> cases = HeartFlowCase.objects.all().annotate(min_deadline=Min('data_ >> _deadline')).order_by('min_deadline') >>

Re: Djnago User login

2017-03-01 Thread Constantine Covtushenko
+1 for CustomAuth Backend solution. In runtime Django checks all set backends in the order so I would suggest to put your backend at the beginning of backend's list. On Thu, Mar 2, 2017 at 12:05 AM, Shawn Milochik wrote: > It takes a little fiddling, but you can log in a

Re: Custom Template Tag

2016-09-01 Thread Constantine Covtushenko
Hi All, There is no valuable reason to do it in the template. And no matter how to ate using it, cause template should only present view model(s). But if you tell us your intention may be we can suggest a better place for such request? Regards, On Sep 2, 2016 6:03 AM, "Al Johri"

Re: Abridged summary of django-users@googlegroups.com - 35 updates in 12 topics

2016-09-14 Thread Constantine Covtushenko
Hi Juliana, Did check this django doc page? It describes basics of how to work with files. The same stands for images. Also you can check one of the available extensions. I was using django-filer.

Re: Help with django form an ajax, error 500

2016-08-17 Thread Constantine Covtushenko
Hi Andrew, To have a proper `to_python` transformation from `POST` strings please use forms. They do that perfectly and also they can handle any king of user input validations. form = SomeCustomForm(request.POST) form.is_valid(): parsed_dictionary = form.cleaned_data() As for 'Ajax'. It

Re: Help with django form an ajax, error 500

2016-08-17 Thread Constantine Covtushenko
Sorry guys, please skip my previous post. It appeared unfinished. My correct one below. Hi Andrew, To have a proper `to_python` transformation from `POST` strings please use forms. They do that perfectly and also they can handle any king of user input validations. form =

Re: Django query not returning all objects

2016-08-17 Thread Constantine Covtushenko
Hi Koonal, As said in django doc you can use `distinct()` to remove duplicated rows from first query. I believe with this your pagination should works as expected. Regards, On Thu, Aug 18, 2016 at 2:58 AM, Koonal

Re: download file when debug=false

2016-09-30 Thread Constantine Covtushenko
Hi Richard, There are a lot of options of how to change/switch application behaviour. It depends on what you eventually need to get. Mentioned solution: settings.DEBUG = true/false can be one of them Hope it helps. Regards, Constantine C. > On Sep 30, 2016, at 12:06, Richard Auscard

Re: download file when debug=false

2016-10-01 Thread Constantine Covtushenko
Hi Richard, Ah, I missed your point last time. Sorry for that. Can you please print here code sniped with with your app returns excel file? It helps us to suggest something valuable. Regards, > On Sep 30, 2016, at 12:06, Richard Auscard wrote: > > hello, > > i have

Re: Django app crashes with out of memory

2016-10-10 Thread Constantine Covtushenko
Hi Dmitry, Please check that documentation page . As you can see iterator() loads all in the memory and after that returns an iterator. Try to fetch records say by 50 - 100 items. Hope that helps. On Mon, Oct 10, 2016 at

Re: NoReverseMatch Error using Django + Haystack + Elasticsearch

2016-10-15 Thread Constantine Covtushenko
Hi Aline, I did not use Haystack but I am using ElastickSearch. I carefully read you post on StackOverflow and see that search form returns author of the post without `pk` key defined. Did you check what is returned by ElastickSearch? May be your SearchForm returns exactly what Elastick stores

Re: Dynamic choice option for select filed in Multivaluefield

2016-10-15 Thread Constantine Covtushenko
Hi Saranya, Please try in TestForm > self.fields['t'].fields[1].widget.choices = ((1,1),) Hope it helps On Fri, Oct 14, 2016 at 9:31 AM, saranya k wrote: > I want to set choices for ChoiceField in MultiValueField in form init. But > its not getting updated. >

Re: Deploy on Heroku Error

2016-10-21 Thread Constantine Covtushenko
ual machine. > > So, I don't know if this would be a good approach to solve the problem. > > Em sexta-feira, 21 de outubro de 2016 05:27:45 UTC-2, Constantine > Covtushenko escreveu: >> >> Hi Aline, >> >> I have encountered the problem described by you as

Re: Deploy on Heroku Error

2016-10-21 Thread Constantine Covtushenko
Hi Aline, I have encountered the problem described by you as well. I am using heroku for about 5 django projects. For some reason this problem does not exist when you run django server with manage.py command. Try to read that heroku

Re: Admin Email From Address

2016-11-14 Thread Constantine Covtushenko
Hi Matthew, There should be considered following: 1. Not always cod runs with user interaction - worker cases 2. Not always user authenticated With such cases who the sender should be? Regards, Constantine C. On Nov 15, 2016 12:43 AM, "Matthew Pava" wrote: I would like

Re: Admin Email From Address

2016-11-15 Thread Constantine Covtushenko
wrote: > In such cases, we would have a fallback that is already established in the > settings file. > > > > *From:* django-users@googlegroups.com [mailto:django-users@ > googlegroups.com] *On Behalf Of *Constantine Covtushenko > *Sent:* Tuesday, November 15, 2016

Re: Admin Email From Address

2016-11-15 Thread Constantine Covtushenko
> > > *From:* kostyak7...@gmail.com [mailto:kostyak7...@gmail.com] *On Behalf > Of *Constantine Covtushenko > *Sent:* Tuesday, November 15, 2016 2:27 PM > > *To:* django-users@googlegroups.com > *Subject:* Re: Admin Email From Address > > > > Sorry but I do not see any

Re: HELP - Django variable in style (width) attribute

2016-10-16 Thread Constantine Covtushenko
Hi Aline, It is not direct answer for what you are asking, but why do you calculate the percentage 2 times? Why just use `with ` tag? With it nor problem at all. Hope that helps. Regards, Constantine C. On Sun, Oct 16, 2016

Re: Serving external files with Django

2017-01-02 Thread Constantine Covtushenko
Hi Priyesh, You can start from managing files documentation of Django. Hope that helps On Mon, Jan 2, 2017 at 6:16 PM, Priyesh Raj wrote: > Hi, > > I need to serve content of external files on user action (Click on

Re: Django search

2017-01-15 Thread Constantine Covtushenko
Hi Branco, Sorry, but can you be more specific? If you've got the result what is your concern? Do you only need to switch into forms? Regards, Constantine C. On Sun, Jan 15, 2017 at 2:41 PM, Branko Zivanovic < international11...@gmail.com> wrote: > How do i implement search on django website

Re: Djnago User login

2017-03-01 Thread Constantine Covtushenko
Hi Hossein, I am not sure that understood you correctly. Are you asking about the way how to handle two types of authentication? One by user name and password, an other by just username? On Wed, Mar 1, 2017 at 4:05 PM, Hossein Torabi wrote: > is there any method that i

Re: add users to google group django

2017-07-01 Thread Constantine Covtushenko
Hi Brian, A quick overview of your requirements. There should be a signup flow that adds user email to specific Google Group. So basically you are trying to get just emails from user. And you are not going to verify emails, activate/deactivate users, add secured section to you site, except admin

Re: Keep logged in accross Sites

2017-07-01 Thread Constantine Covtushenko
Hello Pablo, +1 to your solution Regards, Constantine C. On Fri, Jun 30, 2017 at 9:06 AM, Pablo Camino Bueno wrote: > Hello, > > I'm using Django Sites framework to hadle different sites, with the same > users. > > I'd like to add a link to switch between my sites, but

Re: Built-in logging module may lead to memory leak?

2017-07-01 Thread Constantine Covtushenko
Hello, Can you please print here a code snippet where you are using: > logger = logging.getLogger(__name__) Regards, Constantine C. On Thu, Jun 29, 2017 at 11:29 PM, Yp Xie wrote: > Hi guys, > > I'm using the python built-in logging module in a django project. Using >

Re: Keep logged in accross Sites

2017-07-06 Thread Constantine Covtushenko
Hi Pablo, As suggested Larry this can be like SSO implementation in one of sites hosted by your Django server. But this can be done in more simple way because all sites are hosted within the same Django server. Possible Workflow: === Terms 'SSO Site' - one of the sites

Re: Permissions for Anonymous Users in Django

2017-05-11 Thread Constantine Covtushenko
You are welcome :) Have a fun with you project and Django. Django is very great! On Thu, May 11, 2017 at 10:44 PM, Uzair Tariq wrote: > Thanks man! So basically my example and deduction of the sentence was > right about the anonymous and inactive authenticated users

Re: Permissions for Anonymous Users in Django

2017-05-10 Thread Constantine Covtushenko
Hi Uzair, Can you please provide some use cases when there is needed such behavior? Regards, Constantine C. On Tue, May 9, 2017 at 6:56 AM, Uzair Tariq wrote: > Does the Django have support for permission for the anonymous users? Reference > Topic Link >

Re: "In menu" does not work - Can anybody help?

2017-05-10 Thread Constantine Covtushenko
Hi Lisa, Can you please tell what application do you use for that? Is it django-cms? Regards, Constantine C. On Wed, May 10, 2017 at 10:28 AM, wrote: > Hi there, > I have a problem with the "in menu" section of a child-page in django. The > URL is

Re: Permissions for Anonymous Users in Django

2017-05-11 Thread Constantine Covtushenko
Hi Uzair, It seems like I see your point. Let me head you on answer off your first question: > Does the Django have support for permission for the anonymous users? Open the link provided by you: Reference Topic Link

Re: "In menu" does not work - Can anybody help?

2017-05-11 Thread Constantine Covtushenko
I am not a huge expert of django-cms. I just got it in 1 project of mine. And I ca say that all works as expected. It is difficult to describe what is wrong with your menu based on what you provided. May be you can bring some sort of screenshots here? Regards, Constantine C. On Thu, May 11,

Re: Permissions for Anonymous Users in Django

2017-05-11 Thread Constantine Covtushenko
Hi Uzair, Please find my answer in blue: On Thu, May 11, 2017 at 9:10 PM, Uzair Tariq <s.uzairta...@gmail.com> wrote: > A Bundle of thank Constantine Covtushenko now the working to > Authentication Backend for anonymous and inactive users is clear. Just one > last question do

Re: Email conformation problem

2017-05-17 Thread Constantine Covtushenko
Hi, Ismail Did you try: *instance.user.email*? I hope it should be what you need. Regards, Constantine C. On Mon, May 15, 2017 at 3:47 PM, Ismail Sarenkapic wrote: > from django.conf import settings > from django.contrib.auth.models import ( > BaseUserManager,

Re: Email conformation problem

2017-05-17 Thread Constantine Covtushenko
ke potential fishing > content, can you help me with that? > > > On Wednesday, May 17, 2017 at 8:21:22 AM UTC+2, Constantine Covtushenko > wrote: >> >> Hi, Ismail >> >> Did you try: >> >> *instance.user.email*? >> >> I hope it should be what

Re: Matching query does not exist after a post_data signal, but in fact does exist when visiting the url sent by the query

2017-05-17 Thread Constantine Covtushenko
Hi, François-Xavier I believe that the reason of that is a transaction that is not committed yet when your code reaches 'post_save' listener. And when you use 'requests' library there is nothing in the DB yet. And I am just curios why there is a need of saving 'admin view' in the DB? Regards,

Re: Email conformation problem

2017-05-17 Thread Constantine Covtushenko
ries like allauth, scoialauth etc. > Please don't replay to the posts when you don't know what it is about.tnx > again > > On Wednesday, May 17, 2017 at 8:41:05 AM UTC+2, Constantine Covtushenko > wrote: > > It is not a Django related question, sorry. > I can just suggest

Re: View Function Signature?

2017-05-12 Thread Constantine Covtushenko
Hi, Please check that link of documentation. For me it was very helpful to understand all pieces of Request/Response cycle. Regards, Constantine C. On Fri, May 12, 2017 at 4:05 PM, nickeforos

Re: Need help in Django User Model customization and authentication

2017-05-13 Thread Constantine Covtushenko
Hi Ajat, It was not clear to me why you do not use 'Extending the existing User model' approach, described here . For me it works very well in almost all cases. And if you go that way then

Re: Trigger receiver signal on Proxy model

2017-05-12 Thread Constantine Covtushenko
Hi, It is supposed to run 'index_elastic' when you save 'Item' entity. And to run 'new_index_elastic' when you save 'Newmodel' entity. May be the reason why you do not see proper logs that in your code all operations with entity are done based on 'Item' class? Hope that helps. Regards,

Re: View Function Signature?

2017-05-12 Thread Constantine Covtushenko
Hi Nick, As for me it is responsibility of the developer to define view function. There is only one mandatory argument 'request'. All other are based on the logic of view function and url patterns. Say for view function that operates with entity might be natural to add 'id' as a second

Re: Model design question

2017-06-25 Thread Constantine Covtushenko
Hi Mark, I have some questions to you. 1. Does any of MetaData have predefined list of MetaDataValues? 2. Can MetaDataValue be assigned to many Documents or it is specific to particular Document? Regards, Constantine C. On Sun, Jun 25, 2017 at 6:20 PM, Mark Phillips

Re: Django and Oracle 10g

2017-10-07 Thread Constantine Covtushenko
Hi Paulo, Did you read https://docs.djangoproject.com/en/1.11/ref/databases/#oracle-notes? I did not use oracle backend in any of my projects. But with Django ORM one will never depend on DB type in common scenarios. I hope that helps. Regards, Constantine C. On Sat, Oct 7, 2017 at 8:51 PM,

Re: Updating an instance.

2017-09-30 Thread Constantine Covtushenko
'city2': autocomplete.Select2(url='city-autocomplete'), >> 'city3': autocomplete.Select2(url='city-autocomplete'), >> 'city4': autocomplete.Select2(url='city-autocomplete'), >> 'city5': autocomplete.Select2(url='city-autocomplete'), >> } >> >

Re: Updating an instance.

2017-09-29 Thread Constantine Covtushenko
Dear Mitui, I saw 2 questions in your inquiry: 1. Regarding to Form behaviour 2. Regarding to log message Let me clarify second: Provided message said that server responded with 302 - redirect response. It is correct as you said in your view method: return

Re: Add value to database without using forms in django

2017-09-30 Thread Constantine Covtushenko
Hi Mitul, Can you clarify a little bit more your question? What are you trying to resolve? You asked: "How it will be done...?" It is not clear what exactly you are trying to be done. I guess that it my be saving cities into model 'cityval' fields. Am I correct? If so you can do something like

Re: Django: Form validation strange behaviour

2017-09-29 Thread Constantine Covtushenko
Hi Paul, You should return value from 'clean_document'. >From your code I see you do not do that. When method returns nothing it is None. That is why you see 'This field cannot be blank.' I hope that make sense. Regards, Constantine C. On Fri, Sep 29, 2017 at 7:01 AM, Paul

Re: make a button element outside be on the right side of another element inside

2017-09-29 Thread Constantine Covtushenko
Dear Fabio, Can you please provide html of your button here? Thank you, Regards, Constantine C. On Fri, Sep 29, 2017 at 8:37 AM, fábio andrews rocha marques < fabioandrewsrochamarq...@gmail.com> wrote: > unfortunally, it does trigger. I have an input and a button. The button is > "?" and the

Re: get_ip_address() not working when used Custom Decorators

2017-09-29 Thread Constantine Covtushenko
Hi Mannu, It seems like all are ok. Sorry, but do you use it in just one place? And do you see response in console from your print? Regards, Constantine C. On Thu, Sep 28, 2017 at 4:36 PM, Mannu Gupta wrote: > I am just using it in a view function. For example:- > >

Re: get_ip_address() not working when used Custom Decorators

2017-10-01 Thread Constantine Covtushenko
> What do you mean to say just one place ? > I just printed the request using `print(request)` and getting this > `` ( don't know what this actually is ) > > Am i using the following approach. > On Saturday, September 30, 2017 at 8:08:22 AM UTC+5:30, Constantine > Covtushenko wro

Re: How to save foreign key along with parent object in django 1.10

2017-12-04 Thread Constantine Covtushenko
Hi, Can you please describe why you did not want to call author.save() explicitly? What is wrong with this approach? Regards, Constantine C. On Mon, Dec 4, 2017 at 7:36 PM, Priyanka Thakur wrote: > Hi, > > > I want to create a bunch of objects that are interconnected

Re: context must be a dict rather than Context.

2017-12-12 Thread Constantine Covtushenko
Hi Al, I believe that an error you mentioned is thrown from line: html = t.render(c) As said in the error: context must be a dict So just change c = template.Context({'now': now}) to be c = {'now': now} For more information please check that documentation page

Re: Multiple roles assign to user in djnago

2017-12-19 Thread Constantine Covtushenko
Hi Ketul, Did you read that django documentation? There you can find all about users, their roles/groups and permissions. Also can you please elaborate what do you mean under `admin panel`? Is it just a reference to admin site? Does it make

Re: Multiple roles assign to user in djnago

2017-12-19 Thread Constantine Covtushenko
new field role_id in > auth_user table > > On Dec 19, 2017 8:13 PM, "Constantine Covtushenko" < > constantine@gmail.com> wrote: > >> Hi Ketul, >> >> Did you read that <https://docs.djangoproject.com/en/2.0/topics/auth/> >> d

Re: Links to comment function in the backend are wrong

2017-12-19 Thread Constantine Covtushenko
Hi Jan, I would suggest to change python version on new server to be the same as on your previous server. Sach an option should be available. Is it a kind of PAAS service in the cloud? If yes, there should be documentation how to do that. Does it make any sense? Regards, Constantine C. On Tue,

Re: send / receive data securely from a wifi module... how many steps?

2017-12-19 Thread Constantine Covtushenko
Hi, As soon as I understand you need to enable django authentication for you applications. Please check following django documentation page. Regards, Constantine C. On Fri, Dec 15, 2017 at 11:16 AM, R design

Re: Login form error not showing up for wrong username/password combo

2017-12-02 Thread Constantine Covtushenko
Hi Tom, It seems like your are trying to show error that relates to form rather to particular field. I see '__all__' key in example from console. And you did not create any html tag to show such errors on the page. All I see that you printed just field specific errors. Probably you should print

Re: Need Help with Many to Many Fields

2017-12-09 Thread Constantine Covtushenko
ordered > lists of file names and thumbnails. I used the code above (with a few > modifications) to generate the table. My concern is if the file name in the > first list (a field in the Document model) will always correspond to the > thumbnail in the second column (another field in the Document mode

Re: Need Help with Many to Many Fields

2017-12-09 Thread Constantine Covtushenko
tempstr + d.field_2 >> return tempstr >> >> Mark >> >> On Sat, Dec 9, 2017 at 9:14 AM, Mark Phillips <m...@phillipsmarketing.biz >> > wrote: >> >>> Constantine, >>> >>> Thanks for the link and update! However, I am

Re: Need Help with Many to Many Fields

2017-12-08 Thread Constantine Covtushenko
Hi Mark, Answering on your question I would do in your `get_documents` method: return obj.document.all().values_list('title', flat=True) this will get list of all document titles. But at the same time why do you need get_documents method? How do you use it? May be it is better to optimize