Re: Python +django

2019-09-10 Thread 'Nicholas Hatch' via Django users
If you are looking for books, any of the O’Reilly books are good. A worthwhile investment is an O’Reilly online subscription, which gives you access to all their books plus video tutorials, so you get the best of both worlds. For the price of three or four of their technical books, you get

Re: Relation between different database?

2019-09-10 Thread ANi
Thanks, Jason. I was trying to connect a table to a view from another database. But it is not allowed to have a foreign key on a view unless I use a materialized view! Problem is solved. ANi於 2019年9月10日星期二 UTC+8上午11時54分28秒寫道: > > Hi, > > I have my asset table in local db which need to

Re: django-import-export problem with relation of two databases

2019-09-10 Thread ANi
Thanks, Jason. Then another question, actually why I am asking this is because I am using django-export-import, I think it is better to have another title. This is my router, I've set the foreignkey between A Model from default database and EmpAXView from emp database. django-export-import

Re:

2019-09-10 Thread Duncan Jerry
exactly @Jani Tianien.. I strongly suggest that code snippet be snapped from whatever framework for easy understanding On Tue, Sep 10, 2019 at 2:07 PM Jani Tiainen wrote: > Please paste your errors as plain text. > > Images are really hard to read in mobile devices and searching image for >

Re:

2019-09-10 Thread Jani Tiainen
Please paste your errors as plain text. Images are really hard to read in mobile devices and searching image for keywords is really impossible. ti 10. syysk. 2019 klo 23.36 Duncan Jerry kirjoitti: > you should post images of the errors you are getting so that its easy for > us to figure out a

Re:

2019-09-10 Thread Duncan Jerry
you should post images of the errors you are getting so that its easy for us to figure out a solution for you On Tue, Sep 10, 2019 at 1:09 PM Abhishek Ghaskata < abhishekghaskata1...@gmail.com> wrote: > I am getting error models has no 'objects' member. > So what should I do? > > -- > You

Re: Postgre sql problem

2019-09-10 Thread acema alex
Try to follow these steps; - Install PostgreSQL, -install psycopg2 binary version , -create the database in the PostgreSQL, - then go to your settings.py of your project and do these on the database setting DATABASES = { 'defaults': { 'ENGINE':

Re: Postgre sql problem

2019-09-10 Thread Aniket Jain
Hello , Please pip install psycopg2 On Sat, 7 Sep, 2019, 1:19 AM Elmaco7, wrote: > *Hello, I'm trying to use Postresql with my django project, but when i try > to install psycopg2(with this command 'pip3 install psycopg2') this > problem appears:* > > Collecting psycopg2 > Using cached >

[no subject]

2019-09-10 Thread Abhishek Ghaskata
I am getting error models has no 'objects' member. So what should I do? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Problems with "Class Meta" and " __str__"

2019-09-10 Thread 'Amitesh Sahay' via Django users
I guess you should define the Meta class just under the main class, ie. class Autore(models.Model):     nome = models.CharField(max_length=50)     cognome = models.CharField(max_length=50) class Meta:     verbose_name_plural = "Autori" Regards, Amitesh Sahay91-750 797 8619 On

Re: Problems with "Class Meta" and " __str__"

2019-09-10 Thread Doddahulugappa.B
*def __str__(self):return self.name * On Tue, Sep 10, 2019, 8:30 PM Elmaco7 wrote: > Hello, I do these models but the Django admin page doesn't read the "class > Meta" and " __str__". > This is the models.py document > > > > > > > > > > > > > > > > > > > > > > > > >

Re: Python +django

2019-09-10 Thread Gerardo Palazuelos Guerrero
hi, Django has been a different beast for me, an .NET programmer... You need to find your way... Following are my go-to resources, always: #1: (free) Djangogirls tutorial #2: (paid) the books by https://wsvincent.com/books/-- specially that book (green one) is an excellent resource for

Re: Dblink creation from Oracle 11g to postgres

2019-09-10 Thread nitin kumar
Sure, for what we are here. How? On Tue 10 Sep, 2019, 10:18 PM Peter Mudoko, wrote: > Hey I have done one can we discuss about it > > On Tue, 10 Sep 2019, 18:12 nitin kumar, wrote: > >> I just want to fetch the data to populate (non editable)in different >> interface from Oracle 11g to

Re: Dblink creation from Oracle 11g to postgres

2019-09-10 Thread Peter Mudoko
Hey I have done one can we discuss about it On Tue, 10 Sep 2019, 18:12 nitin kumar, wrote: > I just want to fetch the data to populate (non editable)in different > interface from Oracle 11g to postgresql. > > How to create the dblink between these two database. What procedure I have > to

Re: migrate error

2019-09-10 Thread Desh Deepak
Show me your view.py code. On Tue, 10 Sep 2019, 20:03 Chukwuka, wrote: > Might help if you post the migration file 0027.. for testapp > > On Mon, Sep 9, 2019 at 9:29 PM Pradeep Singh > wrote: > >> from django.db import models >> from django import forms >> from django.core import validators >>

Problems with "Class Meta" and " __str__"

2019-09-10 Thread Elmaco7
Hello, I do these models but the Django admin page doesn't read the "class Meta" and " __str__". This is the models.py document *from django.db import models# Create your models here.class Autore(models.Model):nome = models.CharField(max_length=50)cognome =

Re: about {% with %}

2019-09-10 Thread Gil Obradors
Hi Mohamed! It's the open tag for django template language. Very similar to jinja2 https://docs.djangoproject.com/en/2.2/ref/templates/language/ Missatge de mohamed khaled del dia dt., 10 de set. 2019 a les 17:55: > what the {% with %} actually does ??? > > -- > You received this message

about {% with %}

2019-09-10 Thread mohamed khaled
what the {% with %} actually does ??? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on

Re: Django ORM

2019-09-10 Thread nitin kumar
Not getting you exactly. Want to populate data based on searching db? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.

Dblink creation from Oracle 11g to postgres

2019-09-10 Thread nitin kumar
I just want to fetch the data to populate (non editable)in different interface from Oracle 11g to postgresql. How to create the dblink between these two database. What procedure I have to follow? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django 3.0 alpha 1 released

2019-09-10 Thread Benjamin Schollnick
> On Sep 10, 2019, at 5:29 AM, Carlton Gibson wrote: > > We've made the first release on the way to Django's next major > release, Django 3.0! > > With about two and a half months until the > final release (scheduled for December 2nd), we'll need timely testing > from the community to

Re: Postgre sql problem

2019-09-10 Thread Team Infinity
You must have postresql installed so as to install psycopg2 :) On Saturday, September 7, 2019 at 1:34:31 AM UTC+5:45, Elmaco7 wrote: > > *Hello, I'm trying to use Postresql with my django project, but when i try > to install psycopg2(with this command 'pip3 install psycopg2') this > problem

Re: migrate error

2019-09-10 Thread Chukwuka
Might help if you post the migration file 0027.. for testapp On Mon, Sep 9, 2019 at 9:29 PM Pradeep Singh wrote: > from django.db import models > from django import forms > from django.core import validators > from django.core.urlresolvers import reverse > from django.contrib.auth.models import

Re: Django 3.0 alpha 1 released

2019-09-10 Thread Benjamin Schollnick
We've made the first release on the way to Django's next major > release, Django 3.0! > > With about two and a half months until the > final release (scheduled for December 2nd), we'll need timely testing > from the community to ensure an on-time, stable release. > > Check out the blog post:

Re: Python +django

2019-09-10 Thread Mario R. Osorio
I must agree that video tutorials are harder to follow, specially if and when they are if at least a bit outdated. I used to hate them however; I've learned to appreciate them specially because of one reason: *YOU CANNOT COPY AND PASTE.* Written tutorials don't help you go thru the full

Re: Django 3.0 alpha 1 released

2019-09-10 Thread Brian M
On Tue, Sep 10, 2019, 5:30 AM Carlton Gibson wrote: > We've made the first release on the way to Django's next major > release, Django 3.0! > > With about two and a half months until the > final release (scheduled for December 2nd), we'll need timely testing > from the community to ensure an

Re: need permissions for post method

2019-09-10 Thread Micheal Desousa
dei Thanks, with regrads Micheal. On Tue, Sep 10, 2019 at 5:20 PM siva.gatti wrote: > Hi, > > class UserViewSet(viewsets.ModelViewSet): > permission_classes = [IsAuthenticated] > queryset = Documents.objects.all() > serializer_class = DocumentSerializer > > this is my viewset. I

need permissions for post method

2019-09-10 Thread siva.gatti
Hi, class UserViewSet(viewsets.ModelViewSet): permission_classes = [IsAuthenticated] queryset = Documents.objects.all() serializer_class = DocumentSerializer this is my viewset. I want to allow users for post method without authentication how can i add allowed methods here.with

Re: Relation between different database?

2019-09-10 Thread Jason
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/ If you have to do this, Django does support multiple databases. But you’re going to need to handle the data consistency and integrity you’r. -- You received this message because you are subscribed to the Google Groups "Django users"

Django 3.0 alpha 1 released

2019-09-10 Thread Carlton Gibson
We've made the first release on the way to Django's next major release, Django 3.0! With about two and a half months until the final release (scheduled for December 2nd), we'll need timely testing from the community to ensure an on-time, stable release. Check out the blog post:

Re: Meta question

2019-09-10 Thread ANi
getattr(instance, key) to get the value setattr(instance, key ,value) to put the value, and remember to do instance.save() otherwise it won't actually be changed. Mike Dewhirst於 2019年9月10日星期二 UTC+8下午4時27分06秒寫道: > > Given a model instance and the name of one of its fields as a string, > how

Re: migrate error

2019-09-10 Thread Rahul Roshan
First you can cleanup all migrations files in /migrations/*. And then try to provide *default=" " *for contact_no. Try to migrate all these changes ! On Tue, Sep 10, 2019 at 1:42 PM Pradeep Singh wrote: > okay . yes i did but problem are same > > On Tue, 10 Sep 2019 at 12:49, Rahul Roshan >

Meta question

2019-09-10 Thread Mike Dewhirst
Given a model instance and the name of one of its fields as a string, how can I get/put a value in that field? The methods might look like this ... def get_value(obj, fldname):     ...     return value def put_value(obj, fldname, value):     pass Thanks for any hints Mike -- You

Re: migrate error

2019-09-10 Thread Pradeep Singh
okay . yes i did but problem are same On Tue, 10 Sep 2019 at 12:49, Rahul Roshan wrote: > Can you try contact_date default=" " ! > > On Tue, Sep 10, 2019, 12:22 PM ANi wrote: > >> >> Another piece of advice, please prettify your code or take a screenshot, >> not just paste it directly. >> It

Re: migrate error

2019-09-10 Thread Rahul Roshan
Can you try contact_date default=" " ! On Tue, Sep 10, 2019, 12:22 PM ANi wrote: > > Another piece of advice, please prettify your code or take a screenshot, > not just paste it directly. > It is not easy to read to you as well, right? > > > > what had you done in this migration? > Was the

Re: migrate error

2019-09-10 Thread ANi
Another piece of advice, please prettify your code or take a screenshot, not just paste it directly. It is not easy to read to you as well, right? what had you done in this migration? Was the original value in that column a datetime and you want to change it into another data format?

Re: 404 error

2019-09-10 Thread ANi
The fastest way to know why is to read your error messages. arpit Dubey於 2019年9月7日星期六 UTC+8下午11時38分38秒寫道: > > I have followed all the steps for creating our first app polls but it is > showing the error of 404 > could you please help me to finding it out why it is happening there after >

Re: Relation between different database?

2019-09-10 Thread ANi
the key point is about the relation in* different databases*, if it is possible to have relations, then I don't need to write additional code to access data from the remote one. ANi於 2019年9月10日星期二 UTC+8上午11時54分28秒寫道: > > Hi, > > I have my asset table in local db which need to reference to the

Re: Query into Django ORM

2019-09-10 Thread Ronit Mishra
Hi Amit, Excuse me for my straight forwardness, but this not a challenge. From what I can see is, you want someone to write you the complete code for your models. You didn't even write a single line of code, and you're expecting someone to write the whole damn thing for you. Unless you're

Re: Relation between different database?

2019-09-10 Thread N'BE SORO
Ok you can add an additional column my_id and you give him the unique property = True Le mar. 10 sept. 2019 à 06:00, ANi a écrit : > my real situation as an example. > > *local database* > AssetModel(id, employee, name, barcode, location, value) > > *remote database* > EmployeeView(id, name,

Re: Query into Django ORM

2019-09-10 Thread N'BE SORO
Hello please send your models example and. Le jeu. 5 sept. 2019 à 14:56, Amit Samanta a écrit : > Hi, > > I am facing a challenge please help me. > > [image: Query.PNG] > > > output: > > [image: output.PNG] > > Here one env_name can have many comp name and one env with one comp_name > there

Re: Postgre sql problem

2019-09-10 Thread N'BE SORO
Hello. Install *psycopg2 binary version* Le ven. 6 sept. 2019 à 22:06, Thomas Lockhart a écrit : > You need the python-devel package installed for the version of python you > are running. > > - Tom > > On Sep 6, 2019, at 12:49 PM, Elmaco7 wrote: > > *Hello, I'm trying to use Postresql with my

Re: Relation between different database?

2019-09-10 Thread ANi
my real situation as an example. *local database* AssetModel(id, employee, name, barcode, location, value) *remote database* EmployeeView(id, name, department) I am thinking to set employee in AssetModel as an ForeignKey which references to EmployeeView. but it seems to be not allowed --