I'm currently moving from my development server to an Apache web production server.
I've tried doing the following just by copying it over and I can login to the admin panel but it doesn't show up.
My admin.py in my app looks like this:
import models
from django.contrib import admin
admin.site.register(models.Organization)
And here is my models.py
from django.db import models
class Organization(models.Model):
name = models.CharField(max_length=100)
website = models.URLField()
azon_code = models.CharField(max_length=50)
gooe_code = models.CharField(max_length=50)
cj_code = models.CharField(max_length=50)
I've resyned the database and restarted apache as well thinking that might do something.
'django-admin' is not recognized as an internal or external command, operable program or batch file. To fix this, first close the terminal window and relaunch it with administrator privileges. Once you launch the elevated terminal window change directory to where you wish to start your Django project.
The admin interface is also customizable in many ways. This post is going to focus on one such customization, something called inlines. When two Django models share a foreign key relation, inlines can be used to expose the related model on the parent model page. This can be extremely useful for many applications.
Aren't you supposed to import like:
from mysite.myapp.models import Organization
admin.site.register(Organization)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With