Re: ValueError at /api/list/ invalid literal for int() with base 10: '35/like'

2018-08-10 Thread Andréas Kühne
Hi, See my comments below. Regards, Andréas 2018-08-10 5:29 GMT+02:00 mounikesh mintu : > hey guys when i tried to like a post in drf i have got in to an error > > models.py > > class status(models.Model): > user=models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE, > null

Re: issue with bootstrap

2018-08-10 Thread Tosin Ayoola
oh Thanks for the reply, I load it at each of the templates i intend using it with but the I still getting same issues, it only shows the content of the generic page, even after using the loading it. On Thu, Aug 9, 2018 at 7:10 PM, Kasper Laudrup wrote: > Hi Tosin, > > On 09/08/2018 14.52, Tosin

Re: django models

2018-08-10 Thread Kasper Laudrup
Hi Ramandeep, On 08/10/2018 07:36 AM, Ramandeep Kaur wrote: > strange thing is that it indicates the error in line 395 which is in > the end where i dont write any code. It looks like your error is not closing the call to url() here: url('^api/v1/calls/beneficiary/(?P\w+)/$', # BeneficiaryCall

Re: issue with bootstrap

2018-08-10 Thread Kasper Laudrup
Hi Tosin, On 08/10/2018 09:57 AM, Tosin Ayoola wrote: oh Thanks for the reply, I load it at each of the templates i intend using it with but the I still getting same issues, it only shows the content of the generic page, even after using the loading it. It sounds like the browser is not loa

Re: issue with bootstrap

2018-08-10 Thread Tosin Ayoola
thanks, but the browser is actually loading it because, the bootstrap i'm using at the base.html is been loaded by the same browser On Fri, Aug 10, 2018 at 9:17 AM, Kasper Laudrup wrote: > Hi Tosin, > > On 08/10/2018 09:57 AM, Tosin Ayoola wrote: > >> oh Thanks for the reply, I load it at each o

Re: issue with bootstrap

2018-08-10 Thread Tosin Ayoola
Maybe it is my error that is leading to that, I have it uploaded on github this is the link https://github.com/olaneat/ask_the_schools, probably you can be of help. thanks On Fri, Aug 10, 2018 at 9:21 AM, Tosin Ayoola wrote: > thanks, but the browser is actually loading it because, the bootstrap

Re: issue with bootstrap

2018-08-10 Thread Kasper Laudrup
Hi Tosin. On 08/10/2018 10:42 AM, Tosin Ayoola wrote: Maybe it is my error that is leading to that, I have it uploaded on github this is the link https://github.com/olaneat/ask_the_schools, probably you can be of help. thanks So you are not using the boostrap django package I linked to earl

Re: Setting up a system for testing by users (tables are tables?)

2018-08-10 Thread guettli
I see: no reply. Why? Am Mittwoch, 18. Juli 2018 11:45:00 UTC+2 schrieb guettli: > > I have a task which looks simple at the first sight: > > Setting up a system for testing by users. > > In my case it is a custom issue tracking system. > > The users who should do the testing say "The new system

Re: django solr with haystack problem

2018-08-10 Thread Jason
if your code indentation is accurate, check get_model and index_queryset are actually part of the NoteIndex class class NoteIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True,use_template=True) author = indexes.CharField(model_attr='user') pub_date =

Re: Django Generic Date Views

2018-08-10 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Gerald, Couple of points: - - please try to stick to the mailing list when posting follow-up questions or materials rather than replying off-list; this makes it possible for other people to jump in and offer their advice (and also doesn't s

Re: Multi Tenancy

2018-08-10 Thread Gagan Kalia
Andrew, Even if you keep the application servers in another geography, wouldn't it be a performance hit in terms of accessing the Database hosted in another geography? My take would be to keep the systems in the same geography to avoid the performance issues down the line and making the customer d

Administration with Django 2

2018-08-10 Thread t.mayet via Django users
Hi, I want to add a administration at my django project, this admin part is writen by me, not admin app. I want to know the good method to build this, the god way is to create a app admin with new views, model etc... or just create a other views in my apps ? Blog, etc... Thx -- You received

Re: Recursive one-to-many foreign key on the same table

2018-08-10 Thread Phlip Pretorius
Thank you Marius; the video is worth the watch and thought provoking Phlip On Thursday, August 9, 2018 at 2:42:13 PM UTC+2, Phlip Pretorius wrote: > > I want to build a one-to-many recursive foreign key on a table in Django. > > The concept is something like this: > > Table: staff/person > > staf

I need help! How to add a language in Django that its not supported by default?

2018-08-10 Thread Deniz Bazan
I m trying to make a website in 5 languages. The main language should be kurdish but it is not supported by Django default. I tried already the how to add new languages into Django?

Re: How to add a language in Django that its not supported by default?

2018-08-10 Thread Clay Records
Hey Deniz, It seems you're making a mistake with adding dictionaries. Dictionaries cannot be added with the '+' symbol. This code gets the same error. a = {1:1, 2:2} b = {4:4, 5:5} c = dict(a.items() + b.items()) print(c) However, this code has no errors. a = {1:1, 2:2} b = {4:4, 5:5} c = {*

Re: django models

2018-08-10 Thread Ramandeep Kaur
thanks i got my mistake but now again i am getting an error. my urls.py: from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView from rest_framework_nested import routers from rest_auth.views import LogoutView from locat

Re: django models

2018-08-10 Thread Kasper Laudrup
Hi Ramandeep, The problem is pretty much the same as before: Mismatched parentheses, but I'll leave to you to figure out where. It's pretty easy to spot. Did you find an editor that helps you syntax check python code? It'll make your life a lot easier. Kind regards, Kasper Laudrup On August

Re: How to add a language in Django that its not supported by default?

2018-08-10 Thread Deniz Bazan
thanks Clay, but this code was not from me,i cant understand this code.I need help for extra language by Django,wenn i dont find any solution for this it ist very sad for me. On Fri, Aug 10, 2018 at 3:17 PM Clay Records wrote: > Hey Deniz, > > It seems you're making a mistake with adding dicti

How to include delete function in UpdateView instead a DeleteView

2018-08-10 Thread zengkeat
I have a UpdateView for editing a post, but instead of making a DeleteView for delete a post, i try to make UpdateView include a function to delete the post. So ,i want to edit and delete a post in UpdateView. Is that possible ? form_valid() missing 1 required positional argument: 'pk' views.

Unexpected behavior with icontains in query filter

2018-08-10 Thread Joel
I'm trying to do a case insensitive search for a substring within a field in my model. My model: class doctor(models.Model): docid = models.AutoField(primary_key=True, unique=True) # Need autoincrement, unique and primary name = models.CharField(max_length=35) usern

How to include delete function in UpdateView instead a DeleteView

2018-08-10 Thread zengkeat
down vofavori I have a UpdateView for editing a post, but instead of making a DeleteView for delete a post, i try to make UpdateView include a function to delete the post. So ,i wa

RE: Unexpected behavior with icontains in query filter

2018-08-10 Thread Matthew Pava
I’m fascinated by this problem. Try this workaround. https://docs.djangoproject.com/en/2.0/ref/models/database-functions/#lower Register the lookup Lower like so: CharField.register_lookup(Lower, "lower") Then use the contains lookup. doctor.objects.filter(name__lower__contains="joel") From: dj

Not able to connect to SQL Server 2012 from current version of DJango and Python

2018-08-10 Thread Gurmeet Kaur
Hi All, I am trying to connect to SQL server 2012 using Pyodbc and DJango framework but the version of Django is 2.1. Now, when I try to connect using below code when I only have Pyodbc installed then the below code doesnot run. DATABASES = { 'default': { # 'ENGINE': '{ODBC Driver 11

[no subject]

2018-08-10 Thread shivam sharma
Can someone explain me difference between Context object and RequestContext obj. And also difference between render_to_response() and render() -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai