Re: reg: Error:-django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'Description' used in key specification without a key length")

2020-02-24 Thread Integr@te System
Hi Freind,

For simplify and minimize your dev time, review first in your err, code
base.
Thank your sharing and dont forget zen.


On Mon, Feb 24, 2020, 21:43 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hi,
>
> I am creating a model, which is taking a description as text field. when I
> migrate I see the below error:
>
> django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'Description'
> used in key specification without a key length")
>
> ON further research I came to know that its some limitation with MySQL. I
> am using MYSQL for my dev. Below is the link that describes the issue.
>
> MySQL error: key specification without a key length
> 
>
> MySQL error: key specification without a key length
>
> I have a table with a primary key that is a varchar(255). Some cases have
> arisen where 255 characters isn't enou...
>
> 
>
> *So what am I suppose to use if not TextField? I have tried CharField,
> that doesn't work either. Below is the model details:*
>
>
>
>
>
>
>
>
>
> *class OnlineShop(models.Model): Product_name =
> models.CharField(max_length=100, unique=True) Price = models.IntegerField()
> Slug = models.SlugField(max_length=250, unique=True) Description =
> models.TextField() Curr_Time = models.DateTimeField(auto_now_add=True) def
> __str__(self): return '{}'.format(self.Product_name)*
>
>
> Regards,
> Amitesh Sahay
> *91-750 797 8619*
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1073924601.858407.1582555396348%40mail.yahoo.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpJ2DTZUpacOdoisnT3_uSPebQ5D03H9i%2BN-PtehATrTg%40mail.gmail.com.


Re: 'ssl_disabled' is an invalid keyword argument for connect()

2020-02-25 Thread Integr@te System
Hi Steve,

Plz review again to take a right parameter.
Welcome.


On Wed, Feb 26, 2020, 05:54 Stephen Loughin  wrote:

> The django doc
> s say I
> can pass OPTIONS for the db connection here:
>
> DATABASES = {
>
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'OPTIONS': {
> 'ssl_disabled': 'True',
> },
> 'NAME': 'somedatabase',
> 'USER': 'someuser',
> 'PASSWORD': 'somepassword',
> 'HOST': '10.0.0.1',
> 'PORT': '3306',
> }
>
> Yet when I try python manage.py runserver I get this:
>
> TypeError: 'ssl_disabled' is an invalid keyword argument for connect()
>
> I have also tried 'ssl_disabled': True,  # that is an actual boolean
> rather than string...
> Same result.  Running django 3 and python 3.7.4
>
> Thanks,
> -- Steve
> sloug...@gmail.com
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAHM1-MAfUCJtZG5%2B5bOMO_bzYr6E8J%2BO28YNxXPZD4MZNyj5eg%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqDbyHiQ170z147CmTsq3-1UTx2Z7hpLntui7BFV7MSuA%40mail.gmail.com.


Re: How to trigger system check while running development server?

2020-02-27 Thread Integr@te System
Hi Fr,

If you have not yet found out module/method for you, so let try git action
as on your dev phase with git repo.

On Thu, Feb 27, 2020, 21:32 One Above All 
wrote:

> I am updating a settings in my test which should raise exception on
> illegal entries, but merely updating settings does not make django perform
> system checks. Is there any method which I can call to trigger those
> checks?
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/7e9b4e35-0b4a-4c2b-864a-8631ff83ac8b%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWobOzYhCsN%3DSnSy9wonExWdBxubRXGwueCgPJvHb1dcJQ%40mail.gmail.com.


Re: About Django performance

2020-02-28 Thread Integr@te System
Hi Freinds,

Plz try some search example:
https://python-socketio.readthedocs.io/en/latest/intro.html

But first let us look at:
https://www.djangoproject.com/conduct/
Thank.

On Fri, Feb 28, 2020, 19:53 Motaz Hejaze  wrote:

> What is the type of data ??
>
> What is the expected amount to be transfered by second ?
>
> Its not only django , its the server type and the database type ..
>
> On Fri, 28 Feb 2020, 1:36 pm Gil Obradors,  wrote:
>
>> Hi !
>> I 'm curious too!
>>
>> How much data?
>>
>> With CPU and RAM, may be the problem will be in Wifi Channel, instead of
>> at the server.
>>
>> You will explain us ;)
>>
>> Thank you!
>>
>> Missatge de 이바울  del dia dv., 28 de febr. 2020 a les
>> 11:33:
>>
>>> I'm trying to build a server.
>>>
>>> Data transmitted from the wireless communication device enters the
>>> database via this server.
>>>
>>> We will use Message Queue to avoid losing data (VernaMQ).
>>>
>>> I'm curious to see if Django is a suitable server for sending and
>>> receiving data from multiple wireless devices, and if there is a problem,
>>> is there an alternative to using Django?
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/581a2e10-95fd-47c9-a680-3eeaf7a8eb1e%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAK-JoTQn6H9dU%2B52bVqmjuidxPStAzUSJNSrcbv%2B4r3xxCTCjw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-c09P0S-yp-5Ad10rcHK7bFKuNnaRPF9iM9NiE9HWrU6w%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWomPC7VEC6M7esmQQV7tH_Y8-rx8Pzapee%2B4PBLU%2BqtVQ%40mail.gmail.com.


Re: Serializing forms and formsets to pass to Celery task

2020-02-29 Thread Integr@te System
Hi Bernd,

You could take a look at serializers section on Note part, for more
information, and may be your own answer.

http://docs.celeryproject.org/en/master/userguide/calling.html#calling-serializers





On Sat, Feb 29, 2020, 23:56 Naveen Arora  wrote:

> Yes that would work well. You can always find a completely different way
> of achieving what you are trying to achieve.
>
> On Saturday, 29 February 2020 18:52:24 UTC+5:30, Jason wrote:
>>
>> As said before, you really can't do that too well with celery.  Its a
>> good practice to keep the message body between django -> broker -> worker
>> to be as small as possible because we don't know what your configuration
>> for the broker is.  In addition, you should never, ever, put sensitive
>> information in a message, just the identifier of a thing and let
>> celery/django pull from a data store when the task starts.
>>
>> what I would do is save the form data to some intermediate data store,
>> and pass in the identifier to the celery task for retrieval.  That ensures
>> your data integrity and security is high.
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/3f1b4374-ca68-4fcd-a33a-555bc72cbae8%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoh-tyPwwZviSpzu85G_eawSRkhnuDp5AzgkbW5zeogxg%40mail.gmail.com.


Re: Issue in the API while merging the two data frames

2020-03-01 Thread Integr@te System
Hi Devend,

Would we consider the problem like math to solve, base on specific case to
choose appropriate/mixing ways!? Look like:
... Break it down
... Take general parts -> solve it
and/or transform discrete part -> solve it
(assume special values like None, null, 0, var ... any if suitable)

e.g json <-> dict <-> list <-> csv

Or this is Django doc for quick reference if useful for you.


Welcome.


On Sat, Feb 29, 2020, 06:04 Devendra reddy 
wrote:

> Hi to all,
>
> I have two data frames in the python django API.one dataframe we are
> getting from the query and one data frame we are getting the XL file.how I
> want map this dataframes.in this equipment name and tag name are
> common.while merging one tag is missing or it is going to be updated with
> another tag in that dataframe repetition is happening.while giving
> conditions like how = right or left or inner or outer the tag is missing
> and this tag is going to update by the another tag and this tag is coming
> as twice. How can I solve this?
> Please suggest me solution.
>
> Thanks and Regards.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CABB0Uf3Zjwgz0ornPwnBe52LKwRHni0gTY8sJh9Lbgo2yghyZQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqoy7eYnetHn1Jo8Ldm19MK4_OjHWeyUuCjLFzgm5U%3DOQ%40mail.gmail.com.


Re: DjangoProject related queries: what is name(means unknown random number) after HTTP status code.

2020-03-02 Thread Integr@te System
Hi Lahu,

Check Django doc for your idea
https://github.com/django/django/blob/stable/2.2.x/django/utils/log.py


Nice.

On Mon, Mar 2, 2020, 19:37 Lahu Chavan  wrote:

> when we run command on teminal python manage.py runserver after will get
> local server IP address click on immediately, one hand will open a
> webbrowser page of django project and another hand on terminal continue
> processing in format  [Date]  "HTTP method"  HTTP status code | unknown
> random number.
>
>
>
> *my question is what is name(means *unknown random number)*  after HTTP
> status code.*
>
>
>
> *Please share answer as soon as possible*
>
>
>
> System check identified no issues (0 silenced).
> February 28, 2020 - 06:31:46
> Django version 3.0.3, using settings 'pydjblog.settings'
> Starting development server at http://127.0.0.1:8000/
> Quit the server with CTRL-BREAK.
> [28/Feb/2020 06:31:52] "GET / HTTP/1.1" 200 3295
> [28/Feb/2020 06:31:52] "GET /static/css/custom.css HTTP/1.1" 304 0
> [28/Feb/2020 06:31:52] "GET /static/popper.min.js HTTP/1.1" 404 1665
> [28/Feb/2020 06:31:52] "GET /static/bootstrap.min.js HTTP/1.1" 404 1674
>
>
> thank you
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/bbdc4dec-e77d-46ba-ad5a-1c500e1539f4%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpDUXYxgh8S7TaGjydUj6FDOKm8Dc37Qyq92nAYt3i6Hg%40mail.gmail.com.


Re: Integrating Django Rest Framework with Microsoft Office 365

2020-03-03 Thread Integr@te System
Hi Nosa,

Plz check this doc to set up service-to-service call and thanks to expert's
doc above to perform your task.

https://docs.microsoft.com/en-us/office/office-365-management-api/get-started-with-office-365-management-apis

Hope it useful.


On Sun, Mar 1, 2020, 19:56 Nosa Omorodion 
wrote:

> I am currently trying to consume the Microsoft Office365 API and Expose it
> via DRF to my frontend.
>
> I want to be able to:
>
>1.
>
>Give Role/Permissions to authenticated Users based off of Django
>already existing roles and Permission
>2.
>
>Expose the APIs to my Angular frontend for authentication.
>
> How do i save authenticated users to the Database and give them the
> requisite permission so they authenticate having the given permission the
> next time they login?
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/e9d9250a-d065-493b-ba58-6117db13a50c%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqDrkGOoDB0%3DQZwAP086AV%3DdsT-xdz3y0oORbFuZaeGHg%40mail.gmail.com.


Re: Django and AWS backend MENTOR NEEDED

2020-03-14 Thread Integr@te System
Hi Tibrewal,

You can use eb, it host your code on it platform and choose many service
around that host you need. You only take care your app code. Just review
aws eb doc again.



On Sat, Mar 14, 2020, 22:37 Harsh Tibrewal  wrote:

> Do you know AWS Elastic Beanstalk with Django
> I have doubts in it
>
> On Sat, Mar 14, 2020 at 5:37 PM Ousseynou Diop 
> wrote:
>
>> Hello how i can help you ?
>> You can reach out to me here @xarala221 https://ousseynoudiop.com
>> 
>> Le vendredi 13 mars 2020 20:48:59 UTC, Harsh Tibrewal a écrit :
>>>
>>> Hi, I have been trying to learn django and AWS for backend of my mobile
>>> applications. However, all my learnig is currently based on open source
>>> youtube and and other forums. There are errors that I get stuck with and
>>> need help to resolve them. Please someone be my mentor and guide. This will
>>> help me learn it faster and I will be happy to work for you on your
>>> projects etc.
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/004e81db-1ff5-4e31-aeb5-3f22de91a88c%40googlegroups.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CALXtbmsSd40cjCwuj%2B4injn91u-iwAytwajuuDv%2B1OkxvEzmpQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqU3J79sUzJZK8Xaid%2BWG-d2UhO%3DwJh_WY%3DiKYEx96WEQ%40mail.gmail.com.


Re: cant import views

2020-03-17 Thread Integr@te System
Dear Freind,

Plz check where your root project?
Or review base on code base vs. info you ps. at the end.

On Wed, Mar 18, 2020, 12:53 Jatin Agrawal  wrote:

> can you please share your project directory structure.
>
> On Tuesday, March 17, 2020 at 11:33:10 PM UTC+5:30, דביר חומרי wrote:
>>
>> i was following the toturial and i could'nt find why this error is accure.
>> polls/urls.py'
>>
>> from django.urls import path
>>
>> from . import views
>>
>> urlpatterns = [
>> path('', views.index, name='index'),
>> ]
>>
>>
>> and got this error:
>>
>> Traceback (most recent call last):
>>   File "c:\Users\..polls\urls.py", line 20, in 
>> from . import views
>> ImportError: cannot import name 'views'
>>
>> p.s. views.py is in the same directory as urls.py
>>
>> ¶ \
>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/a53d067e-3cf2-41b3-b075-d4c9748a8f7d%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpwJZHdCKiR9K0-Gy2nHwtfsQ0DS%3D9yMJLwYpkREqkAMQ%40mail.gmail.com.


Re: User Athentication Issue

2020-03-18 Thread Integr@te System
Hi Irfan,

Plz try to consider cookies with connection session on this user for which
other happen.

On Wed, Mar 18, 2020, 15:56 Irfan Khan  wrote:

> hi every one,
>
> as  implemented the user authentication i have tested it working fine. but
> one issue
> is when ever we logged into the portal then if we again clicks on back
> option in browser it going back to login page.how to prevent it.
>
> thanks in advance.
>
> With Regards,
> *Irfan khan*
>
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CALKGVioaLT8gCpH2iwniyefibqMG0QDWkShNVb_jdjfjSQ1U-Q%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpzRf%2BLagaGezeCAY2km9HGGSR4AHFui3NZYkm%3DUyPBBw%40mail.gmail.com.


Re: email": [ "Enter a valid email address." ]

2020-03-21 Thread Integr@te System
Hi Freind,

Try to set whitelist for your specific domain testing or refer doc for your
case.


On Sat, Mar 21, 2020, 03:47 devyen  wrote:

> Hi,
>
> I am tying to use the EmailField in my AbstractBaseUser Class see below.
> However the serializer does not recognize any emails as valid (I tested
> with this one, which is clearly valid)
>
> Can you help me?
>
> Thank you so much!
>
>
> models.py
>
> class User(AbstractBaseUser, PermissionsMixin):
> email = models.EmailField(max_length=256, unique=True)
> first_name = models.TextField(verbose_name="First Name", blank=True)
> last_name = models.TextField(verbose_name="Last Name", blank=True)
> user_id = models.TextField(unique=True)
> data = JSONField(default=default_data, name="device_data")
> is_staff = models.BooleanField(default=False)
> is_active = models.BooleanField(default=True)
> date_joined = models.DateTimeField(default=timezone.now)
>
> objects = UserManager()
>
> USERNAME_FIELD = 'email'
>
> def __str__(self):
> return self.email
>
> def get_first_name(self):
> return self.first_name
>
> def get_last_name(self):
> return self.last_name
>
> def get_email(self):
> return self.email
>
> def __unicode__(self):
> return self.email, self.user_id
>
> def get_user_id(self):
> return self.user_id
>
> serializers.py
>
> from rest_framework import serializers
> from .models import User
>
>
> class UserSerializer(serializers.ModelSerializer):
> class Meta:
> model = User
> fields = ['email', 'password']
>
>
> part of views.py
>
> class UserRegistration(APIView):
> def post(self, request):
> serializer = UserSerializer(data=request.data)
> if serializer.is_valid():
> print('valid')
> user_object = []
> email = serializer.validated_data['email']
> password = serializer.validated_data['password']
> if "first_name" in serializer.validated_data:
> first_name = serializer.validated_data['first_name']
> user_object.append(first_name)
> else:
> pass
> if "last_name" in serializer.validated_data:
> last_name = serializer.validated_data['last_name']
> user_object.append(last_name)
> else:
> pass
>
> # serializer.save()
> return Response(user_object, status=status.HTTP_201_CREATED)
> return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
>
>
> I send this:
>
> http -f POST http://127.0.0.1:8000/reg email='k...@k.com', password='pw'
>
> to receive this error:
>
> {
>
> "email": [
>
> "Enter a valid email address."
>
> ]
>
> }
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/bc92176b-7eb2-4e2a-a8a0-215eef7392c7%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrxXTmMovbmz2KCUG6%3DRMy10fNW6A-hkQdkbNWqZxYGNw%40mail.gmail.com.


Re: email": [ "Enter a valid email address." ]

2020-03-27 Thread Integr@te System
Hi Freind,

Plz look back the doc in Emailvalidator and decive your use case:

https://docs.djangoproject.com/en/3.0/ref/validators/#django.core.validators.EmailValidator.whitelist

On Fri, Mar 27, 2020, 18:19 Ben Magnelli  wrote:

>  AUTH_USER_MODEL = 'users.User
>
>
> Yep, I have that in settings.py
>
> In serializers.py if I change EmailField to CharField, it does serialize.
> However, then it’s not really checking if it’s a email. And EmailField
> should work.
>
> class User(AbstractBaseUser, PermissionsMixin):
>>>> email = models.CharField(max_length=256, unique=True)
>>>>
>>>> Thank you DjangoUsers
>
> On Mar 27, 2020, at 4:49 AM, Motaz Hejaze  wrote:
>
> 
> I think django doesnt recognize your custom user model ..
>
> Did you your app to installed app and put AUTH_USER_MODEL = 'myapp.MyUser'
>
> in settings.py ?
>
> On Fri, 27 Mar 2020, 3:33 am devyen,  wrote:
>
>> Hi
>>
>> Do know how to whitelist an email domain name? It seems odd that I would
>> have to go though an white list all of the main email domains (gmail,
>> protonmail, live, yahoo etc.)
>>
>> Ive been unable to figure it out on my own
>>
>> Thanks,
>>
>>
>>
>> On Sat, Mar 21, 2020 at 4:45 AM Integr@te System <
>> datacentral...@gmail.com> wrote:
>>
>>> Hi Freind,
>>>
>>> Try to set whitelist for your specific domain testing or refer doc for
>>> your case.
>>>
>>>
>>> On Sat, Mar 21, 2020, 03:47 devyen  wrote:
>>>
>>>> Hi,
>>>>
>>>> I am tying to use the EmailField in my AbstractBaseUser Class see
>>>> below. However the serializer does not recognize any emails as valid (I
>>>> tested with this one, which is clearly valid)
>>>>
>>>> Can you help me?
>>>>
>>>> Thank you so much!
>>>>
>>>>
>>>> models.py
>>>>
>>>> class User(AbstractBaseUser, PermissionsMixin):
>>>> email = models.EmailField(max_length=256, unique=True)
>>>> first_name = models.TextField(verbose_name="First Name", blank=True)
>>>> last_name = models.TextField(verbose_name="Last Name", blank=True)
>>>> user_id = models.TextField(unique=True)
>>>> data = JSONField(default=default_data, name="device_data")
>>>> is_staff = models.BooleanField(default=False)
>>>> is_active = models.BooleanField(default=True)
>>>> date_joined = models.DateTimeField(default=timezone.now)
>>>>
>>>> objects = UserManager()
>>>>
>>>> USERNAME_FIELD = 'email'
>>>>
>>>> def __str__(self):
>>>> return self.email
>>>>
>>>> def get_first_name(self):
>>>> return self.first_name
>>>>
>>>> def get_last_name(self):
>>>> return self.last_name
>>>>
>>>> def get_email(self):
>>>> return self.email
>>>>
>>>> def __unicode__(self):
>>>> return self.email, self.user_id
>>>>
>>>> def get_user_id(self):
>>>> return self.user_id
>>>>
>>>> serializers.py
>>>>
>>>> from rest_framework import serializers
>>>> from .models import User
>>>>
>>>>
>>>> class UserSerializer(serializers.ModelSerializer):
>>>> class Meta:
>>>> model = User
>>>> fields = ['email', 'password']
>>>>
>>>>
>>>> part of views.py
>>>>
>>>> class UserRegistration(APIView):
>>>> def post(self, request):
>>>> serializer = UserSerializer(data=request.data)
>>>> if serializer.is_valid():
>>>> print('valid')
>>>> user_object = []
>>>> email = serializer.validated_data['email']
>>>> password = serializer.validated_data['password']
>>>> if "first_name" in serializer.validated_data:
>>>> first_name = serializer.validated_data['first_name']
>>>> user_object.append(first_name)
>>>> else:
>>>> pass
>>>> if "last_name" in 

Re: Please help me out!!!!!

2020-06-03 Thread Integr@te System
Hi freind,

You ever check typo in your code in base.html on for loop at "noti"!?

gl!

On Wed, Jun 3, 2020, 2:20 PM meera gangani  wrote:

> Hello Django-users
>
> href is not working
> here is my views.py file and my urls.py file
>
> Please Help me out!!
>
> Thank you in advance
> -Meera
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CANaPPPLbk6JV8tQjxkKUiN-H%3D_JLHjztMQfGLK6oUx9ootEojg%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWq7YG2-b7ZanR%3DzYwkbv4wBw6-5qo%3DsMVBb5r3%2BfB%3DRYg%40mail.gmail.com.


Re: Django-Firebase cloudstore ORM

2020-06-10 Thread Integr@te System
Hi Goil,

Did you register your model to site admin contrib.




On Wed, Jun 10, 2020, 6:52 AM sparsh goil  wrote:

> Hey,
> Does anyone know how to perfectly use Firebase with Django?
>
> I am using Django-Firebase-ORM which automatically maps my models to cloud
> firestore database but I am getting error.
> Model.py
> from firebase_orm import models
> # Create your models here.
>
> class Article(models.Model):
> headline = models.TextField()
> type_article = models.TextField(db_column='type')
>
> class Meta:
> db_table = 'medications'
>
> def __str__(self):
> return self.headline
>
> >python3 manage.py makemigrations
>
> Error:
> Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 401, in execute_from_command_line
> utility.execute()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/core/management/__init__.py",
> line 377, in execute
> django.setup()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/apps/registry.py", line 122,
> in populate
> app_config.ready()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/apps.py", line
> 24, in ready
> self.module.autodiscover()
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/__init__.py",
> line 26, in autodiscover
> autodiscover_modules('admin', register_to=site)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/utils/module_loading.py", line
> 47, in autodiscover_modules
> import_module('%s.%s' % (app_config.name, module_to_search))
>   File "/usr/lib/python3.6/importlib/__init__.py", line 126, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 994, in _gcd_import
>   File "", line 971, in _find_and_load
>   File "", line 955, in
> _find_and_load_unlocked
>   File "", line 665, in _load_unlocked
>   File "", line 678, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "/home/spaggy/Documents/Summer Internship
> 2020/AI_legal/AI_legal/case_archives/admin.py", line 4, in 
> admin.site.register(Article)
>   File "/home/spaggy/Documents/Summer Internship
> 2020/venv/lib/python3.6/site-packages/django/contrib/admin/sites.py", line
> 103, in register
> for model in model_or_iterable:
> TypeError: 'ModelBase' object is not iterable
>
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/2208da1b-3469-4a30-ab7e-4fda4016fe8bo%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpZ1-R8GTsCj-050VP%2B-cYqxqb7aUhwPA0DPDqmdt_OZQ%40mail.gmail.com.


Re: Django Philosophy and Queries

2020-06-11 Thread Integr@te System
Hi Yves,

zen!
Nice.

On Thu, Jun 11, 2020, 9:27 PM Yves de Champlain  wrote:

> Hi
>
> I am wondering at some ways one can write a query in Django. Let's say for
> example :
>
> Whatever.objects.filter(fk_object_id=fk_object_id)
> Whatever.objects.filter(fk_object_id=fk_object.id)
> Whatever.objects.filter(fk_object=fk_object)
>
> and I could add to that list fk_object__id and fk_object__id__exact but
> my question is that while these syntaxes are equivalent in termes of
> results, one of them has got to be more efficient. I have read some posts
> about the subject, usually about optimizations, and could also guess that
> using an ID directly makes less behind-the-scene operations. On the other
> side, fk_object=fk_object surely looks more clean and concise to me.
>
> I know I don't master the subtleties of all these syntaxes, but my
> question is why does Django not support only one (the most) efficient way
> of writing queries ?
>
> Thanks for your thoughts about this.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/15077d25-1460-4783-9339-7e0ce8d21259o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpFcb9HYy9sgOG%3DpKC0LsSn0J1a_nx51JNHz%3Di5u54f1A%40mail.gmail.com.


Re: Question on migrations vs postgres database

2020-06-12 Thread Integr@te System
Hi Ram,

Plz check line #44 in reset_migrations.py
try replace square bracket by percent sign.

Or check temp file before your actions execute commands migration.

Goodluck.

On Sat, Jun 13, 2020, 12:31 PM Ram  wrote:

> Hi,
>
> We clone our project repository from GIT hub and deployed our web
> application in our development server in the past. The application was
> working fine in the past. Now we merged our new features into the same
> repository which has new models in our models.py. When we merged the
> changes into the development server, we tried running these commands
>
> 1. python3 manage.py makemigrations
>> < no changes detected >
>> 2. python3 manage.py migrate
>> < no migrations to apply >
>> 3. python3 manage.py reset_migrations
>> < all the migrations are created fine including new tables >
>>
>
>  But the issue is Postgres database does not show 2 of those new tables
> and we are not able to find any clue in the postgres database logs other
> than these log lines.
>
> 2020-06-13 02:48:34.627 UTC [7463] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist
>> ..
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 35
>> 2020-06-13 04:03:54.943 UTC [10103] vxxx@v STATEMENT:  SELECT
>> COUNT(*) AS "__count" FROM "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u')
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v ERROR:  relation
>> "pages_rim_classifieds_messages" does not exist at character 475
>> 2020-06-13 04:03:54.965 UTC [10103] vxxx@v STATEMENT:  SELECT
>> "pages_rim_classifieds_messages"."id",
>> "pages_rim_classifieds_messages"."adv_id",
>> "pages_rim_classifieds_messages"."message",
>> "pages_rim_classifieds_messages"."username",
>> "pages_rim_classifieds_messages"."flag",
>> "pages_rim_classifieds_messages"."status",
>> "pages_rim_classifieds_messages"."addedon",
>> "pages_rim_classifieds_messages"."From",
>> "pages_rim_classifieds_messages"."To",
>> "pages_rim_classifieds_messages"."ttle",
>> "pages_rim_classifieds_messages"."delete" FROM
>> "pages_rim_classifieds_messages" WHERE
>> ("pages_rim_classifieds_messages"."To" IS NULL AND
>> "pages_rim_classifieds_messages"."flag" = 'u') LIMIT 21
>>
>>
> I appreciate if someone can give us some clue if we are missing anything?
>
> Best regards,
> ~Ram
>
>
>
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BOi5F0rWEhv9c%3Dc9q_%3D6qwUAFuLwRHVc1sPBTjtKbtkHpuoBQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqm-XF3mnzxrf8-j7BVt1zjDbx1qsot5%2BkjNrDxXAf7kw%40mail.gmail.com.


Re: GSoD 2020

2020-06-19 Thread Integr@te System
Hi Spring,

As you are interested in participating in Season of Docs as a technical
writer, first familiarize yourself with the writer guide at
https://goo.gl/dMVSQ8

and the tech responsibilities at https://goo.gl/BEqo2A

.

Plz take a look:
https://docs.google.com/forms/d/e/1FAIpQLSecVnkiamFJntE1iuguc-UXIQFCKOtKlq4S1o6I1QRjQKv4vQ/viewform


Nice.

On Fri, Jun 19, 2020, 8:07 PM Spring-dot  wrote:

> Please!!! Someone help!!! I know the basics but cannot find project ideas
> for GSoD 2020. Do we have to write our own idea for improving the
> documentation?
>
> On Wednesday, June 17, 2020 at 11:01:09 PM UTC+5:30, Spring-dot wrote:
>>
>> What are the project ideas for contributing to Django for GSoD, 2020?
>> Anyone who can guide me in this? Please Help!!
>> Thanks!
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/31a08f56-e75d-437b-b07f-9e86d2630414o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqyaZzdgcK5QvgZ-rzR_F9514vjgLMYKKhDT7bbGNz34w%40mail.gmail.com.


Re: Populate choices from existing values in a model field

2020-06-20 Thread Integr@te System
Hi Patrick,

Plz review for your suitable case:
https://stackoverflow.com/questions/3742734/django-restart-server-or-httpd

Nice.

On Sat, Jun 20, 2020, 1:32 AM Patrick Carra  wrote:

> I am trying to read distinct values from a model field and use the tuple
> list to populate the choices in a Form.  The problem I have is that every
> time a new value is added I must reset the httpd server in order to include
> the new value in the form.  I have researched and tried this a few
> different ways but so far am unable to come up with a better solution. Any
> ideas?
>
> *models.py*
> class Circuitinfotable(models.Model):
> id1 = models.IntegerField(primary_key=True, blank=True,null=False,
> unique=True)
> pathname = models.CharField(max_length=255, blank=True, null=True)
> segmentname = models.CharField(max_length=255, blank=True, null=True)
> region = models.CharField(max_length=255, blank=True, null=True)
>
>
>
>
>
> *forms.py*
> def getList(item_list, keyValue):
> valueList=[]
> for each in item_list:
> valueList.append(each[keyValue])
> return valueList
>
> def listCreator(field, query):
> newList_query = getList(query, field)
> sorted_newList = sorted(getUnique(newList_query))
> sorted_newList.insert(0, ("", ""))
> return sorted_newList
>
>
> class CircuitinfotableForm(ModelForm):
>
>
> class Meta:
> pathlistQuery = Circuitinfotable.objects.all().values('pathname').
> exclude(pathname=None).exclude(pathname='None')
> path_list = listCreator('pathname', pathlistQuery)
>
>
> model = Circuitinfotable
> fields = ['circuitid', 'pathname', 'segmentname', 'region']
> widgets = {'circuitid': forms.TextInput(attrs={'size':40}),
> 'pathname': forms.Select(choices=path_list), 'segmentname': forms.Select(
> choices=segment_list),
>'region':  forms.Select(choices=region_list)}
>
> I shortened this code to only include some of the relevant fields and code
> for brevity.  Here I created two functions to create a list of tuples for
> pathname from the values I retrieve using a query and pass it to the Select
> widget using choices.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/b63b6f32-0040-42ee-9021-e45657e9caf7o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoZ9u6tC0%2B7Mxx%3D9Cc1mQPmSD_a%2BqJKvwdwEuhE6bCivQ%40mail.gmail.com.


Re: 'Sandboxed' Template engine/context

2020-07-10 Thread Integr@te System
Hi Michael,

Some templates as mako, jinja, genshi...




On Fri, Jul 10, 2020, 4:23 PM Michael Thomas 
wrote:

> Hi all,
>
> Does anyone know of a straightforward way to create an independent
> template engine instance with a subset of the tags/filters/etc. defined?
>
> The use-case is for allowing user-supplied template content, while
> preventing said users from being able to use features that could be
> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %},
> {{my-secret-variable-that-is-loaded-into-global-context}})
>
> Kind Regards,
> Michael
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWopfguN5%3D4K9H6z4LKXL_GSS2iDna8LYc_rkLchQgCjDQ%40mail.gmail.com.


Re: 'Sandboxed' Template engine/context

2020-07-11 Thread Integr@te System
Hi Michael,

Plz look at https://pypi.org/project/django-template-engines/

And see in Django doc for your use case
as very detail with builtin jinja2 engine and must config backend
enviroment to use
https://docs.djangoproject.com/en/3.0/topics/templates/#django.template.backends.jinja2.Jinja2

Hope these useful.




On Sat, Jul 11, 2020, 12:25 PM Michael Thomas 
wrote:

> Hi,
>
> I'm aware that other template engines could be used, but it would be much
> more preferable to stick with Django's template engine for a variety of
> reasons (eg. using the same tags in the 'sandboxed' environment vs.
> regular).
>
> On Friday, 10 July 2020 14:41:30 UTC+4, Integr@te System wrote:
>>
>> Hi Michael,
>>
>> Some templates as mako, jinja, genshi...
>>
>>
>>
>>
>> On Fri, Jul 10, 2020, 4:23 PM Michael Thomas 
>> wrote:
>>
>>> Hi all,
>>>
>>> Does anyone know of a straightforward way to create an independent
>>> template engine instance with a subset of the tags/filters/etc. defined?
>>>
>>> The use-case is for allowing user-supplied template content, while
>>> preventing said users from being able to use features that could be
>>> dangerous, leak information, etc.. (Eg. {% extends %}, {% load %},
>>> {{my-secret-variable-that-is-loaded-into-global-context}})
>>>
>>> Kind Regards,
>>> Michael
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/e8456f7f-e52f-4bf4-95c6-419d84600687o%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/e50f24b3-1e6e-4260-b720-5af5912ae511o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e50f24b3-1e6e-4260-b720-5af5912ae511o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoh8%3DYGiO5fFhM23aKg8r%2BsqytUpSZEhV9ctvQogzqOww%40mail.gmail.com.


Re: help been on that for 5 days, Joining 4 tables on 2 columns

2020-07-17 Thread Integr@te System
Hi Omar,

You can look at this to consider:
https://hakibenita.com/django-group-by-sql

Hope this helpful.



On Sat, Jul 18, 2020, 12:32 AM Omar aboul makarem <
omaraboulmaka...@gmail.com> wrote:

>
> Hey Guys please help
>
> I have Approval model, and i want to calculate the sum of total prices of
> the procedures based on the company and procedure type in each Approval
> *https://www.ppaste.org/pwhJ6u7Dg*
> 
> now i want to get all the prices and
> .aggregate(Sum('price'))['price__sum']) to get the sum of all prices of the
> approvals i have.
> the raw sql for postgresql and if my app is called main is :
> now how can i change this sql to django ORM, in the documentation i read
> about select_related(), and F(), but i dunno how to use it in this case
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/038b6c05-0be2-43b2-8082-f24e08858a92o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpZgzfXpA_JAy4O7CtPRHCGQN7iFb7F9Vwx2qLLCo2Utg%40mail.gmail.com.


Re: Data Science and sql problem

2020-07-27 Thread Integr@te System
Hi Friend,

If you want more option, new t-sql with predict statement directly on db.



On Mon, Jul 27, 2020, 4:25 PM AJ Wattoo  wrote:

> as far i understand you want to connect with postgreSQL database on
> jupyter notebook :
> you can do like this
> 1. install -c anaconda psycopg2 and install -c anaconda sqlalchemy
>
> *2. *from sqlalchemy import create_engine and import pandas as pd
>
> 3. engine=create_engine(‘postgres+psycopg2://postgres:@localhost
> :5432/anyname’)
>
> In thes case *postgres *= name of my databse , ** is my password ,
> *localhost*=host, *port *= 5432, *anyname* = database name
>
> 4. con = engine.connect()
>
> 5. df=*pd.read_sql_query(*SQL queries #whatever you want to get from
> database*)*
>
> and then saving that data in csv
> 6. df.to_csv('file_name.csv')
> On Monday, July 27, 2020 at 6:37:44 AM UTC+2 yame...@gmail.com wrote:
>
>> Try sql alchemy, if you need a full access with many functionality. Other
>> than that, u can connect directly to the database through python. The exact
>> implementation will depend on the database type
>>
>> Le dim. 26 juil. 2020 à 18:15, Gurmeet Kaur  a
>> écrit :
>>
>>> you could try using connection and cursor to connect nd then pandas to
>>> read csv using readcsv function
>>>
>>> On Sun, Jul 26, 2020, 11:59 AM Prashant Singh 
>>> wrote:
>>>
 How can i connect database with help of function in jupyter notebook
 and then conver data into csv to build model ?

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/dd90d45a-dfbf-47a6-86b2-a4e600d4a9c9n%40googlegroups.com
 
 .

>>> --
>>> 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...@googlegroups.com.
>>>
>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/CAEbKJVi%3DPfRdjN7AxWiEb-BuUZ_cjwinBpwrbQ9-iTi7e_hyrQ%40mail.gmail.com
>>> 
>>> .
>>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/97217142-867e-4f5a-9c52-17fa3a6f7ce6n%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr19SEW4L8Or4UswhtXgNQtcTwbdRYkrgYHdELh-JL%2BOQ%40mail.gmail.com.


Re: file format changer

2020-08-02 Thread Integr@te System
Hi Stephen,

If you do still find out any relative information about your question, take
a look in some python standard packages json/xml... then process it or
tools usql tsql in synapse/ spark/bigquery...
Hope it helpful and please see here without your topic.
Tks.

On Sun, Aug 2, 2020, 2:15 AM Kasper Laudrup  wrote:

> Hi John,
>
> On 01/08/2020 19.34, John McClain wrote:
> > Might make sense to convert images to different formats if you have tons
> of them, so not exactly a bad question!
> >
>
> Indeed, that might make sense. If this was a question on how to create a
> web interface in Django for converting images to different formats, it
> would even have been relevant for this mailing list.
>
> The problem is, that was not the question, so I don't see the point in
> trying to guess what other questions might have been relevant.
>
> > Before crushing the guy maybe you could ask what the use case is!
> >
>
> I did try to ask that. I pointed out that the question as it is now
> doesn't make any sense (it doesn't) and see of there was some way of
> formulating a question that would make sense. It might not sound like
> it, and sorry if that's the case, but I'm actually trying to be helpful.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/4eea0fbc-f9ee-ea3d-f21c-72ba66117782%40stacktrace.dk
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWq4Vvt1pbeMtRfCu%3DT7PVgvJqpbOxZR0FkS9dRni_kceQ%40mail.gmail.com.


Re: How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Integr@te System
Hi Michael,

You can read queryset combine with model in modelformset_factory() method
to get exact user and/or any fields you need as existed instance or base on
cookies or sth like that to identify your user, depend on your use case(ex
trigger events or choose one option...). Hope it helpful.



On Fri, Aug 7, 2020, 6:46 PM Michael Klassen  wrote:

> Hello:
>
> I am using modelformset_factory to generate my form based on a model.  If
> the user submits a page, then returns to it later, I would like to populate
> the fields with what they previously answered.  I can only find examples of
> pre-populated fields with the extra forms; is there a way to do this with
> the first form?
>
> Thank you.
>
> --michael
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpRt6Ler6_kViH%3DEz8KELMQ2Ss-Fbdeuw%2B-1Yjf0D7CPA%40mail.gmail.com.


Re: How to populate fields generated by modelformset_factory with data from database

2020-08-08 Thread Integr@te System
Hi Micheal,

https://docs.djangoproject.com/en/3.0/topics/forms/formsets/


You see in doc with example such as custom queryset, initial data get from
existed instances all base on your design and codebase.


On Sat, Aug 8, 2020, 10:48 PM Michael Klassen  wrote:

> Hi, thank you for your response but I need some more specifics.  My
> queryset includes the questions which the form presents to the user.  How
> do I get their responses included in the queryset?  Do I have to somehow
> join tables to get both questions and responses?  If I follow the
> relationships in the queryset, I see that I can filter and find the
> responses, but how do I get Django to fill the form fields with the
> responses?
>
> Thank you!
>
> On Friday, August 7, 2020 at 10:24:21 AM UTC-4, Integr@te System wrote:
>>
>> Hi Michael,
>>
>> You can read queryset combine with model in modelformset_factory() method
>> to get exact user and/or any fields you need as existed instance or base on
>> cookies or sth like that to identify your user, depend on your use case(ex
>> trigger events or choose one option...). Hope it helpful.
>>
>>
>>
>> On Fri, Aug 7, 2020, 6:46 PM Michael Klassen  wrote:
>>
>>> Hello:
>>>
>>> I am using modelformset_factory to generate my form based on a model.
>>> If the user submits a page, then returns to it later, I would like to
>>> populate the fields with what they previously answered.  I can only find
>>> examples of pre-populated fields with the extra forms; is there a way to do
>>> this with the first form?
>>>
>>> Thank you.
>>>
>>> --michael
>>>
>>> --
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/75f5f32d-64f7-4a90-a34e-8d1717ff2828o%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/ec084248-7c27-468a-90a3-c2bf5bc3fc20o%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ec084248-7c27-468a-90a3-c2bf5bc3fc20o%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr1EbtJfeqFhWhWvNfj4Lq8sWKuMLT5qmkKugfd%2B3qO-Q%40mail.gmail.com.


Re: Django server not working on my windows pc

2019-10-17 Thread Integr@te System
Try to check PATH/enviroment variable and permission of project folders

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/3ccb3c59-9f5f-4ea4-a9fd-0cd699ec9ca6%40googlegroups.com.


Re: Arbitrary GROUP BY fields

2019-10-19 Thread Integr@te System
Hi Issuer,

Bc of you use ORDER BY with .date field so it must include in GROUP BY
claude.


On Sat, Oct 19, 2019, 09:09 thinkwell  wrote:

> Thanks for your reply James. I wasn't able to get it to work.
>
> I posted on the new Django forum
> 
> because it's easier to format code examples over there. Hopefully that
> clarifies things more...
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/9d55c47a-c2a9-481e-82b8-d4302f4bec86%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWou9MO-sibuntv-O%2BtM2SD%2BDpWhn0OQboF%3Dupf_z5PR3Q%40mail.gmail.com.


Re: Celery with SQS

2019-10-27 Thread Integr@te System
Hi issuer,

please check:

Warning

If you import models directly rather than using the historical models, your
migrations *may work initially* but will fail in the future when you try to
re-run old migrations (commonly, when you set up a new installation and run
through all the migrations to set up the database).

This means that historical model problems may not be immediately obvious.
If you run into this kind of failure, it’s OK to edit the migration to use
the historical models rather than direct imports and commit those changes.

source:  https://docs.djangoproject.com/en/2.2/topics/migrations/

On Sun, Oct 27, 2019, 03:33 Rogerio Carrasqueira <
rogerio.carrasque...@gmail.com> wrote:

> Hello Jason!
>
> Thanks for your reply, it is not so easy to move from 1.4.22 to 2.2,
> it a big leap. I can upgrade the celery to 4.3, but I don't know if it
> will work well with Django 1.4.22. Do you have a clue about what could
> be this issue?
>
> Thanks
>
>
> Rogério Carrasqueira
>
>
>
>
> Em sáb, 26 de out de 2019 às 16:40, Jason 
> escreveu:
> >
> > both those versions are severely out of date, so I would first suggest
> to update.  current version of celery is 4.3, and django is 2.2.  If you
> have reasons to move from rabbit to SQS, why not update everything else
> while you're at it?
> >
> >
> > --
> > 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 the web visit
> https://groups.google.com/d/msgid/django-users/419fedc2-a953-4a2f-a24e-560fbf3bd9ad%40googlegroups.com
> .
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CACX1ULTi0omhsEprv-Eo6VVDO5f-S7VDThaVh7LxGcbH7zGqLQ%40mail.gmail.com
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqCtL5EFxhY5d8zMw8XkviaD2%2BhcGxPFdXZchqa9wbReg%40mail.gmail.com.


Re: Upgrading Django from 2.1 to 2.2 - strings are not translated

2019-11-01 Thread Integr@te System
Hi issuer,

Plz check
https://docs.djangoproject.com/en/2.2/topics/auth/passwords/#password-validatio4n

On Fri, Nov 1, 2019, 14:46 אורי  wrote:

> Hi,
>
> Take a look at this ticket:
> https://code.djangoproject.com/ticket/30939
>
> This issue prevents me from upgrading Django to 2.2. Currently everything
> works with Django 2.1 but not with Django 2.2.
>
> אורי
> u...@speedy.net
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CABD5YeFaZsFg9kGC4RWwY73KkczPinVW7fNbOiaKHgNfbSLjjQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqtzz3qHV%2B9pkbGw6S5VVsgVF5-J-6md9-BAQDpPFZ1yw%40mail.gmail.com.


Re: How to use session in django

2019-11-03 Thread Integr@te System
https://docs.djangoproject.com/en/2.2/topics/http/sessions/#configuring-sessions

On Sun, Nov 3, 2019, 09:10 Amit Agarwal  wrote:

> Helo everyone,
>
> I am making a post request to the server from client.py. I am getting
> error forbidden csrf cookie not set.
>
> What is the correct way to use session?
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/703a7b26-dbeb-43ba-83c8-66dab79afb1b%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo%2BVLcZ0hOeZM%3DZwckHxxQQdLypn8VsepvNYWoE4aZ8ww%40mail.gmail.com.


Re: Django-Channels with 2 applications

2019-11-04 Thread Integr@te System
Hi Idea man,

You can acknowlegdes and try it:

https://channels.readthedocs.io/en/latest/


On Mon, Nov 4, 2019, 19:11 Daniel Carvalho  wrote:

> Hello!
>
>
> I'm trying to make an example to test if it is possible to have 2
> independent django apps connected to the same channel from django-channels.
> So far, I was able to make an example running on one machine and 2 other
> machines being able to access the first via a client. But the goal is to be
> able to connect separate applications in a single channel to communicate.
> Is that possible?
>
>
> *Note*: I'm also using redis, if that helps.
>
>
> Thank you!
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/88f3d63e-273d-4bbf-9ebe-f7ca348c7c18%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqYCa3Fw2tt-m2y4rDDeAc3QZg3pHZq1d7JLwV%2B9-pFPQ%40mail.gmail.com.


Re: FileField in custom field

2019-11-05 Thread Integr@te System
Hi Issuer,

please see:
In your settings file, you’ll need to define MEDIA_ROOT
 as
the full path to a directory where you’d like Django to store uploaded
files. (For performance, these files are not stored in the database.)
Define MEDIA_URL
 as
the base public URL of that directory. Make sure that this directory is
writable by the Web server’s user account.

https://docs.djangoproject.com/en/2.2/ref/models/fields/

And more check in this content.



On Tue, Nov 5, 2019, 20:01 Simonas Pilkauskas <
simonas.pilkaus...@hotmail.com> wrote:

> Hello,
> I want to setup a Model like this
> ,
> but apparently FileField in custom field doesn't work out of box (when
> trying to save, I get the error "can't adapt type 'TemporaryUploadedFile'").
> FileField, which is directly in Model, works fine.
> I've tried what came to my mind, but I'm relatively new to Django and
> can't figure out myself.
> Could anyone help me?
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/c34d85b3-78d6-4d89-804f-b1cf2f77c2e5%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpeBwxThE6wqjRbeK%2BZaKm0Z65zosw1gWKP0E0%3Doh2xdA%40mail.gmail.com.


Re:

2019-11-05 Thread Integr@te System
plz go to check send mail module.

On Wed, Nov 6, 2019, 01:05 Paras Jain  wrote:

> bro i was asking the code how to use it to send , email and password  to
> particular email
>
> On Tue, Nov 5, 2019 at 6:30 PM Suraj Thapa FC 
> wrote:
>
>> Send it then
>>
>> On Tue, 5 Nov 2019, 5:38 pm Paras Jain,  wrote:
>>
>>> on hitting submit i have to send email and password to user email id
>>> which will be used for login in django
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/CAMtmBS8KETpX74D8nRpPiDdnb_GYSeHYGgc3c_6TVgA15dKa4g%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAPjsHcFZSKeebvqZe7_Eyiz5gJF6dmBv9o-S6ef5rqLVj5SSjw%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAMtmBS8_j%2BONi43MO1%3DJEjbqktOaedYfV7ZDHtHNLRgvn7Gb7w%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr7gQV_oG3psE7vaMGJxvmPnDe-LF8ZTH99nH0o1V72aA%40mail.gmail.com.


Re: ElementTree problem saving images

2019-11-06 Thread Integr@te System
Hi Issuer,

Plz select options :
1. Follow someone else convert xml to dict, and then process forward.
2. See this document python DOM XML doc, especial in 20.6.2.3 section
https://docs.python.org/3.6/library/xml.dom.html#domimplementation-objects

see nodelist.item(i) and __getitem__() method.

On Wed, Nov 6, 2019, 18:13 Nuno Vieira 
wrote:

> Thanks for your feedback.
>
> The problem is if i set all the urls to None before, and a property have
> only 6 images of 20, on database saves the 6 images of this property and
> saves also the other image columns with images from a different property,
> but when i use the else blocks instead of setting all to None before the
> loop, it only saves the first (nr 1) and the last image (nr 6) of the
> property.
> I have no idea why this behavior.
>
> I really need some help.
> Thanks.
>
> sexta-feira, 25 de Outubro de 2019 às 01:01:45 UTC+1, Arthur Antoine
> escreveu:
>>
>> The image urls are being set to None on every iteration where the id
>> doesn't match. Try setting all of the urls to None before the loop, then
>> remove the else blocks.
>>
>> On Thursday, October 24, 2019 at 11:28:00 AM UTC-4, Nuno Vieira wrote:
>>>
>>> Hi,
>>>
>>> i receive an xml file and i am parsing the values and sving them to
>>> database.
>>>
 XML Example:
>>>
>>> ...
>>> ...
>>> ...
>>> 
>>> 9896
>>> 2019-07-11 13:12:09
>>> BC30401
>>> 895000
>>> EUR
>>> sale
>>> 0
>>> 0
>>> 0
>>> 
>>> 915
>>> 
>>> Villa
>>> 
>>> 37.134720
>>> -8.020436
>>> 
>>> optional location detail
>>> Vilamoura
>>> Algarve
>>> Portugal
>>> 4
>>> 3
>>> 1
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7064.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7065.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7066.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7067.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7068.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7069.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7071.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7072.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7073.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7075.jpg
>>> 
>>> 
>>> 
>>> 
>>> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7077.jpg
>>> 
>>>
 
>>>
>>>
>>> It´s all working ok but with images its a litle confused because i can
>>> only save the first and the last image. If a property have 12 pictures i
>>> can only save the picture nr 1 and picture nr 12, if the property have 8
>>> pictures i can only save picture nr1 and picture nr 8. It´s weird!
>>>
>>> My code to get the pictures url:
>>> img = props.find('images')
>>>
>>> for child in img:
>>>
>>> if child.get('id') == '1':
>>>img_main_url = child.find('url'
>>> ).text
>>>
>>>if child.get('id') == '2':
>>>
>>>img_1_url = child.find('url'
>>> ).text
>>>else:
>>>img_1_url = None
>>>if child.get('id') == '3':
>>>img_2_url = child.find('url'
>>> ).text
>>>else:
>>>img_2_url = None
>>>if child.get('id') == '4':
>>>img_3_url = child.find('url'
>>> ).text
>>>else:
>>>img_3_url = None
>>>if child.get('id') == '5':
>>>img_4_url = child.find('url'
>>> ).text
>>>else:
>>>img_4_url = None
>>>
>>>
>>> I could use a litle help from someone more experienced in django.
>>>
>>> Thanks for your help
>>>
>>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/249cb5ad-668e-4fe9-aa54-f55c9e3a8ae6%40googlegroups.com
> 
> .
>

-- 
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 

Re: Problem: Ajax post method to django views

2019-11-08 Thread Integr@te System
Hi Issuer,

Plz check doc and do accordingly:
Section Setting the token on the AJAX request
https://docs.djangoproject.com/en/dev/ref/csrf/#ajax

On Sat, Nov 9, 2019, 05:23 Mikko Meronen 
wrote:

> Hi,
>
> I have a problem to pass a json value to Django views and use the value to
> retrieve data from my database. Anyone could help me?
>
> I get the ajax error message and the following error in chrome console:
> jquery.js:8475 POST http://www.topithenewsdoggy.com/history/ 403
> (Forbidden)
>
> *views.py*
>
> def History(request):
>
> md = request.POST.get('jsonData')
> historia1 = history.objects.filter(monthday__exact=md)[:1]
> args = {'historia1':historia1}
> return render(request, "news/history.html", args)
>
>
> *history.html:*
>
> http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js";>
> 
>
> var x = new Date();
> var m = x.getMonth() + 1;
> var d = x.getDate();
> var monthdate = m + '-' + d;
>
> var jsonData = JSON.stringify(monthdate);
>
> $.ajax({
> type: "POST",
> url: '/history/',
> data: { jsonData },
> dataType : "json",
> success: function () { alert("Success"); },
> error: function () alert("Error"); }
> });
>
>
>
> // CSFR
>
> function getCookie(name) {
> var cookieValue = null;
> if (document.cookie && document.cookie !== '') {
> var cookies = document.cookie.split(';');
> for (var i = 0; i < cookies.length; i++) {
> var cookie = cookies[i].trim();
> // Does this cookie string begin with the name we want?
> if (cookie.substring(0, name.length + 1) === (name + '=')) {
> cookieValue =
> decodeURIComponent(cookie.substring(name.length + 1));
> break;
> }
> }
> }
> return cookieValue;
> }
> var csrftoken = getCookie('csrftoken');
>
> function getCookie(name) {
> var cookieValue = null;
> if (document.cookie && document.cookie !== '') {
> var cookies = document.cookie.split(';');
> for (var i = 0; i < cookies.length; i++) {
> var cookie = jQuery.trim(cookies[i]);
> // Does this cookie string begin with the name we want?
> if (cookie.substring(0, name.length + 1) === (name + '=')) {
> cookieValue =
> decodeURIComponent(cookie.substring(name.length + 1));
> break;
> }
> }
> }
> return cookieValue;
> }
>
> var csrftoken = getCookie('csrftoken');
>
> function csrfSafeMethod(method) {
> // these HTTP methods do not require CSRF protection
> return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
> }
> $.ajaxSetup({
> beforeSend: function(xhr, settings) {
> if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
> xhr.setRequestHeader("X-CSRFToken", csrftoken);
> }
> }
> });
> 
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/2e129166-4262-4c39-b4d8-517dd9249f1a%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoYOsU%3D8uhyoLFBfyvxHhF8xjSt8DRG4G1fWD9ftTCWZw%40mail.gmail.com.


Re: Microservice with django

2019-11-09 Thread Integr@te System
Hi Freinds,

start rightnow by use djangorestframework

On Sat, Nov 9, 2019, 17:15 Uzama Zaid Mohammed Jaward 
wrote:

> 1. If your application going for production, then don’t start with
> Microservices. Microservices used to scale up your application in
> horizontally as well as there are other some benefits like each service can
> build with small amount of team, therefore maintaining and testing is
> pretty easy. If you write your application in Microservices you should have
> strong Devops to maintain.
>  So start with monolithic and later you can change to microservices when
> you need to scale your application.
>
> 2. If you just need to use micro service architecture in your college
> projects then you can use docket for running each services. You can
> exchange data between services using REST APIs. Also you can use Kubernetes
> for docker container management. Also you use message brokers to
> communicate between services where one can publish and others can
> subscribe. For the message broker try Apache Kafka.
>
> This is my suggestion. There are plenty of blog post available on the
> internet
>
>
> On Sat, Nov 9, 2019 at 14:39, Shaheed Haque 
> wrote:
>
>> At the end of the day, assuming you combine the Django "application
>> server" with a REST wrapper, you can build any level or type of service you
>> could want.
>>
>> The crucial question is how you want to trade off the power of the ORM
>> against custom code? For example, let's say you wrapped every single table
>> (Django model) in a separate "nano"service... Then you could not use sql to
>> Jon or select anything and everything would be custom code.
>>
>> OTOH, if you put everything in a single service, you can freely use the
>> ORM but loose whatever advantage you hope to fain from the modularity of
>> soa.
>>
>> Hth, Shaheed
>>
>> On Fri, 8 Nov 2019, 20:22 salimon jamiu olashile, <
>> tunedae1shi...@gmail.com> wrote:
>>
>>> I’ve a group project to work on. It’s a bug tracking system & we decided
>>> to go with a microservice architecture which is the best solution for the
>>> assumed business scenario. I am to build the Reporting functionality as a
>>> seperate service.
>>>
>>> On Fri, 8 Nov 2019 at 7:26 PM, Murilo A. Gigliotti <
>>> mur...@gigliottitech.com.br> wrote:
>>>
 All,

 Good question! I would like more details... Thank you!



 Rgds,

 _

 Murilo Gigliotti,

 *[image: Odoo icone2] Odoo Business Partner*

 Mais informações visite http://www.gigliottitech.com.br/



 *De:* django-users@googlegroups.com [mailto:
 django-users@googlegroups.com] *Em nome de *Salim Kachemela
 *Enviada em:* sexta-feira, 8 de novembro de 2019 15:04
 *Para:* django-users@googlegroups.com
 *Assunto:* Re: Microservice with django



 I was wondering the same thing



 On Fri, 8 Nov 2019, 20:15 salimon jamiu olashile, <
 tunedae1shi...@gmail.com> wrote:

 Hello all,



 How can I build a Django project/app that follow the microservice
 architecture?



 Looking to be pointed in the right direction.



 Best regards.



 --
 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 the web visit
 https://groups.google.com/d/msgid/django-users/CAFhdOCNZ%2BR084HQc1FD5a%2BT%3D_umuH87haQbe%3DyD2aAT6SKtUsg%40mail.gmail.com
 
 .

 --
 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 the web visit
 https://groups.google.com/d/msgid/django-users/CACB6%2B1-9tNHnZ8X7U_EwqQx6%2B_msMhThvOif2RBuEuNbY3QVXQ%40mail.gmail.com
 
 .

 --
 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 the web visit
 https://groups.google.com/d/msgid/django-users/055701d59661%24ed290420%24c77b0c60%24%40com.br
 
 .

>>>

Re: Help

2019-11-09 Thread Integr@te System
Hi Issuer,

doConda clean --alland conda update anaconda
According to https://github.com/conda/conda/pull/6082

On Sat, Nov 9, 2019, 02:25 Fasetire Babatunde Gbolahan 
wrote:

> conda.core.link:_execute_actions(337): An error occurred while installing
> package 'anaconda::sqlparse-0.3.0-py_0'. CondaError: Cannot link a source
> that does not exist. C:\Users\fashflash\Anacond a3\Scripts\conda.exe
> Running `conda clean --packages` may resolve your problem. Attempting to
> roll back. CondaError: Cannot link a source that does not exist.
> C:\Users\Name of Computer\Anacond a3\Scripts\conda.exe
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/9b9e30ac-3bf6-4071-ae8d-3748ceec6b34%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr1Mz_AefdD_RZfBt2Lwk5sR15w86tC1BuaCYWOyYxGAw%40mail.gmail.com.


Re: Issue with unique key error on Many to Many field

2019-11-10 Thread Integr@te System
Hi Issuer,

Check your tracker_passenger.
https://docs.djangoproject.com/en/2.2/ref/models/fields/#django.db.models.ManyToManyField


On Sun, Nov 10, 2019, 21:40 Malibu  wrote:

> Hi there.  I've been doing Django for awhile but I am stumped on this
> one..  I have a many to many relationship with a 'through' definition
>
> main.models:
>
> class Client(models.Model):
> uid = models.CharField(max_length=128, unique=True)
> key = models.CharField(max_length=128)
> img = models.TextField()
> version = models.CharField(max_length=20)
> lastConnection = models.DateTimeField()
> role = models.CharField(max_length=128,default="")
>
>
>
> tracker.models:
>
> from main.models import Client
>
> class PassengerAccess(models.Model):
> passenger = models.ForeignKey('Passenger',on_delete=models.CASCADE)
> client = models.ForeignKey(Client,on_delete=models.CASCADE)
> created = models.DateTimeField(auto_now_add=True,blank=True)
> selected = models.BooleanField(default=False)
>
> class Passenger(models.Model):
> first_name = models.CharField(max_length=50)
> last_name = models.CharField(max_length=50)
> access_code = models.CharField(max_length=32)
> school_division = models.ForeignKey(SchoolDivision)
> open_clients = models.ManyToManyField(Client, through='PassengerAccess')
>
>
> The error I get when I try to migrate is: django.db.utils.ProgrammingError: 
> there is no unique constraint matching given keys for referenced table 
> "tracker_passenger"
>
> Any solution to this error appears to be related to a foreign key that is 
> referencing a field that is not unique, but in this case passenger and client 
> should both be accessing the primary key should they not?  I always use plain 
> integer primary keys.
>
> Any suggestions on how to troubleshoot this would be appreciated.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/db29f623-eecd-4b58-8b70-d2fcd063aaaf%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr3kVimTG1NE80iBFr4kNPyhEyfcTN39fGo%2BAAmv7O%3DnQ%40mail.gmail.com.


Re: djangorestframework vs GraphQL

2019-11-12 Thread Integr@te System
Hi Freinds,

GQL, when compare DRF, it as an option, and for whom familiar with other
tools without DRF or Python, and align thinking with framework/anythingelse
relate to JS.
Base on your choice or requirement.

On Tue, Nov 12, 2019, 16:24 Nick Sarbicki  wrote:

> GraphQL strikes me as very similar to NoSQL.
>
> Useful in niches but the older standard is better in general.
>
> I've tried both and the added complexity (designing a system to generate
> all required data from a single request) of GraphQL for the, seemingly
> minor, gain (a single request for all your data) doesn't enthuse me.
>
> It's an interesting solution to a problem I've never really had. Not to
> say it isn't useful in some situations, I just haven't yet encountered a
> situation where it is.
>
> - Nick
>
>
> On Tue, Nov 12, 2019 at 9:14 AM guettli  wrote:
>
>> Hi,
>>
>> I am new to GraphQL, but I like the idea very much.
>>
>> There is already an A Django integration for Graphene:
>> https://github.com/graphql-python/graphene-django
>>
>>
>> What are the pros and cons of djangorestframework and GraphQL?
>>
>> Which one would you choose, if you could start from scratch?
>>
>> Regards,
>>   Thomas Güttler
>>
>> PS: I am always looking for feedback for my guidelines:
>> https://github.com/guettli/programming-guidelines
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/f5dd3fea-28ab-4b01-9e07-0819b4bb91cb%40googlegroups.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAGuvt90HG0OE9kV9axHvkFx8xfa7qD41HdV3tuoupSKYjdG9ew%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpTahk-C8dqT7Y4aqgCC6r8GzCtJX_iKZLrjdDaLOsftQ%40mail.gmail.com.


Re: Multi-Tenancy MySQL Database in Django

2019-11-12 Thread Integr@te System
https://github.com/citusdata/django-multitenant

welcome

On Tue, Nov 12, 2019, 19:30 Senthil Kumar  wrote:

> We are going to do a SAAS based application for our existing application.
> We need to integrate the Multi-Tenancy database using MySQL in this
> application. Please suggest any predefined packages available in Django.
> For example, company1.domain.com,company2.domain.com,company3.domain.com.Here
> Company1, Company2, Company3 are databases already created at the time of
> the company creation. Using the subdomain name the database needs to
> selected by Django common application. Other models are the same for all
> companies.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1a7fe1af-6fa5-4639-8289-b9975b98b4a5%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrJJzjg4bcw8AE1nKFUeeESBSPJ3qqJ687wu7pHLVbfjQ%40mail.gmail.com.


Re: tengo un problema a la hora de hacer deploying django app to heroku

2019-11-14 Thread Integr@te System
Hola por favor revisa

https://devcenter.heroku.com/articles/buildpacks#detection-failure

On Thu, Nov 14, 2019, 09:02 jose angel encinas ramos <
encinasj.an...@gmail.com> wrote:

> mas que nada el poblema que tengo es técnico , el detalle es que cuando
> escribo en la terminal git push heroku master me lanza el siguiente error y
> no entiendo cual es el error.
>
> (webapps) ➜  BuscadorTims git:(master) ✗ git push heroku master
> Counting objects: 221, done.
> Delta compression using up to 8 threads.
> Compressing objects: 100% (203/203), done.
> Writing objects: 100% (221/221), 2.02 MiB | 1002.00 KiB/s, done.
> Total 221 (delta 60), reused 0 (delta 0)
> remote: Compressing source files... done.
> remote: Building source:
> remote:
> remote: -> App not compatible with buildpack:
> https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
> remote:More info:
> https://devcenter.heroku.com/articles/buildpacks#detection-failure
> remote:
> remote:  ! Push failed
> remote: Verifying deploy...
> remote:
> remote: ! Push rejected to entregastim.
> remote:
> To https://git.heroku.com/entregastim.git
>  ! [remote rejected] master -> master (pre-receive hook declined)
> error: failed to push some refs to 'https://git.heroku.com/entregastim.git
> '
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/458db1d6-0a14-498b-b938-76ecfb4a8e40%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWp50%2BmzcA9h3OMbTiEHWsb3kmENKgPJwqy0-Dg3O-H-%2Bg%40mail.gmail.com.


Re: django passing a parameter for a view in a url produces Error: Circuitinfotable matching query does not exist.

2019-11-14 Thread Integr@te System
Hi Informer,
check you model Circuitinfotable,
Method call must include object instance as argument.


On Thu, Nov 14, 2019, 21:42 Patrick Carra  wrote:

> I am passing a parameter in a url to another view and during the process
> it gets changed.  An original parameter example that produces the error
> is OQYX/173774//ZYO but gets changed to '/viewLit/OQYX/173774/ZYO/' It
> drops the second / between 173774 and ZYO. I assumed this was because it
> was treating it as an escape character? So I tried adding an r in the
> urls.py file but it did not have any effect. Here is my template code for
> the page that generates the hyperlink:
>
> 
> 
> 
> Circuits
> 
> h1 {
> color:blue;
> }
> h4 {
> color:red;
> }
> .tabledata {
>   background: #395870; color:#fff;
> }
> .tablerow:nth-child(even) {
>   background-color: #f2f2f2;
> }
> .form{
>   width:100%;
> }
> .field {
>   background: #white; float: left; margin: 1%; width: 200;
> }
> 
> {% block content %}
>   Search Lit Circuits
> Enter your search criteria below:
> 
> 
>   
> Circuit ID: "circuitid" maxlength="100">
> Bandwidth: "bandwidth" maxlength="100">
> Region: "region" maxlength="100">
>   
>   
> Carrier: "carrier" maxlength="100">
> Status: "status" maxlength="100">
> Segmentname: ="segmentname" maxlength="100">
>   
>   
> MRC: "mrcnew" maxlength="100">
>   
> 
> Search
> 
> 
>   
> 
> {{ filter.qs.count }} circuits returned
> 
>   
> 
>   
> 
>   {% if user.is_authenticated %}
> Edit/
>   {% endif %}
> View
> 
> CircuitID
> Bandwidth
> Region
> Carrier
> Status Segmentname MRC   
> {% for circuit in filter.qs %}  
> {% if user.is_authenticated %}  target="_blank" class="edit-item" title="Edit">Edit {% endif %}  href="/viewLit/{{ circuit.circuitid }}" target="_blank" class="view-item"
> title="View">View  {{ circuit.circuitid }} {{
> circuit.bandwidth }} {{ circuit.region }} {{
> circuit.carrier }} {{ circuit.status }} {{
> circuit.segmentname }} {{ circuit.mrcnew }}  {% endfor
> %} {% endblock %} 
>
>
> My project level urls.py file:
> """ciopsdb URL Configuration
>
> The `urlpatterns` list routes URLs to views. For more information please
> see:
> https://docs.djangoproject.com/en/2.2/topics/http/urls/
> Examples:
> Function views
> 1. Add an import:  from my_app import views
> 2. Add a URL to urlpatterns:  path('', views.home, name='home')
> Class-based views
> 1. Add an import:  from other_app.views import Home
> 2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
> Including another URLconf
> 1. Import the include() function: from django.urls import include, path
> 2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
> """
> from django.contrib import admin
> from django.urls import path, include
> from django.conf.urls import url
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('', include('homepage.urls')),
> path('searchlit/', include('searchLit.urls')),
> path('viewLit/', include('viewLit.urls')),
> ]
>
>
> My viewLit app's urls.py
>
> from django.urls import path, include
> from django.conf.urls import  url
> from . import views
>
> urlpatterns= [
>  path(r'/', views.viewLit, name='viewLit'),
> ]
>
>
> My viewLit app's views.py
>
> from django.shortcuts import render
> from django.http import HttpResponse
> from django.views.generic import TemplateView
>
> from . models import Circuitinfotable, Budgettable, Xcinventorytable
>
> # Create your views here.
> def viewLit(request, circuitid):
> record = Circuitinfotable.objects.get(circuitid=circuitid)
> template = 'viewLit/viewCircuit.html'
> context = {'record':record}
> return render(request, template, context)
>
>
> The traceback that I receive as an error:
>
> Traceback:File 
> "/home/db_user/ciopsdb/venv/lib64/python3.6/site-packages/django/core/handlers/exception.py"
>  in inner  34. response = get_response(request)File 
> "/home/db_user/ciopsdb/venv/lib64/python3.6/site-packages/django/core/handlers/base.py"
>  in _get_response  115. response = 
> self.process_exception_by_middleware(e, request)File 
> "/home/db_user/ciopsdb/venv/lib64/python3.6/site-packages/django/core/handlers/base.py"
>  in _get_response  113. response = wrapped_callback(request, 
> *callback_args, **callback_kwargs)File 
> "/home/db_user/ciopsdb/viewLit/views.py" in viewLit  9. record = 
> Circuitinfotable.objects.get(circuitid=circuitid)File 
> "/home/db_user/ciopsdb/venv/lib64/python3.6/site-packages/django/db/models/manager.py"
>  in manager_method  82. return getattr(self.get_queryset(), 
> name)(*args, **kwargs)File 
> "/home/db_user/ciopsdb/venv/lib64/python3.6/site-pa

Re: reg: creating blog topic in database

2019-11-16 Thread Integr@te System
Hi Issuer

Follow to part 3 - 4 and check docs for some thing else around you need

https://docs.djangoproject.com/en/2.2/ref/templates/language/
https://docs.djangoproject.com/en/2.2/intro/tutorial04/

On Sat, Nov 16, 2019, 16:40 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hello All,
>
> I have created the two models to create post on desired topic, as well as
> to get the comments from the visitors. But, I am not able to figure out,
> how to connect that model to my HTML page.
>
> I know how to create a static HTML pages for each topic,and write page
> content in  tags. which I have been thinking to do until now, but it
> seems to be a time taking and non-productive way. So, now I would like to
> write posts in my database model which I have registered in admin.py.
>
> Any idea, how can I achieve this, as this would be a like generating
> dynamic HTML pages based on models.
>
> I am not sure if I was able to explain my requirements. May be as I am not
> getting right words to express them. Please ask me questions if any
> confusion, I will try to answer them.
>
> Below is my models.py
>
> from django.db import models
> from django.utils import timezone
> from django.contrib.auth.models import User
>
>
> class Post(models.Model):
> STATUS_CHOICES = (
> ('draft', 'Draft'),
> ('published', 'Published'),
> )
> title = models.CharField(max_length=250)
> slug = models.SlugField(max_length=250, unique_for_date='publish')
> author = models.ForeignKey(User, related_name='blog_posts', 
> on_delete=models.CASCADE)
> body = models.TextField()
> publish = models.DateTimeField(default=timezone.now)
> created = models.DateTimeField(auto_now_add=True)
> updated = models.DateTimeField(auto_now=True)
> status = models.CharField(max_length=10, choices=STATUS_CHOICES, 
> default='draft')
>
> class Meta:
> ordering = ('-publish',)
>
> def __str__(self):
> return self.title
>
>
> class Comment(models.Model):
> post = models.ForeignKey(Post, related_name='comments', 
> on_delete=models.CASCADE)
> name = models.CharField(max_length=80)
> email = models.EmailField()
> body = models.TextField()
> created = models.DateTimeField(auto_now_add=True)
> updated = models.DateTimeField(auto_now=True)
> active = models.BooleanField(default=True)
>
> class Meta:
> ordering = ('created',)
>
> def __str__(self):
> return self.email
>
> Regards,
> Amitesh
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1799372727.1057468.1573897086523%40mail.yahoo.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr7Tt14R-o8Jz0_mAZYV2KeDm5CkwBfqQBm9T8PkjaC%3Dw%40mail.gmail.com.


Re: Request

2019-11-16 Thread Integr@te System
Hi Guy,

Plz see community with people for help in specific problem by sharing
knowledges or contract with selected person for your project then get help
here.

On Sat, Nov 16, 2019, 19:27 Motaz Hejaze  wrote:

> Search man
>
> On Sat, 16 Nov 2019, 1:39 pm Tosin Ayoola,  wrote:
>
>> Hey guy, need a little help on developing a school management system
>> project, can I get a github repo link,  to get little help
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAHLKn72828L84ELxosumJ2UxcujJrNmwfbe-wNJkroN_uZiR%2Bg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-cCm9KqDYAjfz%3DwY-ntuE_BNKgOfy1KdP6RLP106t1UpA%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWq_ZPEO23hjtRucrDuJdeV5y3SEp1RVtLLfpDZEaoi_QQ%40mail.gmail.com.


Re: Boto3, aws, workdocs

2019-11-21 Thread Integr@te System
hi eager man,
follow your need.
https://boto3.amazonaws.com/v1/documentation/api/latest/index.html

On Thu, Nov 21, 2019, 19:32 Yann Mbella  wrote:

> Hey guys need help in usage of this service boto3 with workdocs if someone
> has a link of any tutorial please help urgent
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/41e64a69-f2dd-448d-8688-9bbfc1af%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWp6vYJNRmR%3DatsuXYhFtKV%3D%2BozK%3DSubjgu_17M7rD02gw%40mail.gmail.com.


Re: Internal error 500

2019-11-24 Thread Integr@te System
Hi Issuer,

Plz check ALLOWED_HOSTS require in publish site



https://docs.djangoproject.com/en/2.2/releases/1.5/#allowed-hosts-required-in-production


https://stackoverflow.com/questions/15128135/setting-debug-false-causes-500-error



On Sun, Nov 24, 2019, 02:43 Kasper Laudrup  wrote:

> Hi Josiah,
>
> On 23/11/2019 20.14, Josiah Umezurike wrote:
> >
> > I have done all I could on this but my site cannot display but port 
> > which is gitlab.apilokdon.comAny help or direction to the positive
> > side will be great. Thanks.
> >
>
> Looking at your screenshots, it seems like you have a syntax error at
> line 11 of your settings.py file.
>
> Maybe post your settings.py file if the error is not obvious?
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/470d007e-67b2-33c7-aaac-d187b9f00af8%40stacktrace.dk
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrqBgQy5rp2wW82S8LRadoR1Yz_YMg0M%2BAjB2Qm9YpKaQ%40mail.gmail.com.


Re: Help

2019-11-24 Thread Integr@te System
Hi Issuer,

plz check your syntax of code block or assignment object pass to function
as arg to program see  .clean_data attribute.


On Sun, Nov 24, 2019, 22:29 Tosin Ayoola  wrote:

> If I remove the .cleaned_data so how do I include the parameter for the
> filter?
>
> On Nov 24, 2019 16:05, "Paras Jain"  wrote:
>
>> remove from .cleaned data part
>>
>> On Sun, Nov 24, 2019 at 8:03 PM Tosin Ayoola 
>> wrote:
>>
>>> Halo guyz,  working on a school management system,  and I created a view
>>> that filter & display the assignment given to a particular class,  but
>>> instead I'm getting a "assignment_form has no attributes cleaned_data"
>>> error message what am I doing wrong, can anyone help out below is d view
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/CAHLKn73k%3DUKJ0prRjpGhnxazUdsJXDAuNdqAJZLgdDsLy43eew%40mail.gmail.com
>>> 
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAMtmBS8F59pre87v9OMg6b2RCn3mhL_4SoC17oqRnQwE%3Dx%3DePg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAHLKn72KdtBeR59XDZNxZoLX810Ehmvz_eCUpfMB0a1PBv7REQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo1wtwkSKX71-46pjjUjrnOgunnK5OPMV6vkeD916x0LQ%40mail.gmail.com.


Re: How to develop distributed file transfer app based on ftp using python

2019-11-24 Thread Integr@te System
u can go to django doc that have every thing necessary.

On Sun, Nov 24, 2019, 23:43 JOE BASS  wrote:

> Please I need help on how I can develop distributed file transfer app
> based on ftp using python has the back end together with mysql
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/4f19b129-8927-4a9f-8116-0ae7118b3df0%40googlegroups.com
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWp1dFOfpWmU8yoyPeCDM%3Den%3DEJLWOJ_H3pj6sszt%3DVC%3Dw%40mail.gmail.com.


Re: Internal error 500

2019-11-25 Thread Integr@te System
Hi friend,

Inspect backward to previous error how you customized and see change in log
system of backend srv.
U can attemp to run localhost first.

On Mon, Nov 25, 2019, 20:29 Josiah Umezurike <
pcintegral.pcintegr...@gmail.com> wrote:

> I was able to fix those now I have this error.
>
>
> On Saturday, November 23, 2019 at 2:14:31 PM UTC-5, Josiah Umezurike wrote:
>>
>> I was configuring django few days ago it seems that all went well. Then I
>> started getting internal error 500.
>>
>> my domain is apilokdon.com or www.apilokdon.com
>>
>> I am not sure what is happening: I check nginx_config, wsgi_params and
>> /etc/hosts
>>
>> I can't see any error on configuration but when I run.
>>
>> python manage.py runserver
>>
>>
>> python manage.py check
>>
>>
>>
>> check if nginx runs:
>>
>>
>> My gitlab site works. So I am not sure if it nginx or uwsgi
>>
>> I went into the virtual env and ran.
>> uwsgi --ini [app name].ini
>>
>> I checked my site nothing is working now: No more internal server error
>> but site is not displaying.
>>
>>
>>
>>
>>
>> I have done all I could on this but my site cannot display but port 
>> which is gitlab.apilokdon.comAny help or direction to the positive side
>> will be great. Thanks.
>>
>>
>>
>>
>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/e15983ac-7fa3-484a-8d4d-dd75a65f839f%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr5XJ1bqSjZ_6AgosWnu__RLMkFz47spj0WshzzRKZeMQ%40mail.gmail.com.


Re: How to fix this - ERROR: Failed building wheel for mysqlclient

2019-11-25 Thread Integr@te System
Hi man,

Clear cache and try other method to requisite install.

On Sun, Nov 24, 2019, 06:28 Ram  wrote:

> Hello Kasper,
>
> I tried installing libssl1.1 globally and then tried mysqlclient install
> in virtualenv, but the result is the same and mysqlclient is still failed
> with same error.
>
> Thanks
> ~Ram
>
> On Sat, Nov 23, 2019 at 3:59 PM Kasper Laudrup 
> wrote:
>
>> Hi Ram,
>>
>> On 23/11/2019 23.48, Ram wrote:
>> > Hi, I’m running into this blocking issue while setting up Django with
>> > MySQL database. I’m pasting here what I tried so far on Ubuntu 18.04 OS.
>> >
>> > |/(vkdev)user@ubuntu-he:~/testproject$ pip install mysqlclient
>> > Collecting mysqlclient Using cached
>> >
>> https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz
>> > Building wheels for collected packages: mysqlclient Building wheel
>> > for mysqlclient (setup.py) ... error ERROR: Command errored out with
>> > exit status 1: ... ... /usr/bin/ld: cannot find -lssl
>> > /usr/bin/ld: cannot find -lcrypto collect2: error: ld returned 1
>> > exit status error: command 'x86_64-linux-gnu-gcc' failed with exit
>> > status 1  ERROR: Failed
>> > building wheel for mysqlclient Running setup.py clean for
>> > mysqlclient Failed to build mysqlclient Installing collected
>> > packages: mysqlclient Running setup.py install for mysqlclient ...
>> > error ERROR: Command errored out with exit status 1:/ |
>> >
>>
>> You most likely need the package for openssl. Try installing the libssl
>> package, ie. something like:
>>
>> # apt install libssl1.1
>>
>> Hopefully that should do it.
>>
>> Kind regards,
>>
>> Kasper Laudrup
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/f67170f6-e3b7-294d-9e56-2abf9752edda%40stacktrace.dk
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BOi5F0mmgO2jDRsDtXF6ZaVzku59QXFdrdRF%3DnwonnLb6CoMw%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWon%2BVbxsTJwg1KrqrOqH6Hz%3D2DMSeTJpJZv%2BWwgeVYMiQ%40mail.gmail.com.


Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-25 Thread Integr@te System
Hi man,

Check 'class UserManager(): ..orgid = org_obj '




On Tue, Nov 26, 2019, 01:40 Ahmad Saki  wrote:

> My custom authentication model in django:
>
> from django.db import models
> from django.contrib.auth.models import (
> AbstractBaseUser, BaseUserManager
> )
> from organization.models import Organization
>
>
> class UserManager(BaseUserManager):
> # use_in_migrations = True
>
> # python manage.py createsuperuser
> def create_user(self, orgid, username, email,  password=None, is_admin=False, 
> is_staff=False, is_active=True):
> if not orgid:
> raise ValueError("Organization of user must not empty")
> elif not username:
> raise ValueError("User must have an username")
> elif not email:
> raise ValueError("User must have an email address")
>
> org_obj = Organization.objects.all(orgid=orgid)
> user_obj = self.model(
> orgid=org_obj,
> username=username,
> email = self.normalize_email(email),
> password=password
> )
> user_obj.set_password(password)
> user_obj.admin=is_admin
> user_obj.staff=is_staff
> user_obj.active=is_active
> user_obj.save(using=self._db)
> return user_obj
>
> # python manage.py createsuperuser
> def create_superuser(self, orgid, username, email, password=None):
> user = 
> self.create_user(orgid,username,email,password=password,is_admin=True,is_staff=True,is_active=True)
> return user
>
> def create_staffuser(self, orgid, username, email, password=None):
> user = 
> self.create_user(orgid,username,email,password=password,is_admin=False,is_staff=True,is_active=True)
> return user
>
> class User(AbstractBaseUser):
> orgid   = models.ForeignKey(Organization, max_length=6, 
> on_delete=models.CASCADE)
> username= models.CharField(primary_key=True, max_length=50)
> email   = models.EmailField(max_length=255, unique=True, null=False, 
> blank=False)
> admin   = models.BooleanField(default=False)
> staff   = models.BooleanField(default=False)
> active  = models.BooleanField(default=True)
> date_joined = models.DateTimeField(auto_now_add=True)
>
> objects = UserManager()
>
> USERNAME_FIELD = "username"
> # REQUIRED_FIELDS must contain all required fields on your User model,
> # but should not contain the USERNAME_FIELD or password as these fields will 
> always be prompted for.
> REQUIRED_FIELDS = ['orgid','email']
>
> class Meta:
> app_label = "user"
> db_table = "user"
>
> def __str__(self):
> return self.username
>
> def get_full_name(self):
> return self.username
>
> def get_short_name(self):
> return self.username
>
> # this methods are require to login super user from admin panel
> def has_perm(self, perm, obj=None):
> return self.is_staff
>
> # this methods are require to login super user from admin panel
> def has_module_perms(self, app_label):
> return self.is_staff
>
> @property
> def is_admin(self):
> return self.admin
>
> @property
> def is_staff(self):
> return self.staff
>
> @property
> def is_active(self):
> return self.active
>
>
>
> When I create migrations it creates:
>
> from django.db import migrations, models
> import django.db.models.deletion
> import user.models
>
>
> class Migration(migrations.Migration):
>
> initial = True
>
> dependencies = [
> ('organization', '0001_initial'),
> ]
>
> operations = [
> migrations.CreateModel(
> name='User',
> fields=[
> ('password', models.CharField(max_length=128, 
> verbose_name='password')),
> ('last_login', models.DateTimeField(blank=True, null=True, 
> verbose_name='last login')),
> ('username', models.CharField(max_length=50, primary_key=True, 
> serialize=False)),
> ('email', models.EmailField(max_length=255, unique=True)),
> ('admin', models.BooleanField(default=False)),
> ('staff', models.BooleanField(default=False)),
> ('active', models.BooleanField(default=True)),
> ('date_joined', models.DateTimeField(auto_now_add=True)),
> ('orgid', models.ForeignKey(max_length=6, 
> on_delete=django.db.models.deletion.CASCADE, to='organization.Organization')),
> ],
> options={
> 'db_table': 'user',
> },
> managers=[
> ('objects', user.models.UserManager()),
> ],
> ),
> ]
>
>
>
> But when I want to migrate it gives me an error below. Please help me
> anyone..
>
> Operations to perform:
>   Apply all migrations: admin, auth, contenttypes, organization, sessions, 
> user
> Running migrations:
>   Applying admin.0004_auto_20191118_2315...Traceback (most recent call last):
>   File "manage.py", line 21, in 
> main()
>   File "manage.py", line 17, in main
> execute_from_command_line(sys.argv)
>   File 
> "C:\Users\ZAB-SAKI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\__init__.py",
>  line 381, in execute_fr

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
hi, inspect your typo and Organization model.

On Tue, Nov 26, 2019, 16:31 Ahmad Saki  wrote:

> Dear,
> Thanks for your response.
> I use the foreign key field 'orgid' or not but got the same error. If I
> want to use this then where is my fault for this error!
>
>
> On Tuesday, November 26, 2019 at 12:11:58 PM UTC+6, Integr@te System
> wrote:
>>
>> Hi man,
>>
>> Check 'class UserManager(): ..orgid = org_obj '
>>
>>
>>
>>
>> On Tue, Nov 26, 2019, 01:40 Ahmad Saki  wrote:
>>
>>> My custom authentication model in django:
>>>
>>> from django.db import models
>>> from django.contrib.auth.models import (
>>> AbstractBaseUser, BaseUserManager
>>> )
>>> from organization.models import Organization
>>>
>>>
>>> class UserManager(BaseUserManager):
>>> # use_in_migrations = True
>>>
>>> # python manage.py createsuperuser
>>> def create_user(self, orgid, username, email,  password=None, 
>>> is_admin=False, is_staff=False, is_active=True):
>>> if not orgid:
>>> raise ValueError("Organization of user must not empty")
>>> elif not username:
>>> raise ValueError("User must have an username")
>>> elif not email:
>>> raise ValueError("User must have an email address")
>>>
>>> org_obj = Organization.objects.all(orgid=orgid)
>>> user_obj = self.model(
>>> orgid=org_obj,
>>> username=username,
>>> email = self.normalize_email(email),
>>> password=password
>>> )
>>> user_obj.set_password(password)
>>> user_obj.admin=is_admin
>>> user_obj.staff=is_staff
>>> user_obj.active=is_active
>>> user_obj.save(using=self._db)
>>> return user_obj
>>>
>>> # python manage.py createsuperuser
>>> def create_superuser(self, orgid, username, email, password=None):
>>> user = 
>>> self.create_user(orgid,username,email,password=password,is_admin=True,is_staff=True,is_active=True)
>>> return user
>>>
>>> def create_staffuser(self, orgid, username, email, password=None):
>>> user = 
>>> self.create_user(orgid,username,email,password=password,is_admin=False,is_staff=True,is_active=True)
>>> return user
>>>
>>> class User(AbstractBaseUser):
>>> orgid   = models.ForeignKey(Organization, max_length=6, 
>>> on_delete=models.CASCADE)
>>> username= models.CharField(primary_key=True, max_length=50)
>>> email   = models.EmailField(max_length=255, unique=True, null=False, 
>>> blank=False)
>>> admin   = models.BooleanField(default=False)
>>> staff   = models.BooleanField(default=False)
>>> active  = models.BooleanField(default=True)
>>> date_joined = models.DateTimeField(auto_now_add=True)
>>>
>>> objects = UserManager()
>>>
>>> USERNAME_FIELD = "username"
>>> # REQUIRED_FIELDS must contain all required fields on your User model,
>>> # but should not contain the USERNAME_FIELD or password as these fields 
>>> will always be prompted for.
>>> REQUIRED_FIELDS = ['orgid','email']
>>>
>>> class Meta:
>>> app_label = "user"
>>> db_table = "user"
>>>
>>> def __str__(self):
>>> return self.username
>>>
>>> def get_full_name(self):
>>> return self.username
>>>
>>> def get_short_name(self):
>>> return self.username
>>>
>>> # this methods are require to login super user from admin panel
>>> def has_perm(self, perm, obj=None):
>>> return self.is_staff
>>>
>>> # this methods are require to login super user from admin panel
>>> def has_module_perms(self, app_label):
>>> return self.is_staff
>>>
>>> @property
>>> def is_admin(self):
>>> return self.admin
>>>
>>> @property
>>> def is_staff(self):
>>> return self.staff
>>>
>>> @property
>>> def is_active(self):
>>> return self.active
>>>
>>>
>>>
>>> When I create migrations it creates:
>>>
>>> from django.db import migrations, models
>>> import django.db.models.deletion
>>> import user.models
>>&

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
Hi man,

And u see error occur again, isn't it?
Do you differ two file that app output when you migrated?

On Tue, Nov 26, 2019, 22:40 Ahmad Saki  wrote:

> organization.Organization model:
>
> from django.db import models
>
> class Organization(models.Model):
>orgid = models.IntegerField(max_length=6, primary_key=True)
>name = models.CharField(max_length=50)
>phone = models.CharField(max_length=20,null=True,blank=True,default=
> None)
>email = models.CharField(max_length=50,null=True,blank=True,default=
> None)
>mobile = models.CharField(max_length=20,null=True,blank=True,default=
> None)
>permanent_address = models.CharField(max_length=200,null=True,blank=
> True,default=None)
>present_address = models.CharField(max_length=200,null=True,blank=True,
> default=None)
>remark = models.CharField(max_length=500,null=True,blank=True,default=
> None)
>
> And migration:
>
> # Generated by Django 2.2.3 on 2019-11-26 15:36
>
> from django.db import migrations, models
>
>
> class Migration(migrations.Migration):
>
> initial = True
>
> dependencies = [
>]
>
> operations = [
>migrations.CreateModel(
>name='Organization',
>fields=[
>('orgid', models.IntegerField(max_length=6, primary_key=
> True, serialize=False)),
>('name', models.CharField(max_length=50)),
>('phone', models.CharField(blank=True, default=None,
> max_length=20, null=True)),
>('email', models.CharField(blank=True, default=None,
> max_length=50, null=True)),
>('mobile', models.CharField(blank=True, default=None,
> max_length=20, null=True)),
>('permanent_address', models.CharField(blank=True, default=
> None, max_length=200, null=True)),
>('present_address', models.CharField(blank=True, default=
> None, max_length=200, null=True)),
>('remark', models.CharField(blank=True, default=None,
> max_length=500, null=True)),
>],
>),
>]
>
>
>
>
> On Tuesday, November 26, 2019 at 8:26:13 PM UTC+6, Integr@te System wrote:
>>
>> hi, inspect your typo and Organization model.
>>
>> On Tue, Nov 26, 2019, 16:31 Ahmad Saki  wrote:
>>
>>> Dear,
>>> Thanks for your response.
>>> I use the foreign key field 'orgid' or not but got the same error. If I
>>> want to use this then where is my fault for this error!
>>>
>>>
>>> On Tuesday, November 26, 2019 at 12:11:58 PM UTC+6, Integr@te System
>>> wrote:
>>>>
>>>> Hi man,
>>>>
>>>> Check 'class UserManager(): ..orgid = org_obj '
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Nov 26, 2019, 01:40 Ahmad Saki  wrote:
>>>>
>>>>> My custom authentication model in django:
>>>>>
>>>>> from django.db import models
>>>>> from django.contrib.auth.models import (
>>>>> AbstractBaseUser, BaseUserManager
>>>>> )
>>>>> from organization.models import Organization
>>>>>
>>>>>
>>>>> class UserManager(BaseUserManager):
>>>>> # use_in_migrations = True
>>>>>
>>>>> # python manage.py createsuperuser
>>>>> def create_user(self, orgid, username, email,  password=None, 
>>>>> is_admin=False, is_staff=False, is_active=True):
>>>>> if not orgid:
>>>>> raise ValueError("Organization of user must not empty")
>>>>> elif not username:
>>>>> raise ValueError("User must have an username")
>>>>> elif not email:
>>>>> raise ValueError("User must have an email address")
>>>>>
>>>>> org_obj = Organization.objects.all(orgid=orgid)
>>>>> user_obj = self.model(
>>>>> orgid=org_obj,
>>>>> username=username,
>>>>> email = self.normalize_email(email),
>>>>> password=password
>>>>> )
>>>>> user_obj.set_password(password)
>>>>> user_obj.admin=is_admin
>>>>> user_obj.staff=is_staff
>>>>> user_obj.active=is_active
>>>>> user_obj.save(using=self._db)
>>>>> return user_obj
>>>&

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
Hi friend,

plz check these files: '  # Generated by Django 2.2.3 on 2019-11-26 15:36 '
and another (if u have), to see separating.

On Tue, Nov 26, 2019, 23:44 Ahmad Saki  wrote:

> Hello Dear,
> Please explain with more words. How do I solve this problem? What can I do?
>
> On Tuesday, November 26, 2019 at 9:54:26 PM UTC+6, Integr@te System wrote:
>>
>> Hi man,
>>
>> And u see error occur again, isn't it?
>> Do you differ two file that app output when you migrated?
>>
>> On Tue, Nov 26, 2019, 22:40 Ahmad Saki  wrote:
>>
>>> organization.Organization model:
>>>
>>> from django.db import models
>>>
>>> class Organization(models.Model):
>>>orgid = models.IntegerField(max_length=6, primary_key=True)
>>>name = models.CharField(max_length=50)
>>>phone = models.CharField(max_length=20,null=True,blank=True,default=
>>> None)
>>>email = models.CharField(max_length=50,null=True,blank=True,default=
>>> None)
>>>mobile = models.CharField(max_length=20,null=True,blank=True,default=
>>> None)
>>>permanent_address = models.CharField(max_length=200,null=True,blank=
>>> True,default=None)
>>>present_address = models.CharField(max_length=200,null=True,blank=
>>> True,default=None)
>>>remark = models.CharField(max_length=500,null=True,blank=True,default
>>> =None)
>>>
>>> And migration:
>>>
>>> # Generated by Django 2.2.3 on 2019-11-26 15:36
>>>
>>> from django.db import migrations, models
>>>
>>>
>>> class Migration(migrations.Migration):
>>>
>>> initial = True
>>>
>>> dependencies = [
>>>]
>>>
>>> operations = [
>>>migrations.CreateModel(
>>>name='Organization',
>>>fields=[
>>>('orgid', models.IntegerField(max_length=6, primary_key=
>>> True, serialize=False)),
>>>('name', models.CharField(max_length=50)),
>>>('phone', models.CharField(blank=True, default=None,
>>> max_length=20, null=True)),
>>>('email', models.CharField(blank=True, default=None,
>>> max_length=50, null=True)),
>>>    ('mobile', models.CharField(blank=True, default=None,
>>> max_length=20, null=True)),
>>>('permanent_address', models.CharField(blank=True,
>>> default=None, max_length=200, null=True)),
>>>('present_address', models.CharField(blank=True, default=
>>> None, max_length=200, null=True)),
>>>    ('remark', models.CharField(blank=True, default=None,
>>> max_length=500, null=True)),
>>>],
>>>),
>>>]
>>>
>>>
>>>
>>>
>>> On Tuesday, November 26, 2019 at 8:26:13 PM UTC+6, Integr@te System
>>> wrote:
>>>>
>>>> hi, inspect your typo and Organization model.
>>>>
>>>> On Tue, Nov 26, 2019, 16:31 Ahmad Saki  wrote:
>>>>
>>>>> Dear,
>>>>> Thanks for your response.
>>>>> I use the foreign key field 'orgid' or not but got the same error. If
>>>>> I want to use this then where is my fault for this error!
>>>>>
>>>>>
>>>>> On Tuesday, November 26, 2019 at 12:11:58 PM UTC+6, Integr@te System
>>>>> wrote:
>>>>>>
>>>>>> Hi man,
>>>>>>
>>>>>> Check 'class UserManager(): ..orgid = org_obj '
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Tue, Nov 26, 2019, 01:40 Ahmad Saki  wrote:
>>>>>>
>>>>>>> My custom authentication model in django:
>>>>>>>
>>>>>>> from django.db import models
>>>>>>> from django.contrib.auth.models import (
>>>>>>> AbstractBaseUser, BaseUserManager
>>>>>>> )
>>>>>>> from organization.models import Organization
>>>>>>>
>>>>>>>
>>>>>>> class UserManager(BaseUserManager):
>>>>>>> # use_in_migrations = True
>>>>>>>
>>>>>>> # python manage.py createsuperuser
>>>>>&

Re: self.foreign_related_fields[0] IndexError: tuple index out of range

2019-11-26 Thread Integr@te System
Hi friend,

check again docs to see what benefit for u:
https://realpython.com/django-migrations-a-primer/#ensuring-model-definitions-and-the-database-schema-in-sync

Auth customizing:
https://docs.djangoproject.com/en/2.2/topics/auth/customizing/


On Wed, Nov 27, 2019, 12:34 Raja Sekar Sambath  wrote:

> Hi,
>
> If you have deleted your old db and creating a fresh database, then delete
> all files generated previously using migration command and do migration
>
> (have a backup before deleting files) ;)
>
> On Tue, 26 Nov 2019 at 23:57, Ahmad Saki 
> wrote:
>
>> Hi friend,
>>
>> When I want to create my custom authentication model User. I have got
>> error such as 'FieldDoesNotExist 'userid''.
>> So, I have deleted all of these previous migration_files, re-create
>> database and makemigrations. But cannot able to migrate again.
>>
>>
>> On Wednesday, November 27, 2019 at 12:05:24 AM UTC+6, Integr@te System
>> wrote:
>>>
>>> Hi friend,
>>>
>>> plz check these files: '  # Generated by Django 2.2.3 on 2019-11-26
>>> 15:36 ' and another (if u have), to see separating.
>>>
>>> On Tue, Nov 26, 2019, 23:44 Ahmad Saki  wrote:
>>>
>>>> Hello Dear,
>>>> Please explain with more words. How do I solve this problem? What can I
>>>> do?
>>>>
>>>> On Tuesday, November 26, 2019 at 9:54:26 PM UTC+6, Integr@te System
>>>> wrote:
>>>>>
>>>>> Hi man,
>>>>>
>>>>> And u see error occur again, isn't it?
>>>>> Do you differ two file that app output when you migrated?
>>>>>
>>>>> On Tue, Nov 26, 2019, 22:40 Ahmad Saki  wrote:
>>>>>
>>>>>> organization.Organization model:
>>>>>>
>>>>>> from django.db import models
>>>>>>
>>>>>> class Organization(models.Model):
>>>>>>orgid = models.IntegerField(max_length=6, primary_key=True)
>>>>>>name = models.CharField(max_length=50)
>>>>>>phone = models.CharField(max_length=20,null=True,blank=True,
>>>>>> default=None)
>>>>>>email = models.CharField(max_length=50,null=True,blank=True,
>>>>>> default=None)
>>>>>>mobile = models.CharField(max_length=20,null=True,blank=True,
>>>>>> default=None)
>>>>>>permanent_address = models.CharField(max_length=200,null=True,
>>>>>> blank=True,default=None)
>>>>>>present_address = models.CharField(max_length=200,null=True,blank=
>>>>>> True,default=None)
>>>>>>remark = models.CharField(max_length=500,null=True,blank=True,
>>>>>> default=None)
>>>>>>
>>>>>> And migration:
>>>>>>
>>>>>> # Generated by Django 2.2.3 on 2019-11-26 15:36
>>>>>>
>>>>>> from django.db import migrations, models
>>>>>>
>>>>>>
>>>>>> class Migration(migrations.Migration):
>>>>>>
>>>>>> initial = True
>>>>>>
>>>>>> dependencies = [
>>>>>>]
>>>>>>
>>>>>> operations = [
>>>>>>migrations.CreateModel(
>>>>>>        name='Organization',
>>>>>>fields=[
>>>>>>('orgid', models.IntegerField(max_length=6,
>>>>>> primary_key=True, serialize=False)),
>>>>>>('name', models.CharField(max_length=50)),
>>>>>>('phone', models.CharField(blank=True, default=None,
>>>>>> max_length=20, null=True)),
>>>>>>('email', models.CharField(blank=True, default=None,
>>>>>> max_length=50, null=True)),
>>>>>>('mobile', models.CharField(blank=True, default=None,
>>>>>> max_length=20, null=True)),
>>>>>>('permanent_address', models.CharField(blank=True,
>>>>>> default=None, max_length=200, null=True)),
>>>>>>('present_address', models.CharField(blank=True,
>>>>>> default=None, max_length=200, null=True)),
>>>>>>('remark&#

Re: Internship

2019-11-26 Thread Integr@te System
Hi Pro,

For which role you gonna to handle in this field or entirely, on internet
with ocean of sources. Don't worry for research and resolve!

On Wed, Nov 27, 2019, 13:29 Ganesh Babu  wrote:

> Hi Friends,
>
> I want some suggestion from you.  I started Data science using python
> 3.
> Can you suggest me,  how can i start and if you have any video please
> provide to me
>
> On Friday, November 22, 2019 at 5:03:26 PM UTC+5:30, Scyil sharma wrote:
>>
>> I am sahil sharma, a student of btech 3rd year and I'm seeking for an
>> internship in Winter vacation. I would like to be work as a backend
>> developer.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/c58bdc05-06c8-4259-aeab-a3613789a447%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWr-Yba5ueDmRaKyeSCP990TQ7nyaLgy4A0h6cnBYEVvHA%40mail.gmail.com.


Re:

2019-11-27 Thread Integr@te System
Hi man,

U mean that use alert() method on onload page event!?

On Wed, Nov 27, 2019, 20:28 Anirudh Jain  wrote:

> Message on the URL ? Could you please give an example ?
>
> On Wed, 27 Nov 2019, 18:08 vaneet bawa,  wrote:
>
>> can someone please tell me that how I can display the message on the url
>> from which I am getting the response
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAKubXnycx%3DqU2h4SgRJ%3D_HEXbSqfbJ8ii2TbVQVzYGzcT9m7Qg%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAC3mK7dVtz9r%2B8yGdKYCLfts0hgv%2Bd325BnqHOKFMMGp6Hx27A%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpX47%3DcPiqLCo1cg0_GyZ7c-bqkS3X-FiFytBQ%2BWZ6%3DqA%40mail.gmail.com.


Re: Power BI integration with django

2019-11-27 Thread Integr@te System
Hi friend,

Blessing u:

powerBI rest API:
https://docs.microsoft.com/en-us/rest/api/power-bi/embedtoken

Ironpython integrated .Net:
https://ironpython.net/

On Wed, Nov 27, 2019, 22:21 Brian  wrote:

> Does anyone know how to integrate a Power BI dashboard with a web page,
> without the user having to log in to the power BI account
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/e807c75c-e976-4ec3-8389-5a5011aaecf2%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWomHf049TkkuVXc1xwNxLNRufmZ0EN1sVXQp0Gg1_NEmA%40mail.gmail.com.


Re:

2019-11-28 Thread Integr@te System
Hi man,

where ur template coming from!? to display content you want to.

On Thu, Nov 28, 2019, 19:28 vaneet bawa  wrote:

> First of all thanks Saswat for the response but i have already done this
> thing on my views.py but my html file is not displaying anything rather it
> throws an exception templatedoesnot exit
>
> I hope you are geeting what i am saying
>
> Best Regards
> Vaneet
>
>
>
> On 28-Nov-2019, at 5:42 PM, Saswat Ray  wrote:
>
> 
> Django app expects a response from your  view file to render and show to
> user.You need add a template to render. like in views.py
> return render(request, "xyz.html")
>
> https://docs.djangoproject.com/en/2.2/topics/http/shortcuts/
>
>
> render
> *Thanks*,
> *Saswat*
>
>
>
>
>
> On Thu, Nov 28, 2019 at 5:35 PM vaneet bawa 
> wrote:
>
>> Exception Type: TemplateDoesNotExist
>>
>> Could someone please tell me that i m getting this error how I can handle
>> it...
>>
>> what i m trying to do is i have created a input field and in that field i
>> m providing a message and then i want that on button click that message
>> should be displayed on my console
>>
>> Best Regards
>> Vaneet
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAKubXnzO%3DQizgnNaHWZoYwxXWMjCbj-bzkbxmOzcV6WZsyO_Ow%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAEhPkLEJrcfCXsj3C-i058ABE0_1i7Hd%3DCBbS84A9DtqbYa3aQ%40mail.gmail.com
> 
> .
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/205D5E6D-03B1-48A8-BE44-1DEDE11BFE8A%40gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrtksGXqCwX5-hgwS7gJHzWxk52KoFBbsoxY3Gud%3DYxPg%40mail.gmail.com.


Re:

2019-11-28 Thread Integr@te System
Hi man,

plz show err msg.

On Thu, Nov 28, 2019, 18:08 RAJAT MAAN  wrote:

>
>
> can someone help me where I am getting wrong? Unable to compare df1 == df2.
>
>
> import mysql.connector as mysql
> import socket
> import sys
>
> def server_program():
> HOST = '192.168.0.115'
> PORT = 
>
> s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
>
> print('socket created')
>
> try:
> s.bind((HOST, PORT))
> except socket.error as err:
> print('Bind Failed, Error Code: ' + str(err[0]) + ', Message: ' +
> err[1])
> sys.exit()
>
> print('Socket Bind Success!')
>
> s.listen(10)
> print ('Socket is now listening')
>
>
> while 1:
> conn, addr = s.accept()
> print ('Connect with ' + addr[0] + ':' + str(addr[1]))
> df1 = conn.recv(1024).decode()
> print(df1)
> break
> conn.close()
> s.close()
>
> mydb=mysql.connect(
> user = 'rajat',
> passwd = 'rajat',
> host = 'localhost',
> database = 'myforum'
> )
>
> mycursor=mydb.cursor()
> mycursor.execute("SELECT * FROM form_simpleform WHERE id=1")
>
> df2=mycursor.fetchone()
> print(df2)
>
> if df1 == df2:
> print('yes Data Exists')
> else:
> print('No Data')
>
> if __name__ == '__main__':
> server_program()
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/4ef1565c-9f61-4da3-beb2-cb4176556ae6%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo9UwgrEugAqgzcNzC_y4XkbHYWcm2%3D%3D713pCRG%3DXMcHQ%40mail.gmail.com.


Re: Monitoring Production Cookiecutter-Django

2019-11-28 Thread Integr@te System
Promethus:

https://hub.docker.com/r/prom/prometheus/

On Thu, Nov 28, 2019, 20:40 Yoo  wrote:

> I’m using cookiecutter-django and Docker for production, and I’m looking
> for some kind of monitoring package that comes with a GUI. My website is
> heavy on memory for calculations, so I’m testing it with locust.io. I
> want to be able to monitor a bunch of things such as firewall for SIEM and
> simple network monitoring and other things like memory allocation, caches,
> and db size.
>
> I took a look at datadog but am afraid I can’t actually monitor it once I
> send the site into production (using docker-compose -f production.yml up -d
> for background deployment).
>
> Any other packages? Maybe a package that integrates with Docker so I can
> also run it via compose? Or maybe something more network/remote based?
>
> Thank you!
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1e09cf01-ecf2-481a-b97c-94bee8147bda%40googlegroups.com
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpdx4C5UdJSFuxD7K9LAq%3D0PqCs_e7BHSON49XXjkohDQ%40mail.gmail.com.


Re:

2019-11-28 Thread Integr@te System
Hi guy,

also see df1 go to GC when conn.close()

On Fri, Nov 29, 2019, 02:31 Kasper Laudrup  wrote:

> Hi Rajat,
>
> On 28/11/2019 07.06, RAJAT MAAN wrote:
> >
> >
> > can someone help me where I am getting wrong? Unable to compare df1 ==
> df2.
> >
>
> I don't see how this is related to Django. You'll probably have a much
> better chance of getting help if you ask in the relevant forum/mailing
> list.
>
> Kind regards,
> Kasper Laudrup
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/0fc63964-a39b-0bf1-ebfb-aa45ac1e11b5%40stacktrace.dk
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo4AyRQRcUaTzxkgdGYD8Nn1p9L2zOVxRGQYWj%2BdwUjxA%40mail.gmail.com.


Re:

2019-11-28 Thread Integr@te System
Hi Kasper,

dont serious here is group to share knowledges.


On Fri, Nov 29, 2019, 02:52 Kasper Laudrup  wrote:

> Hi "Guy"
>
> On 28/11/2019 20.35, Integr@te System wrote:
> > Hi guy,
> >
> > also see df1 go to GC when conn.close()
> >
>
> I think you answered the wrong person here. I cannot see how this is
> related to my answer.
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1dd68c80-3306-0130-09cf-6b24f191d365%40stacktrace.dk
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoH5-FyqLmzO5-xRcj%2BNDazZjMDpdm1%3Dg57P%2B5ofZDB3g%40mail.gmail.com.


Re: HELP HELP FATAL: password authentication failed for user "postgres"

2019-11-29 Thread Integr@te System
Hi freind,

check your connection on vm first, and then config
https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-HOST

On Fri, Nov 29, 2019, 19:41 EMPOWER EXCEL  wrote:

> cqn some body helps me to correct this error while running *python
> manager.py runeserver *
> (analyseprotection) flavien@flavien-VirtualBox:~/MyProjects/alertprot$
> python manage.py runserver
> Performing system checks...
> System check identified no issues (0 silenced).
> Unhandled exception in thread started by 
> Traceback (most recent call last):
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/utils/autoreload.py",
> line 228, in wrapper
> fn(*args, **kwargs)
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
> line 127, in inner_run
> self.check_migrations()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/core/management/base.py",
> line 422, in check_migrations
> executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
> line 20, in __init__
> self.loader = MigrationLoader(self.connection)
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
> line 52, in __init__
> self.build_graph()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
> line 210, in build_graph
> self.applied_migrations = recorder.applied_migrations()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/recorder.py",
> line 65, in applied_migrations
> self.ensure_schema()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/recorder.py",
> line 52, in ensure_schema
> if self.Migration._meta.db_table in
> self.connection.introspection.table_names(self.connection.cursor()):
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
> line 254, in cursor
> return self._cursor()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
> line 229, in _cursor
> self.ensure_connection()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
> line 213, in ensure_connection
> self.connect()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/utils.py",
> line 94, in __exit__
> six.reraise(dj_exc_type, dj_exc_value, traceback)
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
> line 213, in ensure_connection
> self.connect()
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
> line 189, in connect
> self.connection = self.get_new_connection(conn_params)
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py",
> line 176, in get_new_connection
> connection = Database.connect(**conn_params)
>   File
> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/psycopg2/__init__.py",
> line 126, in connect
> conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
> django.db.utils.OperationalError: FATAL:  password authentication failed
> for user "postgres"
> FATAL:  password authentication failed for user "postgres"
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/eb5beb47-013e-4e07-a077-31a732635325%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoH9Hx6BdN-MY_mwadT31jDKBoO46H2%3DqAo4KuFShRN1w%40mail.gmail.com.


Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Integr@te System
Hi guy,

I see this doc fix for u, with builtin pk in models django.
And you can create index in text/char field to optimize performance.

https://docs.djangoproject.com/en/dev/ref/databases/#manually-specified-autoincrement-pk


On Fri, Nov 29, 2019, 19:41 Maxim Bulatov  wrote:

> Hello,
>
> I have lot of lists like follow:
> (Name1): (V1, V2, V3, V4, ..)
>
> And I use many threads to create many db objects:
> company = Company(Name)
> for x in vector:
> v = CompanyValue(company=company, value=x)
> values.append(v)
>
> class CompanyValue(models.Model):
> company = models.ForeignKey('Company', on_delete=models.CASCADE)
> value = FloatField
>
> This pool of threads return all lists, what I combine, filter and want put
> to database in one bulk_create call.
> Suddenly, I found, company.id is not ready to be linked in CompanyValue,
> follow code does not works:
> Company.objects.bulk_create(companies)
> CompanyValue.objects.bulk_create(values)  # value.company_id is null
> here
>
> No way to save objects in my threads, because I need to filter objects and
> can do it only when all of them are collected. Also, it has performance
> issues 100k+ of requests is slowly enough. I have two ways to resolve:
> 1. I can make intermediate class or tuple and create CompanyValue objects
> only when companies is saved to db. Hard to support, hard to filter, not so
> clean.
> 2. I can use dirty hack to update _id field:
> for v in values:
> v.company = v.company
>
> Can you advice more ways for me? It seems, I don't know something from
> django features to make it elegant.
> I see 11 years old issue here (https://code.djangoproject.com/ticket/9553
> ) and it marked as
> intended behaviour.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/3d62beaf-7fbf-492f-b998-1539f45cd7a0%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrC747ZHLWPCf7UK%2BZvZRDAcxDMxk7ewE4d4UhZAHpB7g%40mail.gmail.com.


Re: Groups and summarys in template

2019-11-29 Thread Integr@te System
Hi,

You can sellect from SO(relate to 'sold_value') as retrieve from new SO
base on current time.

Or If due date time == datetime now && 'due date' != 0: retrieve 'due date'


On Sat, Nov 30, 2019, 02:36 Elias Coutinho  wrote:

> Good afternoon people!
>
> I have the following querysets:
>
>  accounts = Account.objects.filter (person__is_representative = False)
> .order_by ('due date')
>  groups = Account.objects.values ('due_date'). annotate (total_day =
> Sum ('sold_value')). order_by ('due_date')
>
>
> Accounts Returns a List of Information Sorted by Due Date
> groups returns another list sorted and grouped by due date
>
> I would like django to place a total groups in the template below the line
> of accounts when it realizes that the next due date is different from the
> previous one, ie totaling by date.
>
> Can someone help me?
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/8ea05b06-1eb1-4de3-8787-6d80570a6283%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo1o%3DmV%3D0Da27q8HzDp5Gu9T9cHzd9a44hhwghB1LN68A%40mail.gmail.com.


Re: Update _id field before .save() for ForeignKey

2019-11-29 Thread Integr@te System
Hi Dvenun,

Bc of  Django implement accord to python, of cause child inherit from
parent existence.


https://docs.python.org/3.7/library/functions.html#id


On Sat, Nov 30, 2019, 13:30 Dvenum  wrote:

> Interest idea and it works, but not necessary:
> company = Company()
> #company.id is None
> companies.append(company)
> Company.objects.bulk_create(companies)
> #company.id is 1
>
> Instead to ask pk from database, it can be used from
> company_value.company.id. Django save pk value to internal meta
> (models/base.py) and does not update it. This works too:
> value.company = value.company # pk updated
>
> I want to ask, each child object should be created only when parent is
> saved to db? Maybe django has something to cover this case?
>
>
> On Sat, Nov 30, 2019 at 7:52 AM Charles Lee 
> wrote:
>
>> I have an idea.
>>
>>1. `bulk_create` all companies.
>>2. `Filter`(SELECT) all `Company` and make it dictionary for
>>retrieving company fast.
>>3.
>>   1. company_dict = {
>> ’Name’: ‘pk’,
>> ...
>>   }
>>   4. Create a list of `CompanyValue` with company name and
>>company_dict.
>>5. `bulk_create` the list.
>>
>>
>> I'm not sure if it will work because I haven't implemented it, but I hope
>> it helps.
>>
>> 2019년 11월 29일 금요일 오후 9시 42분 0초 UTC+9, Maxim Bulatov 님의 말:
>>>
>>> Hello,
>>>
>>> I have lot of lists like follow:
>>> (Name1): (V1, V2, V3, V4, ..)
>>>
>>> And I use many threads to create many db objects:
>>> company = Company(Name)
>>> for x in vector:
>>> v = CompanyValue(company=company, value=x)
>>> values.append(v)
>>>
>>> class CompanyValue(models.Model):
>>> company = models.ForeignKey('Company', on_delete=models.CASCADE)
>>> value = FloatField
>>>
>>> This pool of threads return all lists, what I combine, filter and want
>>> put to database in one bulk_create call.
>>> Suddenly, I found, company.id is not ready to be linked in
>>> CompanyValue, follow code does not works:
>>> Company.objects.bulk_create(companies)
>>> CompanyValue.objects.bulk_create(values)  # value.company_id is
>>> null here
>>>
>>> No way to save objects in my threads, because I need to filter objects
>>> and can do it only when all of them are collected. Also, it has performance
>>> issues 100k+ of requests is slowly enough. I have two ways to resolve:
>>> 1. I can make intermediate class or tuple and create CompanyValue
>>> objects only when companies is saved to db. Hard to support, hard to
>>> filter, not so clean.
>>> 2. I can use dirty hack to update _id field:
>>> for v in values:
>>> v.company = v.company
>>>
>>> Can you advice more ways for me? It seems, I don't know something from
>>> django features to make it elegant.
>>> I see 11 years old issue here (
>>> https://code.djangoproject.com/ticket/9553
>>> ) and it marked as
>>> intended behaviour.
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/af2a0f27-7234-4210-8627-1ad8982da805%40googlegroups.com
>> 
>> .
>>
>
>
> --
> dvenum
> dvenum...@gmail.com
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAHBRYSd1MC5mL3oWTfzqc%2BXXcWxVnDqLpJ5HsEGk2GHFd917eQ%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqW7gZVR1u6-%2BAkMhB5dZeRHiXzLrSQvmiL7O3diT9OfA%40mail.gmail.com.


Re: HELP HELP FATAL: password authentication failed for user "postgres"

2019-11-29 Thread Integr@te System
Hi freind,

the last time u recieved an email to check config with content of many
fields and connection.

If u see wrong password field, check in app and db setting.

On Sat, Nov 30, 2019, 04:51 Jonathan Duclos 
wrote:

>
>
> On Friday, 29 November 2019 09:42:00 UTC-3, EMPOWER EXCEL wrote:
>>
>> cqn some body helps me to correct this error while running *python
>> manager.py runeserver *
>> (analyseprotection) flavien@flavien-VirtualBox:~/MyProjects/alertprot$
>> python manage.py runserver
>> Performing system checks...
>> System check identified no issues (0 silenced).
>> Unhandled exception in thread started by 
>> Traceback (most recent call last):
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/utils/autoreload.py",
>> line 228, in wrapper
>> fn(*args, **kwargs)
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py",
>> line 127, in inner_run
>> self.check_migrations()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/core/management/base.py",
>> line 422, in check_migrations
>> executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/executor.py",
>> line 20, in __init__
>> self.loader = MigrationLoader(self.connection)
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
>> line 52, in __init__
>> self.build_graph()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/loader.py",
>> line 210, in build_graph
>> self.applied_migrations = recorder.applied_migrations()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/recorder.py",
>> line 65, in applied_migrations
>> self.ensure_schema()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/migrations/recorder.py",
>> line 52, in ensure_schema
>> if self.Migration._meta.db_table in
>> self.connection.introspection.table_names(self.connection.cursor()):
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
>> line 254, in cursor
>> return self._cursor()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
>> line 229, in _cursor
>> self.ensure_connection()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
>> line 213, in ensure_connection
>> self.connect()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/utils.py",
>> line 94, in __exit__
>> six.reraise(dj_exc_type, dj_exc_value, traceback)
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
>> line 213, in ensure_connection
>> self.connect()
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/base/base.py",
>> line 189, in connect
>> self.connection = self.get_new_connection(conn_params)
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/django/db/backends/postgresql/base.py",
>> line 176, in get_new_connection
>> connection = Database.connect(**conn_params)
>>   File
>> "/home/flavien/MyProjects/analyseprotection/local/lib/python2.7/site-packages/psycopg2/__init__.py",
>> line 126, in connect
>> conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
>> django.db.utils.OperationalError: FATAL:  password authentication failed
>> for user "postgres"
>> FATAL:  password authentication failed for user "postgres"
>>
>
>
> I've the same problem, but I was inputing a wrong string in field
> password, do you checked if as wrong?
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/5bba54a0-4458-4743-8a1c-f040f1ad4b46%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrqRAm

Re: Update _id field before .save() for ForeignKey

2019-11-30 Thread Integr@te System
Hi ,

Please lookandfeel on
Moving an object from one database to another¶
<https://docs.djangoproject.com/en/2.0/topics/db/multi-db/#moving-an-object-from-one-database-to-another>

https://docs.djangoproject.com/en/2.0/topics/db/multi-db/#moving-an-object-from-one-database-to-another

On Sat, Nov 30, 2019, 15:39 Dvenum  wrote:

> Integr@te System,
>
> This is True: id(company) == id(company_value.company)
> So, we have exact the same object company, .id is ready on .save() call,
> but internal meta dictionary still has None, because it was none when
> company_value created.
>
> On Sat, Nov 30, 2019 at 2:39 PM Integr@te System 
> wrote:
>
>> Hi Dvenun,
>>
>> Bc of  Django implement accord to python, of cause child inherit from
>> parent existence.
>>
>>
>> https://docs.python.org/3.7/library/functions.html#id
>>
>>
>> On Sat, Nov 30, 2019, 13:30 Dvenum  wrote:
>>
>>> Interest idea and it works, but not necessary:
>>> company = Company()
>>> #company.id is None
>>> companies.append(company)
>>> Company.objects.bulk_create(companies)
>>> #company.id is 1
>>>
>>> Instead to ask pk from database, it can be used from
>>> company_value.company.id. Django save pk value to internal meta
>>> (models/base.py) and does not update it. This works too:
>>> value.company = value.company # pk updated
>>>
>>> I want to ask, each child object should be created only when parent is
>>> saved to db? Maybe django has something to cover this case?
>>>
>>>
>>> On Sat, Nov 30, 2019 at 7:52 AM Charles Lee 
>>> wrote:
>>>
>>>> I have an idea.
>>>>
>>>>1. `bulk_create` all companies.
>>>>2. `Filter`(SELECT) all `Company` and make it dictionary for
>>>>retrieving company fast.
>>>>3.
>>>>   1. company_dict = {
>>>> ’Name’: ‘pk’,
>>>> ...
>>>>   }
>>>>   4. Create a list of `CompanyValue` with company name and
>>>>company_dict.
>>>>5. `bulk_create` the list.
>>>>
>>>>
>>>> I'm not sure if it will work because I haven't implemented it, but I
>>>> hope it helps.
>>>>
>>>> 2019년 11월 29일 금요일 오후 9시 42분 0초 UTC+9, Maxim Bulatov 님의 말:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I have lot of lists like follow:
>>>>> (Name1): (V1, V2, V3, V4, ..)
>>>>>
>>>>> And I use many threads to create many db objects:
>>>>> company = Company(Name)
>>>>> for x in vector:
>>>>> v = CompanyValue(company=company, value=x)
>>>>> values.append(v)
>>>>>
>>>>> class CompanyValue(models.Model):
>>>>> company = models.ForeignKey('Company', on_delete=models.CASCADE)
>>>>> value = FloatField
>>>>>
>>>>> This pool of threads return all lists, what I combine, filter and want
>>>>> put to database in one bulk_create call.
>>>>> Suddenly, I found, company.id is not ready to be linked in
>>>>> CompanyValue, follow code does not works:
>>>>> Company.objects.bulk_create(companies)
>>>>> CompanyValue.objects.bulk_create(values)  # value.company_id is
>>>>> null here
>>>>>
>>>>> No way to save objects in my threads, because I need to filter objects
>>>>> and can do it only when all of them are collected. Also, it has 
>>>>> performance
>>>>> issues 100k+ of requests is slowly enough. I have two ways to resolve:
>>>>> 1. I can make intermediate class or tuple and create CompanyValue
>>>>> objects only when companies is saved to db. Hard to support, hard to
>>>>> filter, not so clean.
>>>>> 2. I can use dirty hack to update _id field:
>>>>> for v in values:
>>>>> v.company = v.company
>>>>>
>>>>> Can you advice more ways for me? It seems, I don't know something from
>>>>> django features to make it elegant.
>>>>> I see 11 years old issue here (
>>>>> https://code.djangoproject.com/ticket/9553
>>>>> <https://code.djangoproject.com/ticket/9553#no1>) and it marked as
>>>>> intended behaviour.
>>>>>
>>>> --
>>>> You recei

Re: Hosting recommendations please

2019-11-30 Thread Integr@te System
Hi Deb,

Appropriate answer on service provider, bc of your requirement and their
service alway mutability.

On Sat, Nov 30, 2019, 21:01 Debabrata Chakraborty 
wrote:

> Hi everyone,
>
> I'm a beginner Django developer. So my apologies in advance for newbie
> like questions.
>
> I am building my site with *" *Django version 2.2.5 *"* and *" *SQLite
> 3.30 *" *in back-end. My question is -
>
> *#* Do services like "Heroku", "Digital Ocean", "Python Anywhere" and
> "AWS" - have limitation on *which version of Django*  or *which DBMS* I
> can use?
>
> I've seen this before with PHP/MySQL hosting where some hosting companies
> will limit which version of PHP or MySQL one can use. Is the same
> applicable to Django hosting in the above mentioned hosting platforms as
> well?
>
> I will very much grateful if you can help me out with this confusion.
>
> Best
>
> Deb
>
>
>
> On Tuesday, April 2, 2019 at 12:39:39 PM UTC+5:30, Mike Dewhirst wrote:
>>
>> I have to move three Django websites away from my current VM service
>> provider by the end of April because he is going out of the VM business.
>>
>> One is a plain Mezzanine CMS on one VM running Nginx/Gunicorn and the
>> other two are on the second VM running Apache and mod_wsgi.
>>
>> I'm most familiar with Ubuntu 16.04 and hope to go to 18.04.
>>
>> I think the RAM requirements are around 4GB for the Apache sites and
>> half that for Nginx. Haven't done any profiling.
>>
>> I'm in Australia. I'm after stability and reliability and if I'm lucky,
>> scalability.
>>
>> If you have any negative comments about providers please send them
>> off-list.
>>
>> Many thanks
>>
>> Mike
>>
>>
>> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/15cc566b-b17e-45f0-bc68-aba926dbe7f1%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrGsEYGrCSVLqNv6kVRBJaEeX_4NgO5JHcRQ%2BgBnTe2AA%40mail.gmail.com.


Re: django.db.utils.ProgrammingError: relation "django_content_type" already exists

2019-11-30 Thread Integr@te System
Hi issuer,

You do step 4 and step 5 with the same goal!?

On Sun, Dec 1, 2019, 00:03 Ram  wrote:

>  Hi,
>
> I'm blocked with this issue in my newly hosting site. Here is my scenario.
>
>1. I've working site with MySQL database in our development localhost.
>2. I created new hosting server in Digital Ocean's Ubuntu 18.04
>droplet with Postgres db.
>3. I tested the server with empty database and empty Django site when
>I build this hosting server.
>4. I manually migrated MySQL database to Postgres using pgAdmin tool
>and ran 'loaddata'command in virtualenv to load the data to Postgress.
>5.
>
>Now when I ran the following commands I see the same issue as reported
>here.
>6.
>>
>>(vkenv) shami@ubuntu-wed-01:~$ ~/vkproject/manage.py makemigrations
>>No changes detected
>>(vkenv) shami@ubuntu-wed-01~$ ~/vkproject/manage.py migrate
>>Operations to perform:
>>  Apply all migrations: admin, auth, contenttypes, pages, sessions
>>Running migrations:
>>  Applying contenttypes.0001_initial...Traceback (most recent call
>>last):
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>line 82, in _execute
>>return self.cursor.execute(sql)
>>psycopg2.errors.DuplicateTable: relation "django_content_type"
>>already exists
>>
>>The above exception was the direct cause of the following exception:
>>
>>Traceback (most recent call last):
>>  File "/home/shami/vkproject/manage.py", line 21, in 
>>main()
>>  File "/home/shami/vkproject/manage.py", line 17, in main
>>execute_from_command_line(sys.argv)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>line 381, in execute_from_command_line
>>utility.execute()
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>line 375, in execute
>>self.fetch_command(subcommand).run_from_argv(self.argv)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>line 323, in run_from_argv
>>self.execute(*args, **cmd_options)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>line 364, in execute
>>output = self.handle(*args, **options)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>line 83, in wrapped
>>res = handle_func(*args, **kwargs)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/commands/migrate.py",
>>line 234, in handle
>>fake_initial=fake_initial,
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>line 117, in migrate
>>state = self._migrate_all_forwards(state, plan, full_plan,
>>fake=fake, fake_initial=fake_initial)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>line 147, in _migrate_all_forwards
>>state = self.apply_migration(state, migration, fake=fake,
>>fake_initial=fake_initial)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>line 245, in apply_migration
>>state = migration.apply(state, schema_editor)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/migration.py",
>>line 124, in apply
>>operation.database_forwards(self.app_label, schema_editor,
>>old_state, project_state)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/operations/models.py",
>>line 92, in database_forwards
>>schema_editor.create_model(model)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>line 307, in create_model
>>self.execute(sql, params or None)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>line 137, in execute
>>cursor.execute(sql, params)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>line 99, in execute
>>return super().execute(sql, params)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>line 67, in execute
>>return self._execute_with_wrappers(sql, params, many=False,
>>executor=self._execute)
>>  File
>>
>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>line 76, in _execute_with_wrappers
>>return executor(sql, params, many, contex

Re: no such table: main.auth_user__old

2019-12-01 Thread Integr@te System
Hi,
plz use python 3.7.

On Sun, Dec 1, 2019, 01:53 Chetan Rokade  wrote:

> Hi Friends
> Getting below error while adding new user  from admin page. I am using
> python 3.8 with django 2.1 version
> Exception Value:
>
> no such table: main.auth_user__old
>
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/9b9e2d7b-89bd-41c5-bd0f-ce8a865570fb%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWq_FDrUW8aKDKKV03WQNEAOB3U2x9k5-wbF9kKxO32oWg%40mail.gmail.com.


Re: orm relation

2019-12-01 Thread Integr@te System
Hi,

here u can try for complex queryset


https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q

On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:

> ELECT a.matr
>   ,[nom]
>   ,[prn]
>   ,cast([dat_nais] as date) as dat_nais
>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>   ,cast([dat_deces] as date) as dat_deces
>   ,cast([dat_imm] as date) as dat_imm
>   ,cast([dat_aj] as date) as dat_j
>   ,[cod_position]
>   ,YEAR(dat_imm) as anne_imm
>   ,YEAR(dat_encais) as ann_regl
>   ,[annee]
>   ,[cod_nat]
>   ,cast([dat_e
>
> Snc] as date) as dat_regl
>   ,[mt_encais]
>   FROM users a
> left join enca e on e.matr = a.matr
> left join encr c on (c.cod_encais = e.cod_encais)
>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>   order by a.nom_, a.prn, c.annee asc;
>
> hello;
> my models are users, enca; encr;
> who can i performe this query using django ORM, note that i'm using MSSQL;
> thank very much
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com.


Re: How can I host my application in web hosting?

2019-12-01 Thread Integr@te System
Hi friend,

In real world matter, it not just technical aspect, also one should
consider business, services, sth else around from now to future.
For publish in production, ask provider's technical that you want first as
essential basic, break down which items, then business and so on.

In technical, please see previous email of one expert on sharing many
details. On deployment as approximate you implement locally and reference
to doc to migrate.

It just simpler with personal work (for yourself) than company's enviroment.




On Mon, Dec 2, 2019, 01:25 Asif Khan  wrote:

> I am using Webfaction and quit happy. it is quit fast and scalable
> platform for Django application.
>
> On Thursday, August 22, 2019 at 4:47:51 PM UTC+5, Wasim Rana wrote:
>>
>> Hello, I am building a web application locally in my computer. It's
>> almost done and I want to host it in Siteground hosting. How can I do that?
>> Please help.
>> Thanks
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1398c821-9ecb-4a4a-af78-87950f9f623e%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWp6HtJn0RgeH3hxP_4JREbicu3SB-Eci6%2B%3DWFKVgDywGQ%40mail.gmail.com.


Re: Groups and summarys in template

2019-12-01 Thread Integr@te System
Hi Man,
Plz try:
desired_value = Account.object.aggregate( subtotal = sum('Value', filter =
Q(Date = date.todat(




On Mon, Dec 2, 2019, 07:14 Elias Coutinho  wrote:

> Well, the result I expect is a list with subtotals similar to the figure
> below:
>
> [image: image.png]
>
> Can you do it without javascript?
>
> Em sáb., 30 de nov. de 2019 às 03:36, Dvenum 
> escreveu:
>
>> Not sure I understand, what you doing, but you may use F() expression to
>> compare fields in the query:
>>
>> https://docs.djangoproject.com/en/2.2/ref/models/expressions/#f-expressions
>>
>> On Sat, Nov 30, 2019 at 2:36 AM Elias Coutinho 
>> wrote:
>>
>>> Good afternoon people!
>>>
>>> I have the following querysets:
>>>
>>>  accounts = Account.objects.filter (person__is_representative =
>>> False) .order_by ('due date')
>>>  groups = Account.objects.values ('due_date'). annotate (total_day =
>>> Sum ('sold_value')). order_by ('due_date')
>>>
>>>
>>> Accounts Returns a List of Information Sorted by Due Date
>>> groups returns another list sorted and grouped by due date
>>>
>>> I would like django to place a total groups in the template below the
>>> line of accounts when it realizes that the next due date is different from
>>> the previous one, ie totaling by date.
>>>
>>> Can someone help me?
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/8ea05b06-1eb1-4de3-8787-6d80570a6283%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> dvenum
>> dvenum...@gmail.com
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/fxaeopAyJj8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAHBRYSeBvJr6cDTRtUXEqsJFb03cZw66G2jk1DqY_7P7-jYq1g%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Elias Coutinho.
> Aprender sobre alguns assuntos é fundamental.
> Aprender sobre Deus é indiscutivelmente o melhor conteú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 django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CALgom8oa_fEfWMiyCdvr0cWGjKzB9Fk8fENkCjnvXOof%3DKMR%2Bg%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWos_QUR1C2ZTHJreRVutVUEEEw_41sx94bPw6O4YUJqRg%40mail.gmail.com.


Re: Django security releases issued: 2.2.8 and 2.1.15.

2019-12-02 Thread Integr@te System
Many thanks Django Team and Carlton's informing.


On Mon, Dec 2, 2019, 16:28 אורי  wrote:

> Bugfixes is empty on
> https://docs.djangoproject.com/en/2.2/releases/2.1.15/
> אורי
> u...@speedy.net
>
>
> On Mon, Dec 2, 2019 at 11:12 AM Carlton Gibson 
> wrote:
>
>> Today the Django team issued 2.2.8 and 2.1.15 as part of our security
>> process. These releases address security issues, and we encourage all users
>> to upgrade as soon as possible:
>>
>> https://www.djangoproject.com/weblog/2019/dec/02/security-releases/
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/37826578-136E-422F-84F3-9C01C6A4625E%40gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CABD5YeFzL_QF6UYy5nG4Jxb0ANJxaFoL%2BQhE-W%3DqvioLWaLSMw%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrf_MXoWG0mBbVZtJTCaRifMtoNmEezLtQDB%3DAa3zF9wg%40mail.gmail.com.


Re: orm relation

2019-12-02 Thread Integr@te System
Hi friend,

All_list = list(users.object.aggregate(age =
cast(extractyear(datetime.now()) - extractyear(dat_nais), output_field =
IntField())).filter(extractyear(dat_enc) - extractyear(annee)__gt = 3
& extractyear(datetime.now())
- extractyear(dat_nais)__IN=range(54,70) & cod_nad__contain =
'CN').order_by('num___annee',
'prn'))


Plz add more alias field as your sql command according to a sample above.

Ps: check your question first(sql), then pass to communities.



On Mon, Dec 2, 2019, 21:16 bill dexter <55dexte...@gmail.com> wrote:

> thank you, but if you can give me answer to this  exacte probleme, as
> mentioned in question
>
> Le dim. 1 déc. 2019 à 18:55, Integr@te System 
> a écrit :
>
>> Hi,
>>
>> here u can try for complex queryset
>>
>>
>>
>> https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q
>>
>> On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:
>>
>>> ELECT a.matr
>>>   ,[nom]
>>>   ,[prn]
>>>   ,cast([dat_nais] as date) as dat_nais
>>>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>>>   ,cast([dat_deces] as date) as dat_deces
>>>   ,cast([dat_imm] as date) as dat_imm
>>>   ,cast([dat_aj] as date) as dat_j
>>>   ,[cod_position]
>>>   ,YEAR(dat_imm) as anne_imm
>>>   ,YEAR(dat_encais) as ann_regl
>>>   ,[annee]
>>>   ,[cod_nat]
>>>   ,cast([dat_e
>>>
>>> Snc] as date) as dat_regl
>>>   ,[mt_encais]
>>>   FROM users a
>>> left join enca e on e.matr = a.matr
>>> left join encr c on (c.cod_encais = e.cod_encais)
>>>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
>>> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>>>   order by a.nom_, a.prn, c.annee asc;
>>>
>>> hello;
>>> my models are users, enca; encr;
>>> who can i performe this query using django ORM, note that i'm using
>>> MSSQL; thank very much
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com
>>> <https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAA7%3DR20i-DNEFTgdHQ7bjmvzQHrmML3LjzamrSiK07oJgbC_%2Bw%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAA7%3DR20i-DNEFTgdHQ7bjmvzQHrmML3LjzamrSiK07oJgbC_%2Bw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoRjYGOMbQf2Lz9npLi7%2BhsOfDoN-wYLAUAjbr9ites-Q%40mail.gmail.com.


Re: Link a .css to a Html template

2019-12-02 Thread Integr@te System
Hi Leo,

Plz look at err/change log in developer tools to inspect whats up, after
you adjust files.



On Tue, Dec 3, 2019, 06:20 Gerardo Palazuelos Guerrero <
gerardo.palazue...@gmail.com> wrote:

> Hi,
> You better share your repo, my guess is you are not sharing all details...
>
> On my case I integrated a template with a Django project as a practice (
> my repo: https://github.com/gpalazuelosg/django-adminlte ), the important
> bits:
>
> #1: settings.py has at the end two entries:
> STATIC_URL = '/static/'
> STATICFILES_DIRS = (os.path.join(BASE_DIR,'static'),)
>
> #2: I have an "static" folder at the same level as manage.py, which has
> another folder called "base" inside
>
> #3: inside the /static/base folder, I have the following folders
> containing pertinent files as you might imagine:
> css
> js
> img
> plugins
>
> #4: On my layout.html file, I use the following:
> {% load static %}
> ...
> 
>
>
> This is how it looks:
>
>
>
> I hopes that helps.
>
> --
> Gerardo Palazuelos Guerrero
>
>
>
> On Mon, Dec 2, 2019 at 3:09 PM Leó Horváth 
> wrote:
>
>> hi,
>> I did what Kevin requested, now console says "GET /pages/ HTTP/1.1" 200
>> 536 and the style still doesn't work.
>> Any ideas?
>> Thanks,
>> Leó
>>
>> Kevin Dublin  ezt írta (időpont: 2019. dec. 2., H,
>> 21:41):
>>
>>> Hi Leo,
>>>
>>> Make sure that you point to the exact directory where the CSS file is
>>> located. If it's in static/pages/frame.css, then point to {% static
>>> "pages/frame.css" %}
>>>
>>> Cheers,
>>>
>>> Kevin
>>>
>>> On Mon, Dec 2, 2019, 11:15 AM Leó Horváth 
>>> wrote:
>>>
 hi! i still cant make it work. this is my html snippet and the .css is
 located at static/pages/frame.css.
 when i run the server the browser displays the hard coded html but not
 the style. console says "GET /static/frame.css HTTP/1.1" 404 1651
 

 {% load static %}

 
 
 
 {% block css %}
 
 {% endblock %}

 ‪‫אורי‬‎  ezt írta (időpont: 2019. dec. 2., H, 3:33):‬

> Hi,
>
> Look at these templates for example:
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/core/templates/base.html#L12-L27
>
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/base_site.html#L7-L13
>
>
> https://github.com/speedy-net/speedy-net/blob/master/speedy/match/templates/accounts/edit_profile/activate.html#L13-L18
>
>
> אורי
> u...@speedy.net
>
>
> On Mon, Dec 2, 2019 at 3:26 AM Leó Horváth 
> wrote:
>
>> Hi guys, I am experiencing an error while trying to Link a .css file
>> to a Html template of one of my Views. What is the correct way to do it?
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/b37e10ec-3b9d-4178-8757-1d0277f6cd15%40googlegroups.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CABD5YeHFgym3pJ4Q5_gE3ATWJiVJ9KDnoBCN8UqM0%2BhWPxXpbg%40mail.gmail.com
> 
> .
>
 --
 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 the web visit
 https://groups.google.com/d/msgid/django-users/CAJBcW0w3qc8OcDgCJAFKrr881%2B2wyAyY3ENH6%3D2bi%2Bn%2BFALBDA%40mail.gmail.com
 
 .

>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/CANips4LSgRBQ1QAg7gDgq70r--d4zDvQc%3DnfoiwcyomLEJaj%3Dg%40mail.gmail.com
>>> 

Re: orm relation

2019-12-03 Thread Integr@te System
Hi issuer,

Plz refer to docs to customize statement base on your use case, my work for
a sample with limited time. Plz try remove space around equal sign.



On Tue, Dec 3, 2019, 19:26 bill dexter <55dexte...@gmail.com> wrote:

> hi friend;
> i tryed your answer, but it says that error in syntax near  __gt  in ""
> extractyear(dat_enc) - extractyear(annee)__gt = 3""; don't work
>
> Le lun. 2 déc. 2019 à 20:31, Integr@te System 
> a écrit :
>
>> Hi friend,
>>
>> All_list = list(users.object.aggregate(age =
>> cast(extractyear(datetime.now()) - extractyear(dat_nais), output_field =
>> IntField())).filter(extractyear(dat_enc) - extractyear(annee)__gt = 3 & 
>> extractyear(datetime.now())
>> - extractyear(dat_nais)__IN=range(54,70) & cod_nad__contain = 
>> 'CN').order_by('num___annee',
>> 'prn'))
>>
>>
>> Plz add more alias field as your sql command according to a sample above.
>>
>> Ps: check your question first(sql), then pass to communities.
>>
>>
>>
>> On Mon, Dec 2, 2019, 21:16 bill dexter <55dexte...@gmail.com> wrote:
>>
>>> thank you, but if you can give me answer to this  exacte probleme, as
>>> mentioned in question
>>>
>>> Le dim. 1 déc. 2019 à 18:55, Integr@te System 
>>> a écrit :
>>>
>>>> Hi,
>>>>
>>>> here u can try for complex queryset
>>>>
>>>>
>>>>
>>>> https://docs.djangoproject.com/en/2.2/topics/db/queries/#complex-lookups-with-q
>>>>
>>>> On Sun, Dec 1, 2019, 21:08 bill dexter <55dexte...@gmail.com> wrote:
>>>>
>>>>> ELECT a.matr
>>>>>   ,[nom]
>>>>>   ,[prn]
>>>>>   ,cast([dat_nais] as date) as dat_nais
>>>>>   , (YEAR(getdate()) - YEAR(dat_nais)) as age
>>>>>   ,cast([dat_deces] as date) as dat_deces
>>>>>   ,cast([dat_imm] as date) as dat_imm
>>>>>   ,cast([dat_aj] as date) as dat_j
>>>>>   ,[cod_position]
>>>>>   ,YEAR(dat_imm) as anne_imm
>>>>>   ,YEAR(dat_encais) as ann_regl
>>>>>   ,[annee]
>>>>>   ,[cod_nat]
>>>>>   ,cast([dat_e
>>>>>
>>>>> Snc] as date) as dat_regl
>>>>>   ,[mt_encais]
>>>>>   FROM users a
>>>>> left join enca e on e.matr = a.matr
>>>>> left join encr c on (c.cod_encais = e.cod_encais)
>>>>>   where (YEAR(c.dat_enc) - c.annee > 3 ) and ((YEAR(getdate()) -
>>>>> YEAR(a.dat_nais)) between 54 and 70) and c.cod_nat = 'CN'
>>>>>   order by a.nom_, a.prn, c.annee asc;
>>>>>
>>>>> hello;
>>>>> my models are users, enca; encr;
>>>>> who can i performe this query using django ORM, note that i'm using
>>>>> MSSQL; thank very much
>>>>>
>>>>> --
>>>>> 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 the web visit
>>>>> https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/django-users/85f7f91b-0f52-4a96-8700-bee588eb4a3d%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> 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 the web visit
>>>> https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-users/CAP5HUWqap3ddCEmW-7yD_uRWhwxDNQdSNZ%2BQPPvHzcAwDf1e5Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To unsubscribe from this group and stop receiving email

Re: Exception in thread django-main-thread:

2019-12-04 Thread Integr@te System
Hi Issuer,

plz check existent of userdetailsu module in newapp/form.py and add newapp
before .form in views.py file




On Wed, Dec 4, 2019, 18:27 Michael Mathonsi  wrote:

> Please help with resolving my application, i have setup the environment
> and almost finished my application when the system decided out  of knowhere
> to generate the following errors and im due for presentation by tomorrow.
>
>
>
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 917, in
> _bootstrap_inner
> self.run()
>   File "C:\Users\tamik\Anaconda3\lib\threading.py", line 865, in run
> self._target(*self._args, **self._kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\autoreload.py",
> line 54, in wrapper
> fn(*args, **kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\commands\runserver.py",
> line 117, in inner_run
> self.check(display_num_errors=True)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 390, in check
> include_deployment_checks=include_deployment_checks,
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\management\base.py",
> line 377, in _run_checks
> return checks.run_checks(**kwargs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\registry.py",
> line 72, in run_checks
> new_errors = check(app_configs=app_configs)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 40, in check_url_namespaces_unique
> all_namespaces = _load_all_namespaces(resolver)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\core\checks\urls.py",
> line 57, in _load_all_namespaces
> url_patterns = getattr(resolver, 'url_patterns', [])
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 584, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns",
> self.urlconf_module)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\utils\functional.py",
> line 80, in __get__
> res = instance.__dict__[self.name] = self.func(instance)
>   File
> "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\resolvers.py", line
> 577, in urlconf_module
> return import_module(self.urlconf_name)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newproject\urls.py", line 21, in 
> path('', include('newapp.url')),
>   File "C:\Users\tamik\Anaconda3\lib\site-packages\django\urls\conf.py",
> line 34, in include
> urlconf_module = import_module(urlconf_module)
>   File "C:\Users\tamik\Anaconda3\lib\importlib\__init__.py", line 127, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in
> _call_with_frames_removed
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\url.py", line 2, in 
> from . import views
>   File "C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\views.py", line 6, in 
> from .form import userdetailsum, userdetailsu, userdetailsup,
> DateForm, formtrend
> ImportError: cannot import name 'userdetailsu' from 'newapp.form'
> (C:\Users\tamik\Videos\Mike_Project\Dsc\dsc_project -
> Copy\newproject\newapp\form.py)
>
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/d84b8a6f-5917-4080-abdd-30f41cd4826d%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
ht

Re: what tool will be using for Continues integration in python projects??

2019-12-04 Thread Integr@te System
Hi,
Pythonist(a) -pybuilder.

On Thu, Dec 5, 2019, 00:52 DANIEL URBANO DE LA RUA 
wrote:

> You can use jenkins with whatever language you use
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/ac939c48-a145-4d55-9a26-443151275676%40googlegroups.com
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWqTvHzgjxgqES63OE49yt6_Gwp3ThwYnVJsUT9VGrtSww%40mail.gmail.com.


Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-04 Thread Integr@te System
Hi Issuer,
Plz show result with errors.

Tks.

On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> I am in the process of developing a small project using django rest
> framework, and within that requirement, I need to list every table in one
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on
> my web page. But other than that, when I am trying to add other APIViews,
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that
> didn't work. Please help.
>
> Thank you
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo1YnZf9Y0cOUYtYc-noQTzVz%3Do90k9Fy37SD%2BPcqQ75Q%40mail.gmail.com.


Re: reg: How to call multiple APIView in one single web page as a list of items?

2019-12-05 Thread Integr@te System
Hi Issuer,

U see QuizList bc of Question queryset been get validate_data when
initilize quiz object instance.

Plz refer to docs to customise ur other view.
https://www.django-rest-framework.org/api-guide/serializers/

On Thu, Dec 5, 2019, 02:15 'Amitesh Sahay' via Django users <
django-users@googlegroups.com> wrote:

> Hi,
>
> There is no error. But based on the urls settings I could see the
> "QuizList" output to my web page. Other than that, other serializers are
> not being displayed there. Below is the serializers.py
>
> from rest_framework import serializers
> from .models import Quiz, Question, QuizTakers, Answer, User
> from django.contrib.auth import authenticate, login
>
>
> class userSerializer(serializers.HyperlinkedModelSerializer):
> class Meta:
> model = User
> fields = 'email'
>
>
> class QuizSerializer(serializers.ModelSerializer):
> class Meta:
> model = Quiz()
> fields = ('name', 'questions_count', 'description', 'created', 
> 'roll_out')
>
> def createQuestion(self, validated_data):
> return Question().objects.create_question(**validated_data)
>
>
> class AnswerSerializer(serializers.ModelSerializer):
> class Meta:
> model = Answer()
> fields = ('question', 'text', 'is_correct')
>
>
> class QuestionSerializer(serializers.ModelSerializer):
>
> class Meta:
> model = Question()
> fields = ('quiz', 'label', 'order')
>
>
> class QuizTakerSerializer(serializers.HyperlinkedModelSerializer):
> class Meta:
> model = QuizTakers()
> fields = ('user', 'quiz', 'correct_answers', 'completed', 'timestamp')
>
>
>
> Regards,
> Amitesh
>
>
> On Thursday, 5 December, 2019, 12:19:34 am IST, Integr@te System <
> datacentral...@gmail.com> wrote:
>
>
> Hi Issuer,
> Plz show result with errors.
>
> Tks.
>
> On Thu, Dec 5, 2019, 01:31 'Amitesh Sahay' via Django users <
> django-users@googlegroups.com> wrote:
>
> I am in the process of developing a small project using django rest
> framework, and within that requirement, I need to list every table in one
> single page. Below is the code snippet.
>
> class QuizList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Quiz.objects.all()
> return Response({'quiz': queryset})
>
> class AnswerList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Answer.objects.all()
> return Response({'answer': queryset})
>
> class QuestionList(APIView):
> renderer_classes = [TemplateHTMLRenderer]
> template_name = 'adminView.html'
>
> def get(self, request):
> queryset = Question.objects.all()
> return Response({'question': queryset})
>
> In the above snippet, I am able to list the very first class "QuizView" on
> my web page. But other than that, when I am trying to add other APIViews,
> they are simply not happening. Below is the HTML template:
>
> 
> 
> Admin View
> {% for quizez in quiz %}
>
> {{ quizez.name }}
> {% endfor %}
> 
> 
> {% for questions in question %}
> {{ questions.label }}
> {% endfor %}
> 
> {% for answers in answer %}
> {{ answer.text }}
> {% endfor %}
> 
>
> I tried to put all the for loops within a single "ul", but even that
> didn't work. Please help.
>
> Thank you
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.com
> <https://groups.google.com/d/msgid/django-users/1895937763.9174288.1575484276499%40mail.yahoo.com?utm_medium=email&utm_source=footer>
> .
>
> --
> 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 discus

Re: Django DEBUG magic, and a bizarre bug under django-extra-views

2019-12-07 Thread Integr@te System
Hi issuer,

Plz look at model built by UpdateWithInlinesView
to see if you mistake from limit of string return from get_absolute_url()
https://django-extra-views.readthedocs.io/en/latest/pages/formset-views.html#createwithinlinesview-and-updatewithinlinesview

https://docs.djangoproject.com/en/2.2/ref/models/instances/

must contain ASCII RFC2396 section 2

On Sat, Dec 7, 2019, 20:27 Daniel Chimeno  wrote:

> +1 to more document about DEBUG magic.
>
>
> El sábado, 7 de diciembre de 2019, 0:08:41 (UTC+1), Alaina Rowe escribió:
>>
>> I have not been able to reproduce the bug I am about to describe when
>> DEBUG is True, whether in production on Apache or locally on the Django dev
>> server. So my first question is: What is all the magic that Django DEBUG
>> does behind the scenes? The documentation doesn't have very much
>> information about this.
>>
>> Now for the bug. I understand that the following description is too
>> bare-bones for anyone to reproduce, but I have IP to protect, and I don't
>> have much hope of the error being reproduced anyway.
>>
>> Suppose I have a Django project with at least two apps, app alice with
>> model A and app bob with model B.
>>
>> I am using UpdateWithInlinesView from django-extra-views. The error
>> occurs when this view constructs a formset from instances of model A. In my
>> email about the 500, I get a message like this:
>>
>> FieldError at /some/url/
>> Cannot resolve keyword 'field_of_A' into field. Choices are:
>> field_of_B_1, field_of_B_2, field_of_B_3
>>
>> I've gotten this type of error before. It normally happens when you tell
>> a form "I'm using model C" and "I'm using a field called debbie" and model
>> C doesn't have a field called debbie. That part makes sense. But this error
>> makes it look like it's checking against the field names of model B when it
>> should be checking model A. I have been racking my brain trying to figure
>> out how in the world the construction of a form from one model would
>> consult a different model from a different app.
>>
>> Furthermore, this doesn't happen most of the time, it goes away on server
>> restart, and it doesn't happen under DEBUG = True. So I'm wondering if it's
>> an app registry issue, some sort of race condition that gets the registry
>> out of whack. If so, then I might get somewhere by either understanding the
>> app registry better or understanding what DEBUG does.
>>
>> Any thoughts?
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/fb61e2e6-001b-407c-b966-a3c1dc203a59%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpryMyyy5xji4NtgYUAZg0NYu1mpRt_LAqfdhtCy8xO8w%40mail.gmail.com.


Re: ''workon' is not recognized as an internal or external command, operable program or batch file'

2019-12-07 Thread Integr@te System
Hi,

I have homeless, without meal, non friend, unfamily.
Do you want asking me from hiring!?

Just jokes j.
Regards.

On Sun, Dec 8, 2019, 00:47 Dvs Khamele  wrote:

> Hi do you hire contract based python/django freelancer?
>  I can help you in this
> Best Regards,
> Divyesh Khamele
>
> On Sat, 7 Dec 2019 at 20:18, Khaleel Ahmed H. M. Shariff <
> khaleelahme...@gmail.com> wrote:
>
>> Hi Hima,
>> May Peace, Blessings & Mercy of Almighty God be on you!
>> workon is a module. do a *pip install workon*
>>
>> If you still get the same message. You could execute *python -m workon
>> test*
>>
>>
>> Hope this helps
>> Best of Luck.
>>
>>
>> God Bless You!
>> God Bless India!!
>> --
>>
>> Love & Regards
>> Dr. Khaleel Ahmed H. M.
>>
>> Managing Director, Tanzanite Realty India Private Limited
>>
>> ---
>>
>> Human Life is Precious
>> Koran Surah Ma'idah Chapter 5 Verse 32:
>> If anyone killed a person, not in retaliation of murder, or (and) to
>> spread mischief in the land - it would be as if he killed all mankind, & if
>> anyone saved a life, it would be as if he saved the life of all mankind.
>>
>>
>> On Sat, Dec 7, 2019 at 6:58 PM Hima Bindu chowdary 
>> wrote:
>>
>>> I am trying to get into virtual environment in vscode but get the below
>>> error ..
>>>
>>> C:\Users\User\projects\telusko>workon test
>>> 'workon' is not recognized as an internal or external command,
>>> operable program or batch file.
>>>
>>> did some research..implemented some things suggested
>>> 1.The python extension 'pylint' in vscode was installed.
>>> 2.The python interpreter is chosen.
>>> Do we need to make changes to path? please suggest..
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/9ab0fe68-7e7f-4a99-b66c-09e06f7f13e4%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/CAMjBbiA-qW%2BvHMapMk%3Ds2A_hUDgSzX7ngukng3fT%3Dw1VvWiHsA%40mail.gmail.com
>> 
>> .
>>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAH9mneXYJGaJJLP3r2RGL2ki8y_9i%3DzVws6AC%3DqbYd9%2BH%3DyOqw%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpXxLvvqrNhgk9v6OSiepYaRgKJwC_wOCUShW8kwi_ouQ%40mail.gmail.com.


Re: django.db.utils.ProgrammingError: relation "django_content_type" already exists

2019-12-08 Thread Integr@te System
Hi issuer,

Check if your app development in localhost whether fall into any restricted
case relate to Django content type:
https://docs.djangoproject.com/en/3.0/topics/db/multi-db/



On Sun, Dec 8, 2019, 07:08 Ram  wrote:

> Hi,
>
> As a next step I tried the following but the result is is same. Please let
> me know if you have any clue on this?
>
> 1. Deleted/Dropped 'django_content_type' table from database
> 2. I upgraded Django to version 3.0 from 2.2.7 in my virtual environment
> and ran the following commands
>
> 1. $ python manage.py migrate --fake
> 2. $ python manage.py migrate --fake--initial
> 3. $ python manage.py migrate
>
> But I still see same error
> django.db.utils.ProgrammingError: relation "django_content_type" does not
> exist
> LINE 1: ..."."app_label", "django_content_type"."model" FROM "django_co...
>
> On Wed, Dec 4, 2019 at 3:41 PM Ram  wrote:
>
>> Hello Naveen,
>>
>> I already tried that before posting my last update but the result is the
>> same though. Here I'm pasting the result. This is a total blocker to me. I
>> appreciate if someone can unblock me.
>>
>> $ python manage.py migrate --fake-initial
>>> Operations to perform:
>>>   Apply all migrations: admin, auth, contenttypes, pages, sessions
>>> Running migrations:
>>>   Applying contenttypes.0002_remove_content_type_name...Traceback (most
>>> recent call last):
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>> line 84, in _execute
>>> return self.cursor.execute(sql, params)
>>> psycopg2.errors.UndefinedColumn: column "name" of relation
>>> "django_content_type" does not exist
>>>
>>>
>>> The above exception was the direct cause of the following exception:
>>>
>>> Traceback (most recent call last):
>>>   File "manage.py", line 21, in 
>>> main()
>>>   File "manage.py", line 17, in main
>>> execute_from_command_line(sys.argv)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 381, in execute_from_command_line
>>> utility.execute()
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/__init__.py",
>>> line 375, in execute
>>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 323, in run_from_argv
>>> self.execute(*args, **cmd_options)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 364, in execute
>>> output = self.handle(*args, **options)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/base.py",
>>> line 83, in wrapped
>>> res = handle_func(*args, **kwargs)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/core/management/commands/migrate.py",
>>> line 234, in handle
>>> fake_initial=fake_initial,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 117, in migrate
>>> state = self._migrate_all_forwards(state, plan, full_plan,
>>> fake=fake, fake_initial=fake_initial)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 147, in _migrate_all_forwards
>>> state = self.apply_migration(state, migration, fake=fake,
>>> fake_initial=fake_initial)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/executor.py",
>>> line 245, in apply_migration
>>> state = migration.apply(state, schema_editor)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/migration.py",
>>> line 124, in apply
>>> operation.database_forwards(self.app_label, schema_editor,
>>> old_state, project_state)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/migrations/operations/fields.py",
>>> line 249, in database_forwards
>>> schema_editor.alter_field(from_model, from_field, to_field)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 535, in alter_field
>>> old_db_params, new_db_params, strict)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/postgresql/schema.py",
>>> line 124, in _alter_field
>>> new_db_params, strict,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 685, in _alter_field
>>> params,
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/base/schema.py",
>>> line 137, in execute
>>> cursor.execute(sql, params)
>>>   File
>>> "/home/shami/vkproject/vkenv/lib/python3.6/site-packages/django/db/backends/utils.py",
>>> line 99, in execute
>>> return super().execute(sql, params)
>>>   File
>>> "/home/shami/vkproj

Re: Ayuda como pasar un sql al ORM Django

2019-12-09 Thread Integr@te System
Hi friend,

https://docs.djangoproject.com/en/2.2/topics/db/queries/

On Sun, Dec 8, 2019, 04:57 DEYMER DE JESUS HOYOS PEREZ <
ddhoy...@misena.edu.co> wrote:

> Me gustaría saber como puedo pasar esta consulta de postgresql usando el
> orm de django
>
> SELECT  peluqueria_persona."Nombre", "GananciaEmpleado" From venta_venta
> INNER JOIN cita_cita ON  cita_cita.id = "Cita_id"
> INNER JOIN peluqueria_empleado  ON cita_cita.id = "Empleado_id"
> INNER JOIN peluqueria_persona  ON "Contacto_id" = peluqueria_persona.id ;
>
> gracias..
>
>
>
> *Declinación de Responsabilidades:* Los servicios de MISENA son
> soportados tecnológicamente por © Google y ofrecidos por el Servicio
> Nacional de Aprendizaje – SENA de manera gratuita a los aprendices e
> instructores de programas de formación titulada, las opiniones que contenga
> este mensaje son exclusivas de su autor y no representan la opinión del
> Servicio Nacional de Aprendizaje o de sus autoridades. El receptor deberá
> verificar posibles virus informáticos que tenga el correo o cualquier
> anexo, razón por la cual el SENA no es responsable de los daños causados
> por cualquier virus transmitido en este correo electrónico.
>
> Los contenidos, textos, imágenes, archivos enviados en este mensaje son
> responsabilidad exclusiva del remitente y no reflejan ni comprometen de
> ninguna manera a la institución. No se autoriza el uso de esta herramienta
> para el intercambio de correos masivos, cadenas o spam, ni de mensajes
> ofensivos, de carácter político, sexual o religioso, con fines de lucro,
> con propósitos delictivos o cualquier otro mensaje que se considere
> indebido o que vaya en contra de la Ley.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/2d6faf86-b14b-44fd-8cdd-b7191d1e0b5a%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWroh7cg38CbTo_FCyjnx0YrssqGUjwi%3DQ_MBgQC254s5g%40mail.gmail.com.


Re: Hiring an engineer in San Francisco

2019-12-10 Thread Integr@te System
Hi PollyEx team,
Thank for your sharing.


On Tue, Dec 10, 2019, 06:03 Erik Gunderson  wrote:

> PollyEx is hiring a full stack software engineer with an emphasis in
> django. Our team is looking for a full-time employee able to work in our
> San Francisco office.  The stack is python/django/pandas/vue/heroku
>
> To apply visit -
> https://jobs.lever.co/pollyex/23e8fee3-8a9f-4bf1-9943-8584ab9b6c0a or
> www.pollyex.com
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/154a4188-be29-40f5-82dc-1cec3906ffbf%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrJi%3DmCSWMp2ZOtgtAKKvytxhWSCQqFt-UES%2BypVyrmEA%40mail.gmail.com.


Re: Sending XML data from Django to another server (SAP)

2019-12-10 Thread Integr@te System
Hi,
https://pypi.org/project/django-import-export-xml/

On Tue, Dec 10, 2019, 19:20 Pema Galey  wrote:

> Thank you for your interest..
> But I have developed my Django application and now I am looking for best
> method to send data from Django server to SAP using XML Format.
> Just I want the recommendation.
>
> Thank you
>
> On Dec 7, 2019, at 6:46 PM, Dvs Khamele  wrote:
>
> Hi do you hire contract based python/django freelancer?
>  I can help you in this and related tasks
> Best Regards,
> Divyesh Khamele
>
> On Sat, 7 Dec 2019 at 19:51, Pema Galey  wrote:
>
>> Hi All,
>> Someone recommend in sending the *data from Django server to SAP server
>> which interprets in XML format.*
>>
>>
>> Thank you
>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users/8e4e2355-bb3b-4695-9770-a18c20249fd0%40googlegroups.com
>> 
>> .
>>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAH9mneVb0Hve4q9QoxxuvA8fmOZcy%2B35JrL7fg6fSOmx-WnzxA%40mail.gmail.com
> 
> .
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/5D0984F4-A70C-4D57-8AE4-5F15649C053D%40gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpo5tVfqwszmxfgDS895njVej%2BicHZrnJJWy1J-Wi%2BRvA%40mail.gmail.com.


Re: How to add navigatinon bar or Menu Bar in Django Admin Panel only

2019-12-11 Thread Integr@te System
Hi,

https://medium.com/crowdbotics/how-to-add-a-navigation-menu-in-django-admin-770b872a9531

On Wed, Dec 11, 2019, 15:22 Balaji Shetty  wrote:

> Hi
>
> Can anyone help me in adding Navigatinon Bar in Django Admin Panel in
> Backend.
>
> I have to generate some customized reports using Aggregate function link
> Sum, Count, Group by on models.
>
> Sample Demo example is shown in Attachment.
>
>
>
>
>
> --
> Mr Shetty Balaji
> Asst. Prof.
> IT Department
> SGGS I&T
> Nanded. My. India
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAECSbOvz%3DisaeDNZpr4TT9D1bLOKQENwNAjdOjY7-eJA2N_COw%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWoSj21byGMnJ8MH0axv_O2%2BnrTLNF72oRqH8gYzzd8t3w%40mail.gmail.com.


Re: Code Inspect

2019-12-11 Thread Integr@te System
Hi,

You may need refer to ModelViewSet class that inherit from GenericAPIView
class

https://www.django-rest-framework.org/api-guide/viewsets/#modelviewset



On Wed, Dec 11, 2019, 16:38 Soumen Khatua  wrote:

>
>
>
>
>
>
>
>
> *class UserViewSet(viewsets.ModelViewSet):queryset =
> get_user_model().objectsserializer_class = UserSerializerdef
> get_permissions(self):if self.request.method == 'POST':
> self.permission_classes = (AllowAny,)return super(UserViewSet,
> self).get_permissions()*
>
> I didn't understand this code,So i have some questions like:
>
> In this Case I'm overriding ModelViewSet get_permissions class,right?
>
> After overriding self.permission_classes variable,I'm returning Parent
> class(ModelViewSet) get_permissions(), Which method(properties)
> will come after calling UserViewSet.
>
> Thank You in advance
>
> Regards,
> Soumen
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WbEBaiizem-Gi2zh5gT1kRpdf-zM75_op2pYOebwTANXw%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpqLWg22Bo6rKEZSfNt%3DvzSPUcJAwEinThMid1envSmjQ%40mail.gmail.com.


Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-12 Thread Integr@te System
Hi,

Django view dont render csrf tag within template form, you should check doc
in warning part
https://docs.djangoproject.com/en/3.0/ref/csrf/

And look at the additional way to resolve your problem.

On Thu, Dec 12, 2019, 16:45 হজমুলা খান  wrote:

> i am integrating some apps to make a bigger project but the problem is
> when i try insert ckeditor in html login page it is not showing. for this
> reason i tried to make separate app is to see whats going on here. i am
> showing you the code in detail.
> editing/settings.py:
>
>
> ..
> INSTALLED_APPS = [
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'editor',
> 'ckeditor_uploader',
> 'ckeditor',
> ]
> TEMPLATES = [
> {
>
> 'DIRS': [os.path.join(BASE_DIR,'templates')],
> .
> STATIC_URL = 'editor/static/'
> STATIC_ROOT='editor/static/'
> CKEDITOR_UPLOAD_PATH='editor/static/media/'
>
> editing/urls.py:
>
> from django.contrib import admin
> from django.urls import path, include
> from django.conf import settings
> from django.conf.urls.static import static
>
> urlpatterns = [
> path('admin/', admin.site.urls),
> path('',include('editor.urls')),
> path('ckeditor/',include('ckeditor_uploader.urls')),
> ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
>
> in this case, my static folder is in editor/static when i execute python
> manage.py collectstatic and ckeditor folder is in editor/static directory
> also.
>
> editor/models.py:
>
> from django.db import models
> from ckeditor_uploader.fields import RichTextUploadingField
>
> # Create your models here.
>
> class Post(models.Model):
> title=models.CharField(max_length=255)
> body=models.CharField(max_length=2000)
> description=RichTextUploadingField()
>
> def __str__(self):
> return self.title
>
> editor/admin.py:
>
> from django.contrib import admin
> from .models import Post
>
> admin.site.register(Post)
>
> when i execute python manage.py makemigrations and python manage.py
> migrate, ckeditor can be seen in locahost:8000/admin's new post section
> perfectly. then i tried to make templates.
>
> base.html:
> {% load static %}
> 
> 
> Django blog
> https://fonts.googleapis.com/css?family=Source+Sans+Pro:400";
> rel="stylesheet">
> 
> 
> 
> 
> 
> 
> Django blog
> 
> 
> {% block content %}
> {% endblock content %}
> 
> 
> 
>
> home.html:
> {% extends 'base.html' %}
> {% block content %}
> New post
> 
>
> {% csrf_token %}
> {{ form.media|safe }}
> {{ form.as_p }}
> 
> 
> {% endblock content %}
>
> and then i have created a html file editor/urls.py:
> from django.urls import path
>
> from .views import HomePageView
>
> urlpatterns=[
> path('',HomePageView.as_view(), name='home'),
> ]
>
> and here is the editor/views.py also:
> from django.views.generic import TemplateView
> from .models import Post
>
>
> class HomePageView(TemplateView):
>  model=Post
>  template_name='home.html'
>  fields=['title','body']
>
> i just want to see a simple page of showing new html post editor with
> ckeditor toolbar in it. it's just for seeing what's wrong and why my
> ckeditor toolbar is not showing in my html file. when i run python
> manage.py runserver there is no error showing and the html page is showing
> django post and new post and only the save button. it can't render the form
> of the django's new post. css style is rendered because the django post and
> new post has the desired color and font. but why it is not rendering the
> new post form with ckeditor toolbar?
>
> i am still learning and this problem is eating me up. thanx in advance
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/b8c48a91-b67c-4da0-8ce3-b301798a3851%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWpVhjVBiVMJcAqSpnYxxte0gw4TYSTBr3xpagH0QYotKw%40mail.gmail.com.


Re: ckeditor toolbar is not showing in html new post page.. why home.html (for adding a new post) is not showing the rendered django form for add new post?

2019-12-13 Thread Integr@te System
Hi Issuer,

Plz check docs again for resolve your matter.
Try either set csrf token cookies or use ensure_csrf_cookie()
https://docs.djangoproject.com/en/3.0/ref/csrf/#django.views.decorators.csrf.ensure_csrf_cookie

On Fri, Dec 13, 2019, 05:10 হজমুলা খান  wrote:

> thanx for your advice and i removed  {% csrf_token %} and still same.
> problem is not solved. add post form is not showing.
>
>
>
> On Thursday, December 12, 2019 at 3:24:48 PM UTC, Integr@te System wrote:
>>
>> Hi,
>>
>> Django view dont render csrf tag within template form, you should check
>> doc in warning part
>> https://docs.djangoproject.com/en/3.0/ref/csrf/
>>
>> And look at the additional way to resolve your problem.
>>
>> On Thu, Dec 12, 2019, 16:45 হজমুলা খান  wrote:
>>
>>> i am integrating some apps to make a bigger project but the problem is
>>> when i try insert ckeditor in html login page it is not showing. for this
>>> reason i tried to make separate app is to see whats going on here. i am
>>> showing you the code in detail.
>>> editing/settings.py:
>>>
>>>
>>> ..
>>> INSTALLED_APPS = [
>>> 'django.contrib.admin',
>>> 'django.contrib.auth',
>>> 'django.contrib.contenttypes',
>>> 'django.contrib.sessions',
>>> 'django.contrib.messages',
>>> 'django.contrib.staticfiles',
>>> 'editor',
>>> 'ckeditor_uploader',
>>> 'ckeditor',
>>> ]
>>> TEMPLATES = [
>>> {
>>>
>>> 'DIRS': [os.path.join(BASE_DIR,'templates')],
>>> .
>>> STATIC_URL = 'editor/static/'
>>> STATIC_ROOT='editor/static/'
>>> CKEDITOR_UPLOAD_PATH='editor/static/media/'
>>>
>>> editing/urls.py:
>>>
>>> from django.contrib import admin
>>> from django.urls import path, include
>>> from django.conf import settings
>>> from django.conf.urls.static import static
>>>
>>> urlpatterns = [
>>> path('admin/', admin.site.urls),
>>> path('',include('editor.urls')),
>>> path('ckeditor/',include('ckeditor_uploader.urls')),
>>> ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
>>>
>>> in this case, my static folder is in editor/static when i execute python
>>> manage.py collectstatic and ckeditor folder is in editor/static directory
>>> also.
>>>
>>> editor/models.py:
>>>
>>> from django.db import models
>>> from ckeditor_uploader.fields import RichTextUploadingField
>>>
>>> # Create your models here.
>>>
>>> class Post(models.Model):
>>> title=models.CharField(max_length=255)
>>> body=models.CharField(max_length=2000)
>>> description=RichTextUploadingField()
>>>
>>> def __str__(self):
>>> return self.title
>>>
>>> editor/admin.py:
>>>
>>> from django.contrib import admin
>>> from .models import Post
>>>
>>> admin.site.register(Post)
>>>
>>> when i execute python manage.py makemigrations and python manage.py
>>> migrate, ckeditor can be seen in locahost:8000/admin's new post section
>>> perfectly. then i tried to make templates.
>>>
>>> base.html:
>>> {% load static %}
>>> 
>>> 
>>> Django blog
>>> https://fonts.googleapis.com/css?family=Source+Sans+Pro:400";
>>> rel="stylesheet">
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Django blog
>>> 
>>> 
>>> {% block content %}
>>> {% endblock content %}
>>> 
>>> 
>>> 
>>>
>>> home.html:
>>> {% extends 'base.html' %}
>>> {% block content %}
>>> New post
>>> 
>>>
>>> {% csrf_token %}
>>> {{ form.media|safe }}
>>> {{ form.as_p }}
>>> 
>>> 
>>> {% endblock content %}
>>>
>>> and then i have created a html file editor/urls.py:
>>> from django.urls import path
>>>
>>> from .views import HomePageView
>>>
>>> urlpatterns=[
>>> path('',HomePageView.as_view(), name='home'),
>>> ]

Re: gunicorn.errors.HaltServer:

2019-12-15 Thread Integr@te System
Hi Issuer,

Try to run command: --preload to whatsup with worker processes and app and
server.

On Sun, Dec 15, 2019, 13:32 Ram  wrote:

> Hi,
>
> I followed this document
> 
> and I’m hitting this error. Could you let me know what I’m missing? I tried
> several things the whole day and nothing has worked? Please let me know if
> you have any solution on this error?
>
> >>> $ sudo systemctl status gunicorn.socket
> >>> Failed to dump process list, ignoring: No such file or directory
> >>> ● gunicorn.socket - gunicorn socket
> >>>Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled;
> vendor preset: enabled)
> >>>Active: active (listening) since Sun 2019-12-15 05:15:27 UTC; 17s
> ago
> >>>Listen: /home/xx/myproject/myapp/myapp.sock (Stream)
> >>>CGroup: /system.slice/gunicorn.socket
> >>>
> >>> Dec 15 05:15:27 ubuntu-s-01 systemd[1]: Listening on gunicorn socket.
> >>>
> >>>
> >>> $ sudo systemctl status gunicorn.service
> >>> ● gunicorn.service - gunicorn daemon
> >>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
> vendor preset: enabled)
> >>>Active: failed (Result: exit-code) since Sun 2019-12-15 04:22:54
> UTC; 53min ago
> >>>  Main PID: 15788 (code=exited, status=1/FAILURE)
> >>>
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.stop()
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: time.sleep(0.1)
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxkenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.reap_workers()
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: raise
> HaltServer(reason, self.WORKER_BOOT_ERROR)
> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:
> gunicorn.errors.HaltServer: 
> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Main process
> exited, code=exited, status=1/FAILURE
> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Failed with
> result 'exit-code'.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/CA%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrcFKT1y_Z0tkQ2qp5Gf-RJ9TPKu33Kmudka1sAu3rymw%40mail.gmail.com.


Re: gunicorn.errors.HaltServer:

2019-12-16 Thread Integr@te System
Hi,

You run on gunicorn cli


On Mon, Dec 16, 2019, 05:28 Ram  wrote:

> Hi Integr,
>
> Thank you for the answer but I don't see '--preload' option for the same
> command. Am I missing anything?
>
>>
>> $ sudo systemctl --preload gunicorn.service
>>> systemctl: unrecognized option '--preload'
>>>
>> $ sudo systemctl status gunicorn.service --preload
>> systemctl: unrecognized option '--preload'
>> $ sudo systemctl --help | grep preload
>>
>
> ~Ram
>
>
>
> On Sun, Dec 15, 2019 at 10:32 AM Integr@te System <
> datacentral...@gmail.com> wrote:
>
>> Hi Issuer,
>>
>> Try to run command: --preload to whatsup with worker processes and app
>> and server.
>>
>> On Sun, Dec 15, 2019, 13:32 Ram  wrote:
>>
>>> Hi,
>>>
>>> I followed this document
>>> <https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04>
>>> and I’m hitting this error. Could you let me know what I’m missing? I tried
>>> several things the whole day and nothing has worked? Please let me know if
>>> you have any solution on this error?
>>>
>>> >>> $ sudo systemctl status gunicorn.socket
>>> >>> Failed to dump process list, ignoring: No such file or directory
>>> >>> ● gunicorn.socket - gunicorn socket
>>> >>>Loaded: loaded (/etc/systemd/system/gunicorn.socket; enabled;
>>> vendor preset: enabled)
>>> >>>Active: active (listening) since Sun 2019-12-15 05:15:27 UTC; 17s
>>> ago
>>> >>>Listen: /home/xx/myproject/myapp/myapp.sock (Stream)
>>> >>>CGroup: /system.slice/gunicorn.socket
>>> >>>
>>> >>> Dec 15 05:15:27 ubuntu-s-01 systemd[1]: Listening on gunicorn socket.
>>> >>>
>>> >>>
>>> >>> $ sudo systemctl status gunicorn.service
>>> >>> ● gunicorn.service - gunicorn daemon
>>> >>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
>>> vendor preset: enabled)
>>> >>>Active: failed (Result: exit-code) since Sun 2019-12-15 04:22:54
>>> UTC; 53min ago
>>> >>>  Main PID: 15788 (code=exited, status=1/FAILURE)
>>> >>>
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.stop()
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: time.sleep(0.1)
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxkenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: self.reap_workers()
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:   File
>>> "/home/xx/myproject/xxenv/lib/python3.6/site-packages/gunicorn/arbi
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]: raise
>>> HaltServer(reason, self.WORKER_BOOT_ERROR)
>>> >>> Dec 15 04:22:54 ubuntu-s-01 gunicorn[15788]:
>>> gunicorn.errors.HaltServer: 
>>> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Main
>>> process exited, code=exited, status=1/FAILURE
>>> >>> Dec 15 04:22:54 ubuntu-s-01 systemd[1]: gunicorn.service: Failed
>>> with result 'exit-code'.
>>>
>>> --
>>> 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 the web visit
>>> https://groups.google.com/d/msgid/django-users/CA%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-users/CA%2BOi5F1FL%3D3eBo7KAu%3DsmSV%2BuCUnUHk7q32TdkkeVGMznUtp7Q%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> 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 the web visit
>> https://groups.google.com/d/msgid/django-users

Re: [URGENT] HOW TO DISPLAY IN HTML A PANDAS PLOTTING IN A DJANGO APPLICATION

2019-12-16 Thread Integr@te System
Hi Gana,

Try implement Django Panda module,
# Create DataFrameManager instance in model
# Query data and then export to Panda dataframe by to_dataframe() method,
# After that convert to JSON data via to_json() method
# Final render on context in any template of html file

On Mon, Dec 16, 2019, 20:55 Guy NANA  wrote:

> Thanks for your answers
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/fe86faf3-829f-4854-907f-fd22966886f0%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo0jziaU7iXgdhsrpEQcEdDLzOxJNEaEwjV1%2B6vj8zmnA%40mail.gmail.com.


Re: manage.py not able to run any commands

2019-12-17 Thread Integr@te System
Hi Phil,

Consider other command look like django-admin.
https://docs.djangoproject.com/en/3.0/ref/django-admin/

On Tue, Dec 17, 2019, 18:35 Phil Yang  wrote:

> Hi,
> All of a sudden, when I tried to run manage.py runserver, it didn't
> produce any output, and it didn't do anything. In fact, the manage.py
> script seems to not be able to run other commands, such as startapp or
> createsuperuser.
>
> I've already used the command many times prior, and it has always worked
> perfectly.
>
> Yes, Python is installed (I can run other scripts), but manage.py seems to
> have an issue.
>
> Thanks.
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/c4b172e2-15a9-4fbf-96b6-e137086f614e%40googlegroups.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWo5bHvrPBXQfHmd4R2MkSg1wecNtuExzSAZCU74d2%3DqLA%40mail.gmail.com.


Re: Django path, Learn Django, Django document

2019-12-21 Thread Integr@te System
Hi Friend,

And as if you seeking for learning quickly search around for web basic
html, css, js each other, example w3school.com... bc of they r combined web
app together.

When you held overview firmly with each part play its role, you can easily
understand how Django codes to be put in html(syntax), python control
behide (reference docs of expert propose previously), many great components
necessary as well.

Happy code.

On Sat, Dec 21, 2019, 23:12 ramadhan ngallen  wrote:

> Hello
> You can use this link
>
> https://www.djangoproject.com
> On 21 Dec 2019, 19:04 +0300, Root Video Dạo , wrote:
>
> Hello everyone!
> I make this thread to find some advice to learn the Django framework.
> I've learned about basic Python and want to learn about Web app using
> Python but I couldn't find the path for this.
> Someone can show me the PATH, DOCUMENT to learn Django.
> Many thank!
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/5705e890-582d-46e4-8b6e-69d5d69b5259%40googlegroups.com
> 
> .
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/4b55d4fa-8e76-4e51-afa1-87a813f72f1e%40Spark
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWow1tcUSoKv7KnCsxi4e%3DXYOGvAdGd79MOJ8FX1czs-Kg%40mail.gmail.com.


Re: A Business Solutions and ERP framework released.

2019-12-22 Thread Integr@te System
Happy code.

On Sun, Dec 22, 2019, 22:23 mohamed khaled 
wrote:

> how long time did you take to finish this project ?
>
> On Dec 22 2019, at 5:19 pm, Ramez Ashraf  wrote:
>
> Hello fellow Django developers,
>
> A framework to create diverse business solutions, equipped with a
> reporting engine and a responsive dashboard.
> https://github.com/ra-systems/ra
>
> On the docs, you'll find a walk-through tutorial where you'll create a
> simple sales monitor app with various reports and Charts.
>
> The project is till in Alpha, and your support and feedback are really
> important and appreciated.
>
> Thank you wonderful Django community :)
>
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/24483074-bf60-4f5f-a01e-fb7a9e66c0a0%40googlegroups.com
> 
> .
>
> --
> 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 the web visit
> https://groups.google.com/d/msgid/django-users/1FAE938F-0DA7-47DB-A4A0-ACD576E54AEA%40getmailspring.com
> 
> .
>

-- 
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 the web visit 
https://groups.google.com/d/msgid/django-users/CAP5HUWrED-D%2B1dT_LUQjBk9bJePKWxMq5Eht2K8jejWP%3Dg1YNg%40mail.gmail.com.


  1   2   >