Re: Api

2020-02-28 Thread Motaz Hejaze
Anything real time will be done by sockets , which i think is not the
solution you need..


On Fri, 28 Feb 2020, 9:19 am Tosin Ayoola,  wrote:

> Good morning guyz,
> I need help on this one,  it on writing api that will Shows the product
> count for each manufacturer as users add products real time.
> I have no idea how to solve this problem,  i will any suggestion
> 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/CAHLKn731GXi2A2i3-7DkVaPrD1Ta%2Bu%2B-ccjK7bA0uW4gdsHjJA%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-cHeQeG-xnB9eotJaTNWpK2KsLgB6Z-2_XFwc5CBPO4CQ%40mail.gmail.com.


Re: How to create entire basic of website design without using django-admin panel

2020-02-28 Thread Motaz Hejaze
So all your problem is django admin ? Why ?

On Fri, 28 Feb 2020, 9:02 am nrupesh08,  wrote:

>
>
> On Friday, February 28, 2020 at 12:19:55 PM UTC+5:30, nrupesh08 wrote:
>>
>>
>>
>> login page based on roles (user, admin). insert data, update data, delete
>> data in (entire rows). only particular update data in table
>> display forms in css class.  the entire page without using django
>> admin. only access front-end.
>>
>User registration also. how to link User table to User registration
> in models.
>
>> any reference complete project for learning. please help me. i am
>> intersted to earn 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/8ef8646f-129f-4ec6-a658-a6f846debc85%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/CAHV4E-dDNMJHkiL9cyriFf_AhxRwncTTjeU7ZePukSXa2ubVkQ%40mail.gmail.com.


Re: How to create entire basic of website design without using django-admin panel

2020-02-28 Thread N Rupesh
not problem. generally, any insert or update. any change user or admin is
used front-end panel. django-admin only database table panel.
their is no limitation. to delivery project. just minimum 2 panel to
delivery (User + Admin). these are only front-end.
that's why i am asking. and all elements to touch the topics in one web
application.
so, plese help me

On Fri, Feb 28, 2020 at 2:43 PM Motaz Hejaze  wrote:

> So all your problem is django admin ? Why ?
>
> On Fri, 28 Feb 2020, 9:02 am nrupesh08,  wrote:
>
>>
>>
>> On Friday, February 28, 2020 at 12:19:55 PM UTC+5:30, nrupesh08 wrote:
>>>
>>>
>>>
>>> login page based on roles (user, admin). insert data, update data,
>>> delete data in (entire rows). only particular update data in table
>>> display forms in css class.  the entire page without using django
>>> admin. only access front-end.
>>>
>>User registration also. how to link User table to User
>> registration in models.
>>
>>> any reference complete project for learning. please help me. i am
>>> intersted to earn 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/8ef8646f-129f-4ec6-a658-a6f846debc85%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/CAHV4E-dDNMJHkiL9cyriFf_AhxRwncTTjeU7ZePukSXa2ubVkQ%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/CAJTpUzn%2B8wxQFuUBCNEti7JqHG_36phDnN_eXWQh-X6ycB4XNg%40mail.gmail.com.


Re: How to create entire basic of website design without using django-admin panel

2020-02-28 Thread nrupesh08
not problem. generally, any insert or update. any change user or admin is 
used front-end panel. django-admin only database table panel. 
their is no limitation. to delivery project. just minimum 2 panel to 
delivery (User + Admin). these are only front-end.
that's why i am asking. and all elements to touch the topics in one web 
application. 
so, plese help me



On Friday, February 28, 2020 at 2:43:10 PM UTC+5:30, Motaz Hejaze wrote:
>
> So all your problem is django admin ? Why ? 
>
> On Fri, 28 Feb 2020, 9:02 am nrupesh08, > 
> wrote:
>
>>
>>
>> On Friday, February 28, 2020 at 12:19:55 PM UTC+5:30, nrupesh08 wrote:
>>>
>>>
>>>
>>> login page based on roles (user, admin). insert data, update data, 
>>> delete data in (entire rows). only particular update data in table
>>> display forms in css class.  the entire page without using django 
>>> admin. only access front-end. 
>>>
>>User registration also. how to link User table to User 
>> registration in models. 
>>
>>> any reference complete project for learning. please help me. i am 
>>> intersted to earn 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/8ef8646f-129f-4ec6-a658-a6f846debc85%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/cc1b6858-e515-4207-aadb-ac4ef69f9cca%40googlegroups.com.


Serializing forms and formsets to pass to Celery task

2020-02-28 Thread Bernd Wechner
I'm using Celery quite effectively with Django as many are. It's just 
awesome for running time consuming background tasks, and providing progress 
bar updates to a web page. Love it.

Now I would like a celery task to do some form processing. That is in a 
Django view, where I have access to the form (or formset) that's just been 
submitted, with all its data (in form.request.POST) and methods (like 
form.save() which saves it to the database as a Django object or objects 
(in the case of a formset). 

Of course anything we pass to a Celery task must be serialized (as it's 
passed through the broker) and there is plenty of help around on 
serializing Django data objects but I can't find diddly squat on serialzing 
forms and every effort I've tried, JSON, pickle, dill, all fails.

I can serialize the POST data of course, and that great but I can't see how 
the Celery task can then re-instantiate a form object from that.

I posted this on stackoverflow as well with some richer detail: 
https://stackoverflow.com/questions/60433090/processing-a-django-form-in-a-celery-task-how-can-the-celery-task-see-the-form

I wonder if anyone has any experience to share here. Essentially I see two 
possible solutions:

   1. Serialize the form or formsets somehow. Anything better than dill out 
   there that might?
   2. Serialize some part of the form or formsets (eg the POST data) and 
   re-instantiate a form or formset at the other end using it. 
   
Either approach would work, 1. would seem less hassle if it has a solution, 
and 2. seems more likely to provide one to me right now.

Kind regards,

Bernd.

-- 
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/20830f05-bd64-40a5-b096-d7e00cb00271%40googlegroups.com.


Re: Django values_list queryset returns queryset object instead of list

2020-02-28 Thread Andréas Kühne
HI Santhosh,

This is expected behaviour because it is a queryset until you query the
results - or iterate over them.

For example:
for item in View.objects.all().values_list('name',flat=True).order_by('id'):
  print(item)

will iterate over the list of values. BUT if you want to evaluate the list
directly you can do this:
views =
list(View.objects.all().values_list('name',flat=True).order_by('id'))

And you will have a regular list.

Regards,

Andréas


Den ons 26 feb. 2020 kl 17:39 skrev Santhosh sridhar <
santhosh.sr...@gmail.com>:

> Hi,
> I have a table named View, I'm filtering values like this : views =
> View.objects.all().values_list('name',flat=True).order_by('id')
> I get the output as  'layout', 'gds', 'netlist', 'gds2def', 'symbol']> instead of list of the
> names. So I face error when try to parse it in jquery
> : jQuery.parseJSON(JSON.stringify("{{views|safe}}".replace(/'/g,
> '"').replace(/u"/g, '"').replace(/"/g, '"'))); it gives me the
> result as  -- >  'layout', 'gds', 'netlist', 'gds2def', 'symbol']> .
>
> How to fix this? Appreciating any help.
>
>
> Regards,
> Santhosh
>
> --
> 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/93ee9e2e-4f23-4de5-bd31-3dba75d5d26b%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/CAK4qSCddJirMUNCQjP7Eg%2BdXBmhnLTRYtudCk3FbpAUip-sEcQ%40mail.gmail.com.


About Django performance

2020-02-28 Thread 이바울
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.


Make a cashier login in a system.

2020-02-28 Thread Kushal Neupane

*I made a Cashier model and added some values from the admin. Now, i need 
an idea to login the system from the Cashier model. I am confused on this 
topic since 6 days.*

-- 
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/8ffaa315-99d9-40ae-b590-1bec132b5e89%40googlegroups.com.


Login in a system

2020-02-28 Thread Kushal Neupane
How to make five post officer in an office and authonticate?

-- 
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/1d41833d-e6a4-4a9b-9b93-57da1c79e976%40googlegroups.com.


Project directory management

2020-02-28 Thread Devender Kumar
Hi,
BTW it is flask app question.

dir structure 
 service 
 config/__init__.py
config/config.py
src/app.py
src/__init__.py

Running the flask app by writing command python src/app.py

Question: I want to access config parameter in flask app from config module 
of config package how can do that. 

*solutions I tried* write *sys.path.append(''../")*  to my src/__init__.py 
file but its not working please help me write this right way.

seems src/__init__.py is not being called.

I don't want to change my dir structure and I don't want to write 
*sys.path.append(''../")* in my app.py file, 

Thanks 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/5b1e9a97-bede-4454-8b32-9d477fe4d954%40googlegroups.com.


Image Upload

2020-02-28 Thread Soumen Khatua
Hi Folks,

I'm using DRF APIView to upload images, but I don't know how to write a
POST request to accept image. Please advise me how I can do it?

my *serializers.py*








*class ImageSerializer(serializers.ModelSerializer):class Meta:
model = Profilefields = ['user','profile_pic']extra_kwargs
= {'user': {'write_only': True}}*

My models.py contain profile_pic as a ImageField.


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/CAPUw6Wax0gjhfSUV0g1h8asaC_av0dA-ntTyETfrWhh%2B6XgZEw%40mail.gmail.com.


Re: About Django performance

2020-02-28 Thread Gil Obradors
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.


Re: Project directory management

2020-02-28 Thread Andréas Kühne
If it is a flask app question, you should ask it on a flask mailing list.
You will probably get better responses :-)

Regards,

Andréas


Den fre 28 feb. 2020 kl 12:08 skrev Devender Kumar :

> Hi,
> BTW it is flask app question.
>
> dir structure
>  service
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config
> module of config package how can do that.
>
> *solutions I tried* write *sys.path.append(''../")*  to my
> src/__init__.py file but its not working please help me write this right
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write
> *sys.path.append(''../")* in my app.py file,
>
> Thanks 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/5b1e9a97-bede-4454-8b32-9d477fe4d954%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/CAK4qSCeB04i%3DYW92upzs0Wk9k_cOSz1KP_vvT0BbYMDqF8uo3w%40mail.gmail.com.


Re: logged in and got logout immediately upon reload the page

2020-02-28 Thread Naveen Arora
cool :)

Cheers,
Naveen Arora

On Thursday, 27 February 2020 12:06:37 UTC+5:30, Roy Huang wrote:
>
> Hi Naveen,
>
> thank you once again for the help
>
> after days of struggling, finally i've got enlightened all of a sudden !
>
> to put it in simple way, 
>
> we have a sync mechanism, which sync local code to production, and we've 
> forgot to exclude db.sqlite3 which accounts resides 
>
> -_- ... what a bummer
>
> thanks Naveen
>
>
>
> Naveen Arora於 2020年2月27日星期四 UTC+8下午1時57分28秒寫道:
>>
>> All you need to do is set AUTH_USER_MODEL = "Yourapp.yourmodelname" in 
>> your setttings.py, delete your entire database and run makemigrations and 
>> migrate again.
>> Django sets the default user model at first migration only.
>>
>> Hope this helps, you can ask here for your queries.
>> Cheers,
>> Naveen Arora
>>
>> On Wednesday, 26 February 2020 20:11:27 UTC+5:30, Roy Huang wrote:
>>>
>>> thanks Naveen 
>>>
>>> wow, how did you even guess that !! yes I did have my own authentication 
>>> model on top of the original one
>>>
>>> I will put up more detail first thing tomorrow at work, so glad somebody 
>>> can help me out (crying ~~)
>>>
>>> Roy
>>>
>>> Naveen Arora於 2020年2月26日星期三 UTC+8下午9時46分32秒寫道:

 Hi Roy,

 Share the exact problem with screenshots and code if possible. Did you 
 set default authentication model of user to yours..?

 Cheers,
 Naveen Arora

 On Wednesday, 26 February 2020 18:00:10 UTC+5:30, Roy Huang wrote:
>
> Hi all,
>
> any help will be appreciated, i've bee stuck on this for days, couldnt 
> find answers
>
> ok, here it is,
>
> 1) logged in and retrieved data back to a page, all good (got 
> sessionid and csrftoken)
>
> 2) make a request on a view which has got @login_required, then got 
> redirect to login (apparently sessionid got cleared )
>
> any thoughts ?
>
> thanks
>
> donkey
>


-- 
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/79f743b7-ec75-4b60-9199-733609b98557%40googlegroups.com.


Re: Unidirectional association

2020-02-28 Thread Naveen Arora
great. Happy to help :)

Cheers

On Thursday, 27 February 2020 13:46:10 UTC+5:30, Manos Zeakis wrote:
>
> Thank you
>
> I finally made it. I was afraid about circular references and DB possible 
> corruptions, but Django seems to be resilient and surprises me all the time.
>
> What I did was
>
> 1. Declared three different ForeignKeys from class A to B
> 2. Chose PROTECT instead of CASCADE for on_delete
> 3. Let blank/null True
> 4. Of course chose three different related_names
>
>
> On Thursday, 27 February 2020 07:55:52 UTC+2, Naveen Arora wrote:
>>
>> Hi Manos,
>>
>> Kindly explain the scenario appropriately, What exactly are you trying to 
>> achieve? Also read - 
>> https://docs.djangoproject.com/en/3.0/topics/db/examples/many_to_many/
>>
>> Cheers,
>> Naveen Arora
>>
>>
>> On Wednesday, 26 February 2020 20:05:00 UTC+5:30, Manos Zeakis wrote:
>>>
>>> Hi all
>>>
>>> I have created two classes. Instances of class A are timeless and 
>>> instances of class B are different each year. Each instance of class B is 
>>> associated with an instance of class A.
>>>
>>> So I suppose I should do something like this
>>>
>>> class A(models.Model):
>>> name = models.CharField(max_length=20, default = 'null')
>>>
>>> class B(models.Model):
>>> A = models.ForeignKey('A', on_delete=models.CASCADE, related_name = 
>>> "bs")
>>> 
>>> Now I need to declare three fields on class A that point to a different 
>>> instance of class B for current, past and next year
>>> current_B
>>> previous_B
>>> next_B
>>>
>>> I cannot find a way to declare such an association. Could you help me?
>>>
>>> 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/be0389bd-d4f7-4f9d-88d0-ad483596f089%40googlegroups.com.


Re: production setup

2020-02-28 Thread Naveen Arora
Hi Soumen,

https://docs.djangoproject.com/en/3.0/howto/static-files/deployment/
https://docs.djangoproject.com/en/3.0/howto/static-files/

Have a look here. Hope it helps :)
Cheers

On Thursday, 27 February 2020 16:48:46 UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
>
> I'm storing users images and documents inside media folder during 
> development. but I don't how to serve this files for production level.Any 
> one have any idea, actually I read the documentation but I'm still confuse.
>
> 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/4042f87e-cd0a-48e6-b79a-9070cde603da%40googlegroups.com.


Re: Is it possible to extend the model in another application without explicitly changing firs-one?

2020-02-28 Thread Naveen Arora
Clearly Possible, 
Simply import the model first using appname.models. Hope it helps:)
You can use this as
from appA import model1
in app2

On Thursday, 27 February 2020 22:04:12 UTC+5:30, Ol P wrote:
>
> Imagen we have *app-A* and *app-B* with *model-A* and *model-B* 
> accordingly.
> And we want to extend *model-A* in *app-B*.
> What should be written in *model-B* to implement it?
>
> In other words, is it possible to implement the same-table extension?
>

-- 
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/42c4791e-ea38-4e4b-947f-07eaf4c740bc%40googlegroups.com.


Re: How to do validation on a form which is opened by clicking a button

2020-02-28 Thread Naveen Arora
Use this as below  in your view - 

context["form"] = YourForm(request.POST or None)

and just a method if form.is_valid(), there is no need for the else part.

On Friday, 28 February 2020 02:41:04 UTC+5:30, Sunil BK wrote:
>
> Hello community
>
> I am trying to build a simple form which can be opened using a button. It 
> should offer some fields which should be further process after validation. 
> And there is exactly my issue. When I write some data into the fields and 
> click the submit button. the validation error is NOT displayed below the 
> screen like in this screeshot:
>
> [image: 2020-02-27_21-52-30.png]
>
>
> but is displayed in the log.
>
> Can somebody give me a hint what I am missing here?
> Thanks a lot!!
> Sunil
>
>
> This is the code I am using:
>
> my HTML Code for presenting the form.
>
> {% extends 'base.html' %}
> {% load crispy_forms_tags %}
> {%block content%}
> 
> Add System to Organization
> 
> 
> 
> {% csrf_token %}
> {{form|crispy}}
> 
> 
> 
> 
> {%endblock content%}
>
>
> the view:
>
> def chr_add_system_view(request):
> if request.method == 'POST':
> form = AddChrSystemForm(request.POST)
> if form.is_valid():
> print('add_system>valid')
> # TODO: do something
> return redirect(chr_systems_view)
> else:
> print('form.errors ' + str(form.errors))
> form = AddChrSystemForm()
> context = {'form': form}
> return render(request=request, 
> template_name='chr/add_system.html', context=context)
>
>
> the form:
>
> class AddSystemForm(ModelForm):
>
> def __init__(self, *args, **kwargs):
> super(AddSystemForm, self).__init__(*args, **kwargs)
> self.fields['profile_name'].widget.attrs['readonly'] = True
>
> class Meta:
> model = System
> fields = '__all__'
>
> def clean_system_id(self):
> print('validating oid of system..')
>
> system_id = self.cleaned_data['system_id']
> print('system_id: ' + system_id)
>
> if "2.16" not in system_id:
> print('oid of system id is invalid')
>
> raise forms.ValidationError(
> "Your submissionset source oid seems to be invalid. ==> it 
> has to be a valid oid and must start with: 2.16")
> print('oid of system id is valid')
> return system_id
>
>
> the button where the form is called:
>
> 
> SourceId
> 
> {% csrf_token %}
>  class="btn btn-warning btn-sm float-right" 
> value="{{item0}}">[WIP] Add System
> 
> 
> 
>
>
> my class
>
> class System(models.Model):
> system_id = models.CharField(max_length=100)
> abbreviation = models.CharField(max_length=100, default="SRC-")
> software_name = models.CharField(max_length=100, default="Portal")
> vendor = models.CharField(max_length=100, default="vendor")
> profile_name = models.CharField(max_length=100, default="Source")
>
>
>
>
>
>

-- 
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/e3874615-ee6d-43af-b2cb-3405038817c0%40googlegroups.com.


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

2020-02-28 Thread Naveen Arora
can you explain more with some code, the exact question .?

Cheers,
Naveen Arora

On Thursday, 27 February 2020 20:01:00 UTC+5:30, 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/6f03d383-ba0a-4af8-b4b1-61b1b8b496cf%40googlegroups.com.


Re: Api

2020-02-28 Thread Naveen Arora
Create an API which returns count, then use javascript to update the front 
end part.


On Friday, 28 February 2020 12:50:39 UTC+5:30, Tosin Ayoola wrote:
>
> Good morning guyz,  
> I need help on this one,  it on writing api that will Shows the product 
> count for each manufacturer as users add products real time. 
> I have no idea how to solve this problem,  i will any suggestion 
> 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/cf4ed839-2cd7-4517-b3d1-b51b3c7a89ee%40googlegroups.com.


Re: production setup

2020-02-28 Thread Soumen Khatua
I already read the documentation but still I'm confuse that's why I posted.

BTW thank you for your help.

On Fri, Feb 28, 2020 at 5:51 PM Naveen Arora 
wrote:

> Hi Soumen,
>
> https://docs.djangoproject.com/en/3.0/howto/static-files/deployment/
> https://docs.djangoproject.com/en/3.0/howto/static-files/
>
> Have a look here. Hope it helps :)
> Cheers
>
> On Thursday, 27 February 2020 16:48:46 UTC+5:30, Soumen Khatua wrote:
>>
>> Hi Folks,
>>
>> I'm storing users images and documents inside media folder during
>> development. but I don't how to serve this files for production level.Any
>> one have any idea, actually I read the documentation but I'm still confuse.
>>
>> 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/4042f87e-cd0a-48e6-b79a-9070cde603da%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/CAPUw6Wb%3D7-WNRJ%3DCpCKkFnztqEXUaEaDLSL46ZSjzcHgnqUExQ%40mail.gmail.com.


Re: Serializing forms and formsets to pass to Celery task

2020-02-28 Thread Naveen Arora
Hi Bernd,

You can't serialize a form data object this way.
All the solution i can see is to save data temporarily and use it.

Cheers,

On Friday, 28 February 2020 14:58:50 UTC+5:30, Bernd Wechner wrote:
>
> I'm using Celery quite effectively with Django as many are. It's just 
> awesome for running time consuming background tasks, and providing progress 
> bar updates to a web page. Love it.
>
> Now I would like a celery task to do some form processing. That is in a 
> Django view, where I have access to the form (or formset) that's just been 
> submitted, with all its data (in form.request.POST) and methods (like 
> form.save() which saves it to the database as a Django object or objects 
> (in the case of a formset). 
>
> Of course anything we pass to a Celery task must be serialized (as it's 
> passed through the broker) and there is plenty of help around on 
> serializing Django data objects but I can't find diddly squat on serialzing 
> forms and every effort I've tried, JSON, pickle, dill, all fails.
>
> I can serialize the POST data of course, and that great but I can't see 
> how the Celery task can then re-instantiate a form object from that.
>
> I posted this on stackoverflow as well with some richer detail: 
> https://stackoverflow.com/questions/60433090/processing-a-django-form-in-a-celery-task-how-can-the-celery-task-see-the-form
>
> I wonder if anyone has any experience to share here. Essentially I see two 
> possible solutions:
>
>1. Serialize the form or formsets somehow. Anything better than dill 
>out there that might?
>2. Serialize some part of the form or formsets (eg the POST data) and 
>re-instantiate a form or formset at the other end using it. 
>
> Either approach would work, 1. would seem less hassle if it has a 
> solution, and 2. seems more likely to provide one to me right now.
>
> Kind regards,
>
> Bernd.
>

-- 
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/7ea98dbe-ba20-4b74-bc0f-40f6babe52e1%40googlegroups.com.


Re: Project directory management

2020-02-28 Thread Agoua David
Since the flask app config is a singleton, I think you can just call it in
your config/config.py module by import src/app.py if src is a package

Le ven. 28 févr. 2020 à 11:09, Devender Kumar  a
écrit :

> Hi,
> BTW it is flask app question.
>
> dir structure
>  service
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config
> module of config package how can do that.
>
> *solutions I tried* write *sys.path.append(''../")*  to my
> src/__init__.py file but its not working please help me write this right
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write
> *sys.path.append(''../")* in my app.py file,
>
> Thanks 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/5b1e9a97-bede-4454-8b32-9d477fe4d954%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/CAByCr6ieOZSv08BDxNJ73sR7UardcW0yipnhiZ%3D6iiS2oq6jbA%40mail.gmail.com.


Re: Make a cashier login in a system.

2020-02-28 Thread Naveen Arora
Hi,

Check this out - https://docs.djangoproject.com/en/3.0/topics/auth/

Cheers

On Friday, 28 February 2020 16:04:53 UTC+5:30, Kushal Neupane wrote:
>
>
> *I made a Cashier model and added some values from the admin. Now, i need 
> an idea to login the system from the Cashier model. I am confused on this 
> topic since 6 days.*
>

-- 
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/5a988806-73d6-4242-8c10-778d757f0a46%40googlegroups.com.


Re: Login in a system

2020-02-28 Thread Naveen Arora
Hi Kushal, 

Explain the problem clearly

Thanks


On Friday, 28 February 2020 16:04:53 UTC+5:30, Kushal Neupane wrote:
>
> How to make five post officer in an office and authonticate?
>

-- 
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/8a409e8e-ddc4-4f6c-9a4b-ffa7c2d987d7%40googlegroups.com.


Re: Image Upload

2020-02-28 Thread Naveen Arora
Hi, 
Have a look herer - 
https://www.techiediaries.com/django-rest-image-file-upload-tutorial/
and
https://stackoverflow.com/questions/20473572/django-rest-framework-file-upload

Cheers


On Friday, 28 February 2020 17:05:28 UTC+5:30, Soumen Khatua wrote:
>
> Hi Folks,
>
> I'm using DRF APIView to upload images, but I don't know how to write a 
> POST request to accept image. Please advise me how I can do it?
>
> my *serializers.py*
>
>
>
>
>
>
>
>
> *class ImageSerializer(serializers.ModelSerializer):class Meta:
> model = Profilefields = ['user','profile_pic']extra_kwargs 
> = {'user': {'write_only': True}}*
>
> My models.py contain profile_pic as a ImageField.
>
>
> 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/bde0c9db-ad47-4808-ab20-4d0b06d16a37%40googlegroups.com.


Re: Project directory management

2020-02-28 Thread Naveen Arora
Hi,

from .. import abc is not working ?
or somewhat like that.

At last sys.path.append() is one of the solutions.

Cheers,
Naveen Arora


On Friday, 28 February 2020 16:38:15 UTC+5:30, Devender Kumar wrote:
>
> Hi,
> BTW it is flask app question.
>
> dir structure 
>  service 
>  config/__init__.py
> config/config.py
> src/app.py
> src/__init__.py
>
> Running the flask app by writing command python src/app.py
>
> Question: I want to access config parameter in flask app from config 
> module of config package how can do that. 
>
> *solutions I tried* write *sys.path.append(''../")*  to my 
> src/__init__.py file but its not working please help me write this right 
> way.
>
> seems src/__init__.py is not being called.
>
> I don't want to change my dir structure and I don't want to write 
> *sys.path.append(''../")* in my app.py file, 
>
> Thanks 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/83d12e3d-f5c3-4bd2-8e7f-a8b69b12afdc%40googlegroups.com.


Re: Is it possible to extend the model in another application without explicitly changing firs-one?

2020-02-28 Thread Ol P
But how to add fields to it?

Where to put what:
from appA import model1


class ExtendedModel1(?):
?

new_field = models.CharFiled()

class Meta:
   ?


On Friday, February 28, 2020 at 2:23:17 PM UTC+2, Naveen Arora wrote:
>
> Clearly Possible, 
> Simply import the model first using appname.models. Hope it helps:)
> You can use this as
> from appA import model1
> in app2
>
> On Thursday, 27 February 2020 22:04:12 UTC+5:30, Ol P wrote:
>>
>> Imagen we have *app-A* and *app-B* with *model-A* and *model-B* 
>> accordingly.
>> And we want to extend *model-A* in *app-B*.
>> What should be written in *model-B* to implement it?
>>
>> In other words, is it possible to implement the same-table extension?
>>
>

-- 
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/6f918c45-b030-4744-a8f5-2e620c488162%40googlegroups.com.


Re: About Django performance

2020-02-28 Thread Motaz Hejaze
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.


Re: Is it possible to extend the model in another application without explicitly changing firs-one?

2020-02-28 Thread Naveen Arora
What are you trying to achieve with this implementation?
and What do you call a extended model ?
Instance of model1 is accesible in app2, this already means you got your 
model1 in app2.

Curious.


On Friday, 28 February 2020 18:20:12 UTC+5:30, Ol P wrote:
>
> But how to add fields to it?
>
> Where to put what:
> from appA import model1
>
>
> class ExtendedModel1(?):
> ?
>
> new_field = models.CharFiled()
>
> class Meta:
>?
>
>
> On Friday, February 28, 2020 at 2:23:17 PM UTC+2, Naveen Arora wrote:
>>
>> Clearly Possible, 
>> Simply import the model first using appname.models. Hope it helps:)
>> You can use this as
>> from appA import model1
>> in app2
>>
>> On Thursday, 27 February 2020 22:04:12 UTC+5:30, Ol P wrote:
>>>
>>> Imagen we have *app-A* and *app-B* with *model-A* and *model-B* 
>>> accordingly.
>>> And we want to extend *model-A* in *app-B*.
>>> What should be written in *model-B* to implement it?
>>>
>>> In other words, is it possible to implement the same-table extension?
>>>
>>

-- 
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/13cffa42-fc48-4b2c-9ecd-787878c42031%40googlegroups.com.


Re: Is it possible to extend the model in another application without explicitly changing firs-one?

2020-02-28 Thread Ol P

>
> What are you trying to achieve with this implementation?

I want to achieve modularly and loose coupling. Separate responsibility in 
other words.

and What do you call a extended model ?

By extended model, I mean pat of an existing model, that implemented in one 
place (in out example app-A) but extended, altered or modified in another 
please (in out example app-B)

Instance of model1 is accesible in app2, this already means you got your 
> model1 in app2.

Yes, but not the model itself.

On Friday, February 28, 2020 at 2:53:45 PM UTC+2, Naveen Arora wrote:
>
> What are you trying to achieve with this implementation?
> and What do you call a extended model ?
> Instance of model1 is accesible in app2, this already means you got your 
> model1 in app2.
>
> Curious.
>
>
> On Friday, 28 February 2020 18:20:12 UTC+5:30, Ol P wrote:
>>
>> But how to add fields to it?
>>
>> Where to put what:
>> from appA import model1
>>
>>
>> class ExtendedModel1(?):
>> ?
>>
>> new_field = models.CharFiled()
>>
>> class Meta:
>>?
>>
>>
>> On Friday, February 28, 2020 at 2:23:17 PM UTC+2, Naveen Arora wrote:
>>>
>>> Clearly Possible, 
>>> Simply import the model first using appname.models. Hope it helps:)
>>> You can use this as
>>> from appA import model1
>>> in app2
>>>
>>> On Thursday, 27 February 2020 22:04:12 UTC+5:30, Ol P wrote:

 Imagen we have *app-A* and *app-B* with *model-A* and *model-B* 
 accordingly.
 And we want to extend *model-A* in *app-B*.
 What should be written in *model-B* to implement it?

 In other words, is it possible to implement the same-table extension?

>>>

-- 
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/851d7bd0-4821-4b78-bfbf-881f0db090f5%40googlegroups.com.


Re: Python Django Training

2020-02-28 Thread Hal L
add me

在 2020年2月1日星期六 UTC+8下午9:42:52,Srikanth K写道:
>
> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager take 
> up any Python , Django Training (online Preferrable or Weekends). Members 
> who require can contact me or share me  there idea.
>
> Regards,
> Srikanth.K
>

-- 
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/4bd1a2df-d8f9-42be-9fc2-bdfce8dbc0f9%40googlegroups.com.


Re: Python Django Training

2020-02-28 Thread yashwanth .k
Hi,
I am also interested in joining.
Please add me to the group.

On Fri, Feb 21, 2020 at 7:19 PM Isaac Ndutumo 
wrote:

> Hello, I am interested in learning Python with you.  Add me
>
> On Fri, Feb 21, 2020 at 4:42 PM Bharati Nilam 
> wrote:
>
>> Hi,
>> I also from Hyderabad and I'm also interested in the training. please
>> tell me how to join?
>>
>> Regards,
>> Bharati
>>
>> On Thu, 20 Feb, 2020, 6:19 PM Thiagu Palaniappan, <
>> thiagarajan@gmail.com> wrote:
>>
>>> I'm also interested. Please add me in the group.
>>>
>>>
>>> Thanks & Regards,
>>> Thiagu
>>>
>>> On Mon, Feb 17, 2020 at 12:41 AM Akshay Raul 
>>> wrote:
>>>
 I am interested also. Please let me know the details.

 On Sat 1 Feb, 2020, 2:42 PM Srikanth K,  wrote:

> Hi,
>
> I am from Hyderabad. I am Python Developer by Profession. I am eager
> take up any Python , Django Training (online Preferrable or Weekends).
> Members who require can contact me or share me  there idea.
>
> Regards,
> Srikanth.K
>
> --
> 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/CACPyz-gXb7wo9E0Uhs_pnxF9X52uA10__Fq1xt4trjXUaN3ehQ%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/CAEd%2Bv%3D0gE2dEMXKJ0Nm8FcH2ZxUPAdQspkQKB%2Bg5pZbSc_uZnQ%40mail.gmail.com
 
 .

>>>
>>>
>>> --
>>>
>>> Thanks & Regards,
>>>
>>> *Thiagu Palaniappan*
>>>
>>> M +91 (0) 9994318799
>>>
>>> *DXC Technology*
>>> 8th Floor, Tower 1 B DLF IT Park, 1/124 - Shivaji Garden, Nandambakkam
>>> post, Ramapuram, Chennai - 600 089.
>>>
>>> dxc.technology  / Twitter
>>>  / Facebook
>>>  / LinkedIn
>>> 
>>>
>>> --
>>> 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%3DQXNMzH-iL6BQ3_vfrvTpeY%2BSe5%3DbZm9h5wPW_Dw%2BM2BsvQg%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/CAPGVBeOgomb94NXAm347QqGcJ%3D3MzxULU7eQnY-M56EbC2D9vg%40mail.gmail.com
>> 
>> .
>>
>
>
> --
> Kind Regards
> Isaac
>
> --
> 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/CAMje%2B21OuhTCJiBWZsxCf_%2BQddy97f8piyi2oxSY265g6JY6xQ%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/CALgTQAKhFUE-3Jqcef0bWPo7tVaMXPR4MfBp3SaWkCAOk5T%2Bkg%40mail.gmail.com.


Re: Is it possible to extend the model in another application without explicitly changing firs-one?

2020-02-28 Thread Motaz Hejaze
You should understand that extending a model will create a new table with
columns existed in parent in addition to new columns you define , so yes
you can extend ..

On Fri, 28 Feb 2020, 3:03 pm Ol P,  wrote:

> What are you trying to achieve with this implementation?
>
> I want to achieve modularly and loose coupling. Separate responsibility in
> other words.
>
> and What do you call a extended model ?
>
> By extended model, I mean pat of an existing model, that implemented in
> one place (in out example app-A) but extended, altered or modified in
> another please (in out example app-B)
>
> Instance of model1 is accesible in app2, this already means you got your
>> model1 in app2.
>
> Yes, but not the model itself.
>
> On Friday, February 28, 2020 at 2:53:45 PM UTC+2, Naveen Arora wrote:
>>
>> What are you trying to achieve with this implementation?
>> and What do you call a extended model ?
>> Instance of model1 is accesible in app2, this already means you got your
>> model1 in app2.
>>
>> Curious.
>>
>>
>> On Friday, 28 February 2020 18:20:12 UTC+5:30, Ol P wrote:
>>>
>>> But how to add fields to it?
>>>
>>> Where to put what:
>>> from appA import model1
>>>
>>>
>>> class ExtendedModel1(?):
>>> ?
>>>
>>> new_field = models.CharFiled()
>>>
>>> class Meta:
>>>?
>>>
>>>
>>> On Friday, February 28, 2020 at 2:23:17 PM UTC+2, Naveen Arora wrote:

 Clearly Possible,
 Simply import the model first using appname.models. Hope it helps:)
 You can use this as
 from appA import model1
 in app2

 On Thursday, 27 February 2020 22:04:12 UTC+5:30, Ol P wrote:
>
> Imagen we have *app-A* and *app-B* with *model-A* and *model-B*
> accordingly.
> And we want to extend *model-A* in *app-B*.
> What should be written in *model-B* to implement it?
>
> In other words, is it possible to implement the same-table extension?
>
 --
> 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/851d7bd0-4821-4b78-bfbf-881f0db090f5%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/CAHV4E-cg-fji_xoKcrTaAHoCio_iX09fV9E0u%2BhW9cvJ--iebQ%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.


Issue in the API while merging the two data frames

2020-02-28 Thread Devendra reddy
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.


Re: production setup

2020-02-28 Thread Naveen Arora
Try implementing it for once. If you face any problem, you can post in this 
community

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/bb5983e0-d829-47e4-a28d-196e50297cff%40googlegroups.com.


production setup

2020-02-28 Thread Naveen Arora
Hi 

have a look at this - 
https://github.com/codingforentrepreneurs/Guides/blob/master/all/Heroku_Django_Deployment_Guide.md

Cheers

-- 
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/62ca806f-a7ef-4124-af65-f6fb775448d6%40googlegroups.com.