Settings.py:
“../apptwo”  ==> “appTwo.apps.apptwoconfig”,

发自我的 空间传送门

> 在 2019年3月3日,上午5:25,Bulgarian seller <[email protected]> 写道:
> 
> from ..appTwo import views
> urlpatterns = [
>     path('',views.index),
>     path('admin/', admin.site.urls),
> ]
> 
>  
> ValueError: attempted relative import beyond top-level package
> How to fix it in django?
> I have this in AppTwo.views  
> def index(request):
>     return HttpResponse("<em>My Second Project</em>")
> 
> <Capture.PNG>
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> 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/66c7e5ce-fafc-45d7-aa75-3a0ffb499ed5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> <Capture.PNG>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
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/E6F36E11-85F2-4637-93F0-03127FCEF0E3%40icloud.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to