Re: Help : Advance ORM queries

2019-06-17 Thread Devender Kumar
Need help in writing ORM query for this type of result

On Tuesday, June 18, 2019 at 10:54:30 AM UTC+5:30, Devender Kumar wrote:
>
> Hi,
> I have 3 models which are related like this.
> Accounts can have multiple contact 
> and one contact can have multiple comments
> one contact can be assigned to at most one account.
>
> [image: CRM Relation.png]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Result should look like as described in above photo 
> Thank you 
> Devender
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/0460c9d1-92d3-4f6e-9d95-a9c03b8a049b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Help : Advance ORM queries

2019-06-17 Thread Devender Kumar
Hi,
I have 3 models which are related like this.
Accounts can have multiple contact 
and one contact can have multiple comments
one contact can be assigned to at most one account.

[image: CRM Relation.png] 
























Result should look like as described in above photo 
Thank you 
Devender

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/97a9f13e-5119-4203-a103-8cc85cbbd649%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Where did admin CSS file "ie.css" go after Django 1.8?

2019-06-17 Thread Robert F.
I've discovered the problem.  The release notes for Django 1.9 say, "The 
admin no longer supports Internet Explorer 8 and below, as these browsers 
have reached end-of-life."  Thus, this file is no longer included in Django.

On Monday, June 17, 2019 at 12:00:08 PM UTC-7, Robert F. wrote:
>
> I'm in the process of upgrading a large Django project from 1.8 to 2.2. 
>  Currently, I'm at 1.9.13.  My project has a couple of admin forms that 
> utilize a Django CSS file admin/css/ie.css.  In Django 1.8, that file was 
> located here:
>
> django/contrib/admin/static/admin/css/ie.css
>
> But in Django 1.9.13 that file is missing.  In it's place is a 'forms.css' 
> file.  Does anyone know what happened to the old ie.css file?  I've 
> searched online and also all 14 of the release notes for Django 1.9 and I 
> don't see this mentioned anywhere.
>
> 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fc14af29-f0ac-4701-a61c-102d97016772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Where did admin CSS file "ie.css" go after Django 1.8?

2019-06-17 Thread Robert F.
I'm in the process of upgrading a large Django project from 1.8 to 2.2. 
 Currently, I'm at 1.9.13.  My project has a couple of admin forms that 
utilize a Django CSS file admin/css/ie.css.  In Django 1.8, that file was 
located here:

django/contrib/admin/static/admin/css/ie.css

But in Django 1.9.13 that file is missing.  In it's place is a 'forms.css' 
file.  Does anyone know what happened to the old ie.css file?  I've 
searched online and also all 14 of the release notes for Django 1.9 and I 
don't see this mentioned anywhere.

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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9b4dc2b7-5522-4bdb-9875-25d226a9e126%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: do i need a custom admin app or should i just use django admin?

2019-06-17 Thread James Farris
Read the docs regarding this.
https://docs.djangoproject.com/en/2.2/topics/auth/default/#permissions-and-authorization


On Mon, Jun 17, 2019 at 11:31 AM Rajat Chopra  wrote:

> What are the reasons not to use Django Admin?
>
> Also with regards to creating views and giving those views permissions -
> are there any examples someone can point to help illustrate?
>
>
>
> On Monday, June 17, 2019 at 11:40:53 AM UTC-5, James Farris wrote:
>>
>> Think of the Django Admin as a tool for developers or Database Admins.
>> IMO, it should never be used by an end user.  Create views as Andreas
>> mentioned and give those views permissions.
>>
>> On Monday, June 17, 2019 at 4:12:53 AM UTC-7, Arya wrote:
>>>
>>> i'm planning to build a full ecommerce business to business website.
>>> there are several user types.
>>> *premium users need to create products and edit them. they need to
>>> communicate to each other. see statistics and access some premium content.*
>>> do you suggest to user the default django admin? or i'm better off
>>> creating a custom admin app ?
>>>
>> --
> 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/1LpORyVyQls/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2b4f9ad1-2c29-42ca-b585-3b96e0a07118%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMdMWAURSPzwwxWAdf9dw_YApzH7S1jfso7_JObaPhg1MLfZTQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: do i need a custom admin app or should i just use django admin?

2019-06-17 Thread Rajat Chopra
What are the reasons not to use Django Admin? 

Also with regards to creating views and giving those views permissions - 
are there any examples someone can point to help illustrate?



On Monday, June 17, 2019 at 11:40:53 AM UTC-5, James Farris wrote:
>
> Think of the Django Admin as a tool for developers or Database Admins.  
> IMO, it should never be used by an end user.  Create views as Andreas 
> mentioned and give those views permissions.
>
> On Monday, June 17, 2019 at 4:12:53 AM UTC-7, Arya wrote:
>>
>> i'm planning to build a full ecommerce business to business website. 
>> there are several user types.
>> *premium users need to create products and edit them. they need to  
>> communicate to each other. see statistics and access some premium content.*
>> do you suggest to user the default django admin? or i'm better off 
>> creating a custom admin app ?
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2b4f9ad1-2c29-42ca-b585-3b96e0a07118%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: do i need a custom admin app or should i just use django admin?

2019-06-17 Thread James Farris
Think of the Django Admin as a tool for developers or Database Admins.  
IMO, it should never be used by an end user.  Create views as Andreas 
mentioned and give those views permissions.

On Monday, June 17, 2019 at 4:12:53 AM UTC-7, Arya wrote:
>
> i'm planning to build a full ecommerce business to business website. there 
> are several user types.
> *premium users need to create products and edit them. they need to  
> communicate to each other. see statistics and access some premium content.*
> do you suggest to user the default django admin? or i'm better off 
> creating a custom admin app ?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/851b7542-0dcf-49ca-85e6-1e306899720a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Digital Ocean server Error

2019-06-17 Thread Soumen Khatua
after run this  journalctl -xe  command,this is the log:
















































* The leading process of the session is 4094.Jun 17 14:29:43
sai-foundation su[4174]: Successful su for sai by rootJun 17 14:29:43
sai-foundation su[4174]: + /dev/pts/0 root:saiJun 17 14:29:43
sai-foundation su[4174]: pam_unix(su:session): session opened foJun 17
14:29:43 sai-foundation su[4174]: pam_systemd(su:session): Cannot createJun
17 14:30:35 sai-foundation sshd[4190]: Connection closed by 104.248.148.6
poJun 17 14:34:53 sai-foundation sshd[4222]: Connection closed by
104.248.148.6 poJun 17 14:34:59 sai-foundation su[4224]: Successful su for
root by saiJun 17 14:34:59 sai-foundation su[4224]: + /dev/pts/0
sai:rootJun 17 14:34:59 sai-foundation su[4224]: pam_unix(su:session):
session opened foJun 17 14:34:59 sai-foundation su[4224]:
pam_systemd(su:session): Cannot createJun 17 14:35:00 sai-foundation
sshd[1000]: pam_unix(sshd:session): session closeJun 17 14:35:00
sai-foundation systemd-logind[1395]: Removed session 33.-- Subject: Session
33 has been terminated-- Defined-By: systemd-- Support:
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
 A session
with the ID 33 has been terminated.Jun 17 14:35:01 sai-foundation
CRON[4237]: pam_unix(cron:session): session openeJun 17 14:35:01
sai-foundation CRON[4238]: (root) CMD (command -v debian-sa1 > /Jun 17
14:35:01 sai-foundation CRON[4237]: pam_unix(cron:session): session
closelines 1306-1328/1328 (END) The leading process of the session is
4094.Jun 17 14:29:43 sai-foundation su[4174]: Successful su for sai by
rootJun 17 14:29:43 sai-foundation su[4174]: + /dev/pts/0 root:saiJun 17
14:29:43 sai-foundation su[4174]: pam_unix(su:session): session opened for
user sai by root(uid=0)Jun 17 14:29:43 sai-foundation su[4174]:
pam_systemd(su:session): Cannot create session: Already running in a
sessionJun 17 14:30:35 sai-foundation sshd[4190]: Connection closed by
104.248.148.6 port 44108 [preauth]Jun 17 14:34:53 sai-foundation
sshd[4222]: Connection closed by 104.248.148.6 port 46822 [preauth]Jun 17
14:34:59 sai-foundation su[4224]: Successful su for root by saiJun 17
14:34:59 sai-foundation su[4224]: + /dev/pts/0 sai:rootJun 17 14:34:59
sai-foundation su[4224]: pam_unix(su:session): session opened for user root
by root(uid=1000)Jun 17 14:34:59 sai-foundation su[4224]:
pam_systemd(su:session): Cannot create session: Already running in a
sessionJun 17 14:35:00 sai-foundation sshd[1000]: pam_unix(sshd:session):
session closed for user rootJun 17 14:35:00 sai-foundation
systemd-logind[1395]: Removed session 33.-- Subject: Session 33 has been
terminated-- Defined-By: systemd-- Support:
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
 A session
with the ID 33 has been terminated.Jun 17 14:35:01 sai-foundation
CRON[4237]: pam_unix(cron:session): session opened for user root by
(uid=0)Jun 17 14:35:01 sai-foundation CRON[4238]: (root) CMD (command -v
debian-sa1 > /dev/null && debian-sa1 1 1)Jun 17 14:35:01 sai-foundation
CRON[4237]: pam_unix(cron:session): session closed for user root~*

On Mon, Jun 17, 2019 at 5:24 PM Anirudh Jain 
wrote:

> could you run `journalctl -xe` tell us more about the log result
>
> On Mon, 17 Jun 2019, 17:08 Soumen Khatua, 
> wrote:
>
>> Hi Folks,
>>
>> I uploaded my project into digital ocean but at the time of run 
>> this*(sai@sai-foundation:~/saiproject$
>> sudo systemctl status gunicorn) *command,I'm getting this error:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *● gunicorn.service - gunicorn daemon   Loaded: loaded
>> (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
>>  Active: failed (Result: exit-code) since Mon 2019-06-17 11:34:09 UTC; 14s
>> ago Main PID: 1174 (code=exited, status=200/CHDIR)Jun 17 11:34:09
>> sai-foundation systemd[1]: Started gunicorn daemon.Jun 17 11:34:09
>> sai-foundation systemd[1]: gunicorn.service: Main process exited,
>> code=exited, status=200/CHDIRJun 17 11:34:09 sai-foundation systemd[1]:
>> gunicorn.service: Unit entered failed state.Jun 17 11:34:09 sai-foundation
>> systemd[1]: gunicorn.service: Failed with result 'exit-code'*.
>>
>> Please help me guys for this problem.
>>
>>
>> Thank You.
>>
>>
>>
>>
>> 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 post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://g

Re:

2019-06-17 Thread Andréas Kühne
Hi,

Which database? The solution depends on which database you are using. I
would look to see so that the user you are trying to connect to the
database with actually CAN open the database?

Regards,

Andréas


Den mån 17 juni 2019 kl 15:46 skrev Herman :

> how do I solve thsi kind of operational error on windows
> 'django.db.utils.OperationalError: FATAL:  password authentication failed
> for user "hp" '?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CACq2e44kWP8dVvLrMYwowrkF%3DLKQLB_2a570wf1VWPk-Jq5juQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCcL4nB%2BP7BpzUE_AjBE2o1ms74sVG1ow%2BVKqRJP%2ByyWQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: do i need a custom admin app or should i just use django admin?

2019-06-17 Thread Andréas Kühne
I would advise you to not use django admin. Django admin is fine in
development and for quickly doing crud. However if you need to change
something in the workflow in admin, it is doable but rather hard. Creating
the views using Class based views is rather simple if you use generic views
- so that's what I would do.

Regards,

Andréas


Den mån 17 juni 2019 kl 13:12 skrev Arya :

> i'm planning to build a full ecommerce business to business website. there
> are several user types.
> *premium users need to create products and edit them. they need to
> communicate to each other. see statistics and access some premium content.*
> do you suggest to user the default django admin? or i'm better off
> creating a custom admin app ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5215792d-621b-4f61-86de-8ac94b18022f%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCf-CSxsWbwt8O6U3N57FypzeLwcKvstLpxfTAWn7trSAw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installation Error!

2019-06-17 Thread ojakol emma
if you are using django first say

pip install django and channels later say

pip install channels


On Mon, Jun 17, 2019 at 3:34 PM ojakol emma  wrote:

> pip install name  e.g django
>
> On Fri, Jun 14, 2019 at 3:03 PM Brian Odhiambo 
> wrote:
>
>> Hello guys, how do I solve this issue. Trying to install channels using
>> pip. But am getting installation error below.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b512012d-d564-494a-b6e5-e3008c2405b7%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKVKrTxX-LzWYmVL5NX1%2BA-XMPHRRDfNQtusJP9aTP6BWXoyBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[no subject]

2019-06-17 Thread Herman
how do I solve thsi kind of operational error on windows
'django.db.utils.OperationalError: FATAL:  password authentication failed
for user "hp" '?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CACq2e44kWP8dVvLrMYwowrkF%3DLKQLB_2a570wf1VWPk-Jq5juQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Digital Ocean server Error

2019-06-17 Thread Anirudh Jain
could you run `journalctl -xe` tell us more about the log result

On Mon, 17 Jun 2019, 17:08 Soumen Khatua,  wrote:

> Hi Folks,
>
> I uploaded my project into digital ocean but at the time of run 
> this*(sai@sai-foundation:~/saiproject$
> sudo systemctl status gunicorn) *command,I'm getting this error:
>
>
>
>
>
>
>
>
>
> *● gunicorn.service - gunicorn daemon   Loaded: loaded
> (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
>  Active: failed (Result: exit-code) since Mon 2019-06-17 11:34:09 UTC; 14s
> ago Main PID: 1174 (code=exited, status=200/CHDIR)Jun 17 11:34:09
> sai-foundation systemd[1]: Started gunicorn daemon.Jun 17 11:34:09
> sai-foundation systemd[1]: gunicorn.service: Main process exited,
> code=exited, status=200/CHDIRJun 17 11:34:09 sai-foundation systemd[1]:
> gunicorn.service: Unit entered failed state.Jun 17 11:34:09 sai-foundation
> systemd[1]: gunicorn.service: Failed with result 'exit-code'*.
>
> Please help me guys for this problem.
>
>
> Thank You.
>
>
>
>
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAPUw6WZBuRhK6QR4xZuNpYQrHARuoM0TWiBpTqGNnN0RJdsPXA%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAC3mK7cKKB0YpTCV0UeDRmcTo5tqfaj4jr_upP35_vjBLGjzeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Digital Ocean server Error

2019-06-17 Thread Soumen Khatua
Hi Folks,

I uploaded my project into digital ocean but at the time of run
this*(sai@sai-foundation:~/saiproject$
sudo systemctl status gunicorn) *command,I'm getting this error:









*● gunicorn.service - gunicorn daemon   Loaded: loaded
(/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Mon 2019-06-17 11:34:09 UTC; 14s
ago Main PID: 1174 (code=exited, status=200/CHDIR)Jun 17 11:34:09
sai-foundation systemd[1]: Started gunicorn daemon.Jun 17 11:34:09
sai-foundation systemd[1]: gunicorn.service: Main process exited,
code=exited, status=200/CHDIRJun 17 11:34:09 sai-foundation systemd[1]:
gunicorn.service: Unit entered failed state.Jun 17 11:34:09 sai-foundation
systemd[1]: gunicorn.service: Failed with result 'exit-code'*.

Please help me guys for this problem.


Thank You.




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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPUw6WZBuRhK6QR4xZuNpYQrHARuoM0TWiBpTqGNnN0RJdsPXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


do i need a custom admin app or should i just use django admin?

2019-06-17 Thread Arya
i'm planning to build a full ecommerce business to business website. there 
are several user types.
*premium users need to create products and edit them. they need to  
communicate to each other. see statistics and access some premium content.*
do you suggest to user the default django admin? or i'm better off creating 
a custom admin app ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5215792d-621b-4f61-86de-8ac94b18022f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Confused with deleted migrations

2019-06-17 Thread Andréas Kühne
Hi,

If you look here:
https://docs.djangoproject.com/en/2.2/topics/migrations/

You will see Djangos official take on migrations - you don't need to use
version control for handling them (see here for examples of version
control: https://en.wikipedia.org/wiki/Version_control).

The main thing however is that you need to make sure that the migration
files (in each apps migrations directory) should always be added to, and
you should never delete files there. So if you are working on a project and
developing it locally - you do the changes on the models and then run
"python manage.py makemigrations". Django will then create migration files
for you that have the changes you just have done. These you need to keep
all the time (you can also squash migrations, but that's rather advanced).
These migration files can be run both on you development server and on your
production server - they will do the changes required.

It SHOULDN'T matter which database you use on production and development,
however - I usually use the same locally and on production, just to make
sure that we don't get any strange issues because of differences. But
that's just me :-)

Regards,

Andréas


Den sön 16 juni 2019 kl 09:05 skrev Mohammad Etemaddar <
mohammad.etemad...@gmail.com>:

> I got really confused. I don't know how to use version control. I think
> this might happen again.
> I need to understand what you did with version control. It would be
> appreciated if you could post an instructions on here or any blog.
> Thank you.
>
> On Wednesday, June 12, 2019 at 10:57:56 PM UTC+4:30, Mohammad Etemaddar
> wrote:
>>
>> Hey folks
>> After uploading the app to the server, I got problems by local migrations
>> in development. So deleted the migrations and local sqlite db (Server uses
>> MySQL).
>> After more development, uploaded the whole project to the server and
>> overwrite the files. And typed migrate on server. I don't know what
>> happened to the database. Some new tables seems to be created (or not). I
>> got really confused with this situation. It is much confusing to get backup
>> from server's data and then restore them back.
>> What is your opinion?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8b904f72-e321-41b8-b8a4-44480560544c%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCf%3DsNSL0RS1eWq_Cd20nN8LdArv45F2rovjtOdvx4quFA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.